Skip to content

Instantly share code, notes, and snippets.

@iocanel
Last active February 5, 2019 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iocanel/bd5f428c4b12a82992f553678c6cd0a5 to your computer and use it in GitHub Desktop.
Save iocanel/bd5f428c4b12a82992f553678c6cd0a5 to your computer and use it in GitHub Desktop.
Install prometheus operator locally
oc cluster up
# Tried with both coreos repo and its openshfit fork
git clone git@github.com:openshift/prometheus-operator.git
cd prometheus-operator
# Remove all RunAsUser: 65543 as they don't work on openshift
ls contrib/kube-prometheus/manifests/* | while read manifest; do echo "Removing RunUser from $manifest"; sed -i '/65543/d' $manifest;done
# This suffers from a race condition so lets install resources one by one and add some sleep
ls contrib/kube-prometheus/manifests/* | while read manifest; do echo "Installing $manifest"; oc create -f $manifest; sleep 1;done
@cmoulliard
Copy link

I suppose that you executed prior to do the changes the following command oc apply -f bundle.yaml ?

@cmoulliard
Copy link

prometheus operator pod can't start for me after executing the command oc apply -f bundle.yaml as the pod reports such an error
--> standard_init_linux.go:178: exec user process caused "operation not permitted"

@iocanel
Copy link
Author

iocanel commented Feb 5, 2019

@cmoulliard: No I didn't execute the oc apply -f bunlde.yaml because you are not supposed to do so when using the kube-prometheus subproject.

However, I've also tried without the kube-prometheus (in which case I did use the oc apply -f bundle.yaml) and had the exact same behavior.

@cmoulliard
Copy link

I think that the project to be used is now -> https://github.com/coreos/prometheus-operator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment