Setup assisted operator ConfigMap
Following the
base environment variables SERVICE_BASE_URL and OPENSHIFT_VERSIONS need
to be defined as part of the ConfigMap passed to AgentServiceConfig.
@@ -38,24 +38,24 @@ cat <<EOF
EOF
fi
- if [ -n "${OPENSHIFT_VERSIONS:-}" ]; then
+ if [ -n "${SERVICE_IMAGE:-}" ]; then
cat <<EOF
- - name: OPENSHIFT_VERSIONS
- value: '${OPENSHIFT_VERSIONS}'
+ - name: SERVICE_IMAGE
+ value: '${SERVICE_IMAGE}'
EOF
fi
+}
- if [ -n "${SERVICE_BASE_URL:-}" ]; then
+function configmap_config() {
+ if [ -n "${OPENSHIFT_VERSIONS:-}" ]; then
cat <<EOF
- - name: SERVICE_BASE_URL
- value: '${SERVICE_BASE_URL}'
+ OPENSHIFT_VERSIONS: '${OPENSHIFT_VERSIONS}'
EOF
fi
- if [ -n "${SERVICE_IMAGE:-}" ]; then
+ if [ -n "${SERVICE_BASE_URL:-}" ]; then
cat <<EOF
- - name: SERVICE_IMAGE
- value: '${SERVICE_IMAGE}'
+ SERVICE_BASE_URL: '${SERVICE_BASE_URL}'
EOF
fi
}
@@ -105,11 +105,24 @@ EOCR
wait_for_crd "agentserviceconfigs.agent-install.openshift.io"
+tee << EOCR >(oc apply -f -)
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: assisted-service-config
+ namespace: ${ASSISTED_NAMESPACE}
+data:
+ LOG_LEVEL: "debug"
+$(configmap_config)
+EOCR
+
tee << EOCR >(oc apply -f -)
apiVersion: agent-install.openshift.io/v1beta1
kind: AgentServiceConfig
metadata:
name: agent
+ annotations:
+ unsupported.agent-install.openshift.io/assisted-service-configmap: "assisted-service-config"
spec:
databaseStorage:
storageClassName: ${STORAGE_CLASS_NAME}
