From b8c514490bdf4731addfae84f6022f42877bd252 Mon Sep 17 00:00:00 2001 From: Periklis Tsirakidis Date: Wed, 1 Sep 2021 10:24:27 +0300 Subject: [PATCH] Use pinned operand image versions from quay.io --- ...elasticsearch-operator.clusterserviceversion.yaml | 8 ++++---- ...der_rbac.authorization.k8s.io_v1_clusterrole.yaml | 12 ++++++++++++ config/manager/manager.yaml | 8 ++++---- internal/constants/constants.go | 6 +++--- internal/kibana/defaults.go | 2 +- olm_deploy/operatorregistry/registry-deployment.yaml | 2 ++ olm_deploy/scripts/catalog-deploy.sh | 1 + olm_deploy/scripts/env.sh | 11 ++++++++--- olm_deploy/scripts/registry-init.sh | 7 ++++--- 9 files changed, 39 insertions(+), 18 deletions(-) create mode 100644 bundle/manifests/metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml diff --git a/bundle/manifests/elasticsearch-operator.clusterserviceversion.yaml b/bundle/manifests/elasticsearch-operator.clusterserviceversion.yaml index 546083379..8f3f1ff93 100644 --- a/bundle/manifests/elasticsearch-operator.clusterserviceversion.yaml +++ b/bundle/manifests/elasticsearch-operator.clusterserviceversion.yaml @@ -488,13 +488,13 @@ spec: - name: PROXY_IMAGE value: quay.io/openshift/origin-oauth-proxy:latest - name: ELASTICSEARCH_PROXY - value: quay.io/openshift-logging/elasticsearch-proxy:latest + value: quay.io/openshift-logging/elasticsearch-proxy:1.0 - name: ELASTICSEARCH_IMAGE - value: quay.io/openshift-logging/elasticsearch6:latest + value: quay.io/openshift-logging/elasticsearch6:6.8.1 - name: KIBANA_IMAGE - value: quay.io/openshift-logging/kibana6:latest + value: quay.io/openshift-logging/kibana6:6.8.1 - name: CURATOR_IMAGE - value: quay.io/openshift-logging/curator5:latest + value: quay.io/openshift-logging/curator5:5.8.1 image: quay.io/openshift-logging/elasticsearch-operator:latest imagePullPolicy: IfNotPresent livenessProbe: diff --git a/bundle/manifests/metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml b/bundle/manifests/metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml new file mode 100644 index 000000000..d1bddd8eb --- /dev/null +++ b/bundle/manifests/metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + creationTimestamp: null + labels: + name: elasticsearch-operator + name: metrics-reader +rules: +- nonResourceURLs: + - /metrics + verbs: + - get diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 76dd409e4..0b8c0f90c 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -52,10 +52,10 @@ spec: - name: PROXY_IMAGE value: "quay.io/openshift/origin-oauth-proxy:latest" - name: ELASTICSEARCH_PROXY - value: "quay.io/openshift-logging/elasticsearch-proxy:latest" + value: "quay.io/openshift-logging/elasticsearch-proxy:1.0" - name: ELASTICSEARCH_IMAGE - value: "quay.io/openshift-logging/elasticsearch6:latest" + value: "quay.io/openshift-logging/elasticsearch6:6.8.1" - name: KIBANA_IMAGE - value: "quay.io/openshift-logging/kibana6:latest" + value: "quay.io/openshift-logging/kibana6:6.8.1" - name: CURATOR_IMAGE - value: "quay.io/openshift-logging/curator5:latest" + value: "quay.io/openshift-logging/curator5:5.8.1" diff --git a/internal/constants/constants.go b/internal/constants/constants.go index 58b0f8b61..c1d6ee34d 100644 --- a/internal/constants/constants.go +++ b/internal/constants/constants.go @@ -11,9 +11,9 @@ const ( TrustedCABundleHashName = "logging.openshift.io/hash" KibanaTrustedCAName = "kibana-trusted-ca-bundle" SecretHashPrefix = "logging.openshift.io/" - ElasticsearchDefaultImage = "quay.io/openshift-logging/elasticsearch6" - ProxyDefaultImage = "quay.io/openshift-logging/elasticsearch-proxy:latest" - CuratorDefaultImage = "quay.io/openshift-logging/curator5" + ElasticsearchDefaultImage = "quay.io/openshift-logging/elasticsearch6:6.8.1" + ProxyDefaultImage = "quay.io/openshift-logging/elasticsearch-proxy:1.0" + CuratorDefaultImage = "quay.io/openshift-logging/curator5:5.8.1" TheoreticalShardMaxSizeInMB = 40960 // OcpTemplatePrefix is the prefix all operator generated templates diff --git a/internal/kibana/defaults.go b/internal/kibana/defaults.go index 97c2cd21a..1f422a31e 100644 --- a/internal/kibana/defaults.go +++ b/internal/kibana/defaults.go @@ -10,6 +10,6 @@ var ( defaultKibanaProxyMemory = resource.MustParse("256Mi") defaultKibanaProxyCPURequest = resource.MustParse("100m") - kibanaDefaultImage = "quay.io/openshift-logging/kibana6:latest" + kibanaDefaultImage = "quay.io/openshift-logging/kibana6:6.8.1" kibanaProxyDefaultImage = "quay.io/openshift/origin-oauth-proxy:latest" ) diff --git a/olm_deploy/operatorregistry/registry-deployment.yaml b/olm_deploy/operatorregistry/registry-deployment.yaml index b245cfc87..41c2df1bd 100644 --- a/olm_deploy/operatorregistry/registry-deployment.yaml +++ b/olm_deploy/operatorregistry/registry-deployment.yaml @@ -35,6 +35,8 @@ spec: value: ${IMAGE_OAUTH_PROXY} - name: IMAGE_LOGGING_KIBANA6 value: ${IMAGE_LOGGING_KIBANA6} + - name: IMAGE_CURATOR5 + value: ${IMAGE_CURATOR5} containers: - name: elasticsearch-operator-registry diff --git a/olm_deploy/scripts/catalog-deploy.sh b/olm_deploy/scripts/catalog-deploy.sh index d8f638055..bb7128802 100755 --- a/olm_deploy/scripts/catalog-deploy.sh +++ b/olm_deploy/scripts/catalog-deploy.sh @@ -10,6 +10,7 @@ echo "kube rbac proxy: ${IMAGE_KUBE_RBAC_PROXY}" echo "elastic6: ${IMAGE_ELASTICSEARCH6}" echo "elasticsearch proxy: ${IMAGE_ELASTICSEARCH_PROXY}" echo "kibana: ${IMAGE_LOGGING_KIBANA6}" +echo "curator5: ${IMAGE_CURATOR5}" echo "oauth proxy: ${IMAGE_OAUTH_PROXY}" echo "In namespace: ${ELASTICSEARCH_OPERATOR_NAMESPACE}" diff --git a/olm_deploy/scripts/env.sh b/olm_deploy/scripts/env.sh index 67a2862d0..571fa1e77 100644 --- a/olm_deploy/scripts/env.sh +++ b/olm_deploy/scripts/env.sh @@ -3,6 +3,10 @@ set -eou pipefail export OCP_VERSION=${OCP_VERSION:-4.7} export LOGGING_VERSION=${LOGGING_VERSION:-5.2} +export LOGGING_ES_VERSION=${LOGGING_ES_VERSION:-6.8.1} +export LOGGING_KIBANA_VERSION=${LOGGING_KIBANA_VERSION:-6.8.1} +export LOGGING_ES_PROXY_VERSION=${LOGGING_ES_PROXY_VERSION:-1.0} +export LOGGING_CURATOR_VERSION=${LOGGING_CURATOR_VERSION:-5.8.1} export LOGGING_IS=${LOGGING_IS:-openshift-logging} #openshift images @@ -14,8 +18,9 @@ IMAGE_ELASTICSEARCH_OPERATOR_REGISTRY=${IMAGE_ELASTICSEARCH_OPERATOR_REGISTRY:-q export IMAGE_ELASTICSEARCH_OPERATOR_REGISTRY=${IMAGE_ELASTICSEARCH_OPERATOR_REGISTRY:-$LOCAL_IMAGE_ELASTICSEARCH_OPERATOR_REGISTRY} export IMAGE_ELASTICSEARCH_OPERATOR=${IMAGE_ELASTICSEARCH_OPERATOR:-quay.io/${LOGGING_IS}/elasticsearch-operator:${LOGGING_VERSION}} -export IMAGE_ELASTICSEARCH6=${IMAGE_ELASTICSEARCH6:-quay.io/${LOGGING_IS}/elasticsearch6:${LOGGING_VERSION}} -export IMAGE_ELASTICSEARCH_PROXY=${IMAGE_ELASTICSEARCH_PROXY:-quay.io/${LOGGING_IS}/elasticsearch-proxy:${LOGGING_VERSION}} -export IMAGE_LOGGING_KIBANA6=${IMAGE_LOGGING_KIBANA6:-quay.io/${LOGGING_IS}/kibana6:${LOGGING_VERSION}} +export IMAGE_ELASTICSEARCH6=${IMAGE_ELASTICSEARCH6:-quay.io/${LOGGING_IS}/elasticsearch6:${LOGGING_ES_VERSION}} +export IMAGE_ELASTICSEARCH_PROXY=${IMAGE_ELASTICSEARCH_PROXY:-quay.io/${LOGGING_IS}/elasticsearch-proxy:${LOGGING_ES_PROXY_VERSION}} +export IMAGE_LOGGING_KIBANA6=${IMAGE_LOGGING_KIBANA6:-quay.io/${LOGGING_IS}/kibana6:${LOGGING_KIBANA_VERSION}} +export IMAGE_CURATOR5=${IMAGE_CURATOR5:-quay.io/${LOGGING_IS}/curator5:${LOGGING_CURATOR_VERSION}} export ELASTICSEARCH_OPERATOR_NAMESPACE=${ELASTICSEARCH_OPERATOR_NAMESPACE:-openshift-operators-redhat} diff --git a/olm_deploy/scripts/registry-init.sh b/olm_deploy/scripts/registry-init.sh index 6f88de564..6eabce4c0 100755 --- a/olm_deploy/scripts/registry-init.sh +++ b/olm_deploy/scripts/registry-init.sh @@ -10,10 +10,11 @@ echo -e "\n\n" # update the manifest with the image built by ci sed -i "s,quay.io/openshift-logging/elasticsearch-operator:latest,${IMAGE_ELASTICSEARCH_OPERATOR}," /manifests/*clusterserviceversion.yaml sed -i "s,quay.io/openshift/origin-kube-rbac-proxy:latest,${IMAGE_KUBE_RBAC_PROXY}," /manifests/*clusterserviceversion.yaml -sed -i "s,quay.io/openshift-logging/elasticsearch6:latest,${IMAGE_ELASTICSEARCH6}," /manifests/*clusterserviceversion.yaml -sed -i "s,quay.io/openshift-logging/elasticsearch-proxy:latest,${IMAGE_ELASTICSEARCH_PROXY}," /manifests/*clusterserviceversion.yaml +sed -i "s,quay.io/openshift-logging/elasticsearch6:6.8.1,${IMAGE_ELASTICSEARCH6}," /manifests/*clusterserviceversion.yaml +sed -i "s,quay.io/openshift-logging/elasticsearch-proxy:1.0,${IMAGE_ELASTICSEARCH_PROXY}," /manifests/*clusterserviceversion.yaml sed -i "s,quay.io/openshift/origin-oauth-proxy:latest,${IMAGE_OAUTH_PROXY}," /manifests/*clusterserviceversion.yaml -sed -i "s,quay.io/openshift-logging/kibana6:latest,${IMAGE_LOGGING_KIBANA6}," /manifests/*clusterserviceversion.yaml +sed -i "s,quay.io/openshift-logging/kibana6:6.8.1,${IMAGE_LOGGING_KIBANA6}," /manifests/*clusterserviceversion.yaml +sed -i "s,quay.io/openshift-logging/curator5:5.8.1,${IMAGE_CURATOR5}," /manifests/*clusterserviceversion.yaml # update the manifest to pull always the operator image for non-CI environments if [ "${OPENSHIFT_CI:-false}" == "false" ] ; then