mkdir /tmp/dev && cd /tmp/dev/
wget https://raw.githubusercontent.com/openshift/knative-serving/release-v0.11.1/openshift/release/knative-serving-v0.11.1.yaml
NOTE: This downloads v0.11.1 manifest. It should same version with $ oc get ks -n knative-serving
.
e.g
vim knative-serving-v0.11.1.yaml
operator_ns=$(kubectl get og --all-namespaces | grep global-operators | awk '{print $1}')
oc create configmap ko-data -n $operator_ns --from-file="knative-serving-v0.11.1.yaml"
oc edit csv serverless-operator.v1.4.1 -n $operator_ns
NOTE: The version v1.4.1 must match for the serverless operator version oc get olm -n $operator_ns
NOTE: The CSV you edit must be in $operator_ns.
The CSV should have following settings:
deployments:
- name: knative-serving-operator
...
- name: METRICS_DOMAIN
value: knative.dev/serving-operator
- name: KO_DATA_PATH # ADD
value: /tmp/ # ADD
.. snip ..
ports:
- containerPort: 9090
name: metrics
volumeMounts: # ADD
- mountPath: /tmp/knative-serving # ADD
name: release-manifest # ADD
serviceAccountName: knative-serving-operator
volumes: # ADD
- configMap: # ADD
items: # ADD
- key: knative-serving-v0.11.1.yaml # ADD
path: knative-serving-v0.11.1.yaml # ADD
name: ko-data # ADD
name: release-manifest # ADD
$ oc delete deployment -n $operator_ns knative-serving-operator
The deploment should be re-created and updted.
$ oc get deployment -n $operator_ns knative-serving-operator -o yaml |grep KO_DATA
- name: KO_DATA_PATH
oc delete pod -n knative-serving webhook-b49b8c5df-bwvlg
This will be the trigger and the config should be updated.