From 2189f6f8ce764483eb531a32ca877fea7a3ef4c8 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Wed, 6 Jan 2021 10:17:04 +0200 Subject: [PATCH] Revert recreate strategy and probes for operator (#609) Signed-off-by: Anatolii Bazko --- cmd/manager/main.go | 14 +--------- .../che-operator.clusterserviceversion.yaml | 27 +++---------------- .../che-operator.clusterserviceversion.yaml | 27 +++---------------- deploy/operator.yaml | 20 -------------- 4 files changed, 9 insertions(+), 79 deletions(-) diff --git a/cmd/manager/main.go b/cmd/manager/main.go index df02a4457..3241b709c 100644 --- a/cmd/manager/main.go +++ b/cmd/manager/main.go @@ -35,7 +35,6 @@ import ( sdkVersion "github.com/operator-framework/operator-sdk/version" _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" "sigs.k8s.io/controller-runtime/pkg/client/config" - "sigs.k8s.io/controller-runtime/pkg/healthz" "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/manager/signals" ) @@ -117,8 +116,7 @@ func main() { // Create a new Cmd to provide shared dependencies and start components options := manager.Options{ - Namespace: namespace, - HealthProbeBindAddress: ":6789", + Namespace: namespace, } mgr, err := manager.New(cfg, options) if err != nil { @@ -160,16 +158,6 @@ func main() { os.Exit(1) } - // Setup health checks - if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil { - log.Error(err, "Unable to set up health check") - os.Exit(1) - } - if err := mgr.AddReadyzCheck("readyz", healthz.Ping); err != nil { - log.Error(err, "Unable to set up ready check") - os.Exit(1) - } - logrus.Info("Starting the Cmd") // Start the Cmd diff --git a/deploy/olm-catalog/eclipse-che-preview-kubernetes/manifests/che-operator.clusterserviceversion.yaml b/deploy/olm-catalog/eclipse-che-preview-kubernetes/manifests/che-operator.clusterserviceversion.yaml index d993c03fb..ab9a6cac2 100644 --- a/deploy/olm-catalog/eclipse-che-preview-kubernetes/manifests/che-operator.clusterserviceversion.yaml +++ b/deploy/olm-catalog/eclipse-che-preview-kubernetes/manifests/che-operator.clusterserviceversion.yaml @@ -84,13 +84,13 @@ metadata: categories: Developer Tools certified: "false" containerImage: quay.io/eclipse/che-operator:nightly - createdAt: "2021-01-05T13:27:39Z" + createdAt: "2021-01-06T07:12:37Z" description: A Kube-native development solution that delivers portable and collaborative developer workspaces. operatorframework.io/suggested-namespace: eclipse-che repository: https://github.com/eclipse/che-operator support: Eclipse Foundation - name: eclipse-che-preview-kubernetes.v7.24.0-60.nightly + name: eclipse-che-preview-kubernetes.v7.24.0-62.nightly namespace: placeholder spec: apiservicedefinitions: {} @@ -291,8 +291,7 @@ spec: selector: matchLabels: app: che-operator - strategy: - type: Recreate + strategy: {} template: metadata: labels: @@ -358,28 +357,10 @@ spec: value: ca-certs image: quay.io/eclipse/che-operator:nightly imagePullPolicy: Always - livenessProbe: - failureThreshold: 10 - httpGet: - path: /readyz - port: 6789 - initialDelaySeconds: 15 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 5 name: che-operator ports: - containerPort: 60000 name: metrics - readinessProbe: - failureThreshold: 10 - httpGet: - path: /healthz - port: 6789 - initialDelaySeconds: 5 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 5 resources: {} restartPolicy: Always serviceAccountName: che-operator @@ -513,4 +494,4 @@ spec: maturity: stable provider: name: Eclipse Foundation - version: 7.24.0-60.nightly + version: 7.24.0-62.nightly diff --git a/deploy/olm-catalog/eclipse-che-preview-openshift/manifests/che-operator.clusterserviceversion.yaml b/deploy/olm-catalog/eclipse-che-preview-openshift/manifests/che-operator.clusterserviceversion.yaml index 4603a72fe..2d4628d5d 100644 --- a/deploy/olm-catalog/eclipse-che-preview-openshift/manifests/che-operator.clusterserviceversion.yaml +++ b/deploy/olm-catalog/eclipse-che-preview-openshift/manifests/che-operator.clusterserviceversion.yaml @@ -75,13 +75,13 @@ metadata: categories: Developer Tools, OpenShift Optional certified: "false" containerImage: quay.io/eclipse/che-operator:nightly - createdAt: "2021-01-05T13:27:48Z" + createdAt: "2021-01-06T07:12:47Z" description: A Kube-native development solution that delivers portable and collaborative developer workspaces in OpenShift. operatorframework.io/suggested-namespace: eclipse-che repository: https://github.com/eclipse/che-operator support: Eclipse Foundation - name: eclipse-che-preview-openshift.v7.24.0-58.nightly + name: eclipse-che-preview-openshift.v7.24.0-62.nightly namespace: placeholder spec: apiservicedefinitions: {} @@ -306,8 +306,7 @@ spec: selector: matchLabels: app: che-operator - strategy: - type: Recreate + strategy: {} template: metadata: labels: @@ -371,28 +370,10 @@ spec: value: ca-certs image: quay.io/eclipse/che-operator:nightly imagePullPolicy: Always - livenessProbe: - failureThreshold: 10 - httpGet: - path: /readyz - port: 6789 - initialDelaySeconds: 15 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 5 name: che-operator ports: - containerPort: 60000 name: metrics - readinessProbe: - failureThreshold: 10 - httpGet: - path: /healthz - port: 6789 - initialDelaySeconds: 5 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 5 resources: {} restartPolicy: Always serviceAccountName: che-operator @@ -532,4 +513,4 @@ spec: maturity: stable provider: name: Eclipse Foundation - version: 7.24.0-58.nightly + version: 7.24.0-62.nightly diff --git a/deploy/operator.yaml b/deploy/operator.yaml index 77ecd9f40..130d0f4ff 100644 --- a/deploy/operator.yaml +++ b/deploy/operator.yaml @@ -17,8 +17,6 @@ spec: selector: matchLabels: app: che-operator - strategy: - type: Recreate template: metadata: labels: @@ -88,24 +86,6 @@ spec: value: che-postgres-secret - name: CHE_SERVER_TRUST_STORE_CONFIGMAP_NAME value: ca-certs - livenessProbe: - httpGet: - path: /readyz - port: 6789 - initialDelaySeconds: 15 - periodSeconds: 10 - failureThreshold: 10 - successThreshold: 1 - timeoutSeconds: 5 - readinessProbe: - httpGet: - path: /healthz - port: 6789 - initialDelaySeconds: 5 - periodSeconds: 10 - failureThreshold: 10 - successThreshold: 1 - timeoutSeconds: 5 restartPolicy: Always serviceAccountName: che-operator terminationGracePeriodSeconds: 5