From 5b9592898b6cc8fd1f1b6534d3d168a901d10fd3 Mon Sep 17 00:00:00 2001 From: Bhargavi-Chilaka Date: Wed, 22 Feb 2023 15:05:11 +0530 Subject: [PATCH 01/20] securitycontext updated --- .../templates/sensu-operator-deployment.yaml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/helm/sensu-operator/templates/sensu-operator-deployment.yaml b/helm/sensu-operator/templates/sensu-operator-deployment.yaml index 5e1b54c4..01c9efd5 100644 --- a/helm/sensu-operator/templates/sensu-operator-deployment.yaml +++ b/helm/sensu-operator/templates/sensu-operator-deployment.yaml @@ -66,13 +66,12 @@ spec: imagePullSecrets: - name: {{ .Values.imagePullSecret.name }} securityContext: - runAsUser: 1000 - runAsGroup: 1000 - fsGroup: 1000 - allowPrivilegeEscalation: false - runAsNonRoot: true - supplementalGroups: - - 1000 + runAsUser: 1000 + runAsGroup: 1000 + fsGroup: 1000 + runAsNonRoot: true + supplementalGroups: + - 1000 {{- if .Values.tolerations }} tolerations: {{ toYaml .Values.tolerations | indent 8 }} From 4dbce0c39bf74fccbabf6df6b1514240bbf104de Mon Sep 17 00:00:00 2001 From: Bhargavi-Chilaka Date: Wed, 22 Feb 2023 18:24:15 +0530 Subject: [PATCH 02/20] node version is updated --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 63cda94a..c241e639 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -32,7 +32,7 @@ orbs: jobs: markdownlint: docker: - - image: circleci/node:10.14.2 + - image: circleci/node:16.15.0 auth: username: ${DOCKER_USERNAME} password: ${DOCKER_PASSWORD} From afbcd01681d19ad7d511e4ebe9abb984b7187852 Mon Sep 17 00:00:00 2001 From: Bhargavi-Chilaka Date: Wed, 22 Feb 2023 18:34:07 +0530 Subject: [PATCH 03/20] node version is updated in circleci --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c241e639..08f661be 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -32,7 +32,7 @@ orbs: jobs: markdownlint: docker: - - image: circleci/node:16.15.0 + - image: cimg/node:18.14.1 auth: username: ${DOCKER_USERNAME} password: ${DOCKER_PASSWORD} From 02809fe893bfffe0f51fa30a12da6c582d5189c4 Mon Sep 17 00:00:00 2001 From: Bhargavi-Chilaka Date: Wed, 22 Feb 2023 18:37:18 +0530 Subject: [PATCH 04/20] node version is updated in circleci --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 08f661be..d2c21d70 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -32,7 +32,7 @@ orbs: jobs: markdownlint: docker: - - image: cimg/node:18.14.1 + - image: cimg/node:10.14.2 auth: username: ${DOCKER_USERNAME} password: ${DOCKER_PASSWORD} From 125a6ab71052204e553bd3ef4b5e2a338ecc95dd Mon Sep 17 00:00:00 2001 From: Bhargavi-Chilaka Date: Wed, 22 Feb 2023 18:40:16 +0530 Subject: [PATCH 05/20] node version is updated in circleci --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d2c21d70..08f661be 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -32,7 +32,7 @@ orbs: jobs: markdownlint: docker: - - image: cimg/node:10.14.2 + - image: cimg/node:18.14.1 auth: username: ${DOCKER_USERNAME} password: ${DOCKER_PASSWORD} From cccc4b73fc8c85027e79579e3419e5921b64aa86 Mon Sep 17 00:00:00 2001 From: Bhargavi-Chilaka Date: Wed, 22 Feb 2023 19:00:46 +0530 Subject: [PATCH 06/20] docker envs are upadate --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 08f661be..1eccc681 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -86,7 +86,7 @@ jobs: - run: name: docker login command: | - docker login -u $DOCKER_USER -p $DOCKER_PASS + docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD - run: name: docker build and push command: | From cac2f3259592bc6b3264bf88c3c0e2d7830c4886 Mon Sep 17 00:00:00 2001 From: Bhargavi-Chilaka Date: Thu, 23 Feb 2023 15:22:40 +0530 Subject: [PATCH 07/20] prometheus is disabled --- helm/sensu-operator/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/sensu-operator/values.yaml b/helm/sensu-operator/values.yaml index 8e2cb38f..35735d33 100644 --- a/helm/sensu-operator/values.yaml +++ b/helm/sensu-operator/values.yaml @@ -53,4 +53,4 @@ sensu: processingRetries: 5 prometheus: - enabled: true + enabled: false From 9eb182d6a4eafdf869ac4d59121c2f482bdad9f5 Mon Sep 17 00:00:00 2001 From: Bhargavi-Chilaka Date: Thu, 23 Feb 2023 16:50:53 +0530 Subject: [PATCH 08/20] updated values.yaml --- helm/sensu-operator/values.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/helm/sensu-operator/values.yaml b/helm/sensu-operator/values.yaml index 35735d33..915d0b0e 100644 --- a/helm/sensu-operator/values.yaml +++ b/helm/sensu-operator/values.yaml @@ -27,17 +27,17 @@ resourceSettings: logLevel: info -nodeSelector: - node-role.kubernetes.io/platform_worker: "true" +#nodeSelector: +# node-role.kubernetes.io/platform_worker: "true" tolerations: - effect: NoSchedule key: node_role operator: Equal - value: platform_worker + value: product_worker rbac: - clusterRole: sensu-operator + clusterRole: sensu sensu: logLevel: info From 041b96574412d381fde4a872aa4fd9094d4e81aa Mon Sep 17 00:00:00 2001 From: Bhargavi-Chilaka Date: Fri, 24 Feb 2023 22:13:17 +0530 Subject: [PATCH 09/20] dns upadated --- example/deployment.yaml | 10 +++++++++- .../example-sensu-cluster-objectrocket.yaml | 12 +++++++----- helm/sensu-operator/Chart.yaml | 1 + pkg/cluster/cluster.go | 2 +- pkg/sensu_client/client.go | 2 +- pkg/sensu_client/client_test.go | 10 +++++----- pkg/util/k8sutil/k8sutil.go | 19 +++++++++++++++---- 7 files changed, 39 insertions(+), 17 deletions(-) diff --git a/example/deployment.yaml b/example/deployment.yaml index b40f18c4..63a77b34 100644 --- a/example/deployment.yaml +++ b/example/deployment.yaml @@ -12,17 +12,23 @@ metadata: namespace: sensu --- -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: sensu-operator namespace: sensu spec: replicas: 1 + selector: + matchLabels: + app: sensu-operator + release: sensu-operato template: metadata: labels: name: sensu-operator + release: sensu-operator + app: sensu-operator spec: containers: - name: sensu-operator @@ -49,3 +55,5 @@ spec: value: "4" - name: SENSUOP_PROCESSING_RETRIES value: "5" + imagePullSecrets: + - name: 'or-docker-secret' diff --git a/example/example-sensu-cluster-objectrocket.yaml b/example/example-sensu-cluster-objectrocket.yaml index cf24d482..38fb227d 100644 --- a/example/example-sensu-cluster-objectrocket.yaml +++ b/example/example-sensu-cluster-objectrocket.yaml @@ -3,7 +3,7 @@ kind: SensuCluster metadata: annotations: objectrocket.com/scope: clusterwide - name: platdev0 + name: orsensu namespace: sensu spec: pod: @@ -14,7 +14,9 @@ spec: resources: requests: storage: 8Gi - storageClassName: standard - repository: sensu/sensu - size: 1 - version: 5.14.0 + storageClassName: gp2 + repository: objectrocket/sensu-backend + size: 5 + version: 5.20.2_or2 + clusteradminusername: admin + clusteradminpassword: p@ssw0rd! diff --git a/helm/sensu-operator/Chart.yaml b/helm/sensu-operator/Chart.yaml index ff0e3f2b..7bd04f6d 100644 --- a/helm/sensu-operator/Chart.yaml +++ b/helm/sensu-operator/Chart.yaml @@ -1,3 +1,4 @@ +apiversion: v2 name: sensu-operator version: 0.0.0 description: ObjectRocket Sensu Operator diff --git a/pkg/cluster/cluster.go b/pkg/cluster/cluster.go index a87686b9..41a61a93 100644 --- a/pkg/cluster/cluster.go +++ b/pkg/cluster/cluster.go @@ -556,7 +556,7 @@ func (c *Cluster) ClientURLs(m *etcdutil.MemberConfig) (urls []string) { } func (c *Cluster) PeerURL(m *etcdutil.MemberConfig, ordinalID int) string { - return fmt.Sprintf("%s://%s.%s.%s.svc:2380", + return fmt.Sprintf("%s://%s.%s.%s.svc.cluster.local:2380", m.PeerScheme(), c.memberName(ordinalID), c.name(), diff --git a/pkg/sensu_client/client.go b/pkg/sensu_client/client.go index d1feebc3..f1628a29 100644 --- a/pkg/sensu_client/client.go +++ b/pkg/sensu_client/client.go @@ -80,7 +80,7 @@ func (s *SensuClient) SetTimeout(t time.Duration) { } func (s *SensuClient) makeFullyQualifiedSensuClientURL() string { - return fmt.Sprintf("%s.%s.svc", k8sutil.APIServiceName(s.clusterName), s.namespace) + return fmt.Sprintf("%s.%s.svc.cluster.local", k8sutil.APIServiceName(s.clusterName), s.namespace) } func (s *SensuClient) ensureCredentials() (err error) { diff --git a/pkg/sensu_client/client_test.go b/pkg/sensu_client/client_test.go index 4ca5211f..c19a7523 100644 --- a/pkg/sensu_client/client_test.go +++ b/pkg/sensu_client/client_test.go @@ -103,7 +103,7 @@ func TestNew(t *testing.T) { func TestSensuClient_makeFullyQualifiedSensuClientURL(t *testing.T) { conf := basic.Config{ Cluster: basic.Cluster{ - APIUrl: "http://testCluster.testnamespace.svc:8080", + APIUrl: "http://testCluster.testnamespace.svc.cluster.local:8080", }, Profile: basic.Profile{ Format: "json", @@ -138,7 +138,7 @@ func TestSensuClient_makeFullyQualifiedSensuClientURL(t *testing.T) { Logger: logger, }, }, - "testCluster-api.testnamespace.svc", + "testCluster-api.testnamespace.svc.cluster.local", }, } for _, tt := range tests { @@ -159,7 +159,7 @@ func TestSensuClient_makeFullyQualifiedSensuClientURL(t *testing.T) { func TestSensuClient_ensureCredentials(t *testing.T) { conf := basic.Config{ Cluster: basic.Cluster{ - APIUrl: "http://testCluster.testnamespace.svc:8080", + APIUrl: "http://testCluster.testnamespace.svc.cluster.local:8080", Tokens: &types.Tokens{ Access: "fake", }, @@ -171,7 +171,7 @@ func TestSensuClient_ensureCredentials(t *testing.T) { } confNoToken := basic.Config{ Cluster: basic.Cluster{ - APIUrl: "http://testCluster.testnamespace.svc:8080", + APIUrl: "http://testCluster.testnamespace.svc.cluster.local:8080", }, Profile: basic.Profile{ Format: "json", @@ -243,7 +243,7 @@ func TestSensuClient_ensureCredentials(t *testing.T) { func TestSensuClient_ensureNamespace(t *testing.T) { conf := basic.Config{ Cluster: basic.Cluster{ - APIUrl: "http://testCluster.testnamespace.svc:8080", + APIUrl: "http://testCluster.testnamespace.svc.cluster.local:8080", Tokens: &types.Tokens{ Access: "fake", }, diff --git a/pkg/util/k8sutil/k8sutil.go b/pkg/util/k8sutil/k8sutil.go index 2d59694c..a6176f41 100644 --- a/pkg/util/k8sutil/k8sutil.go +++ b/pkg/util/k8sutil/k8sutil.go @@ -501,6 +501,11 @@ etcd-key-file: %[1]s/server.key Name: "etcsensu", MountPath: "/etc/sensu", } + configVolumeMountData := v1.VolumeMount{ + Name: "etcd-data", + MountPath: "/var/lib/sensu/etcd", + } + container := containerWithProbes( sensuContainer(strings.Split(commands, " "), cs.Repository, cs.Version, cs.ClusterAdminUsername, cs.ClusterAdminPassword), livenessProbe, @@ -564,7 +569,7 @@ etcd-key-file: %[1]s/server.key TIMEOUT_READY=%d SUBDOMAIN=%s NAMESPACE=%s - LOCAL_HOSTNAME=$(hostname).${SUBDOMAIN}.${NAMESPACE}.svc + LOCAL_HOSTNAME=$(hostname).${SUBDOMAIN}.${NAMESPACE}.svc.cluster.local while ( ! nslookup $LOCAL_HOSTNAME ) do # If TIMEOUT_READY is 0 we should never time out and exit @@ -595,9 +600,9 @@ ORDINAL=${HOSTNAME##*-} TOKEN=%s SUBDOMAIN=%s NAMESPACE=%s -LOCAL_HOSTNAME=${HOSTNAME}.${SUBDOMAIN}.${NAMESPACE}.svc +LOCAL_HOSTNAME=${HOSTNAME}.${SUBDOMAIN}.${NAMESPACE}.svc.cluster.local SEED_NAME=${SUBDOMAIN}-0 -SEED_HOSTNAME=${SEED_NAME}.${SUBDOMAIN}.${NAMESPACE}.svc +SEED_HOSTNAME=${SEED_NAME}.${SUBDOMAIN}.${NAMESPACE}.svc.cluster.local INITIAL_CLUSTER="${SEED_NAME}=http://${SEED_HOSTNAME}:2380" STATE="new" if [[ "$ORDINAL" == "0" ]] @@ -607,7 +612,7 @@ else STATE="existing" for i in $(seq 1 $ORDINAL) do - INITIAL_CLUSTER=${INITIAL_CLUSTER},${SUBDOMAIN}-${i}=http://${SUBDOMAIN}-${i}.${SUBDOMAIN}.${NAMESPACE}.svc:2380 + INITIAL_CLUSTER=${INITIAL_CLUSTER},${SUBDOMAIN}-${i}=http://${SUBDOMAIN}-${i}.${SUBDOMAIN}.${NAMESPACE}.svc.cluster.local:2380 done fi if [[ "${STATE}" == "new" ]] @@ -621,6 +626,12 @@ cat /etc/sensu/backend.yml `, token, clusterName, m.Namespace, options)}, VolumeMounts: []v1.VolumeMount{configVolumeMount}, }, + { + Image: imageNameBusybox(cs.Pod), + Name: "volume-mount-hack", + Command: []string{"sh", "-c", "chown -R 1000:1000 /var/lib/sensu/etcd;"}, + VolumeMounts: []v1.VolumeMount{configVolumeMountData}, + }, }, Containers: []v1.Container{container}, RestartPolicy: v1.RestartPolicyAlways, From d29e7b8dd84660cf5ee0a4192715ec995adb9470 Mon Sep 17 00:00:00 2001 From: Bhargavi-Chilaka Date: Fri, 24 Feb 2023 22:23:02 +0530 Subject: [PATCH 10/20] dns upadated --- pkg/sensu_client/client_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/sensu_client/client_test.go b/pkg/sensu_client/client_test.go index c19a7523..4ca0beb5 100644 --- a/pkg/sensu_client/client_test.go +++ b/pkg/sensu_client/client_test.go @@ -36,7 +36,7 @@ func (c *sensuAPITestClient) CreateNamespace(ns *types.Namespace) error { func TestNew(t *testing.T) { conf := basic.Config{ Cluster: basic.Cluster{ - APIUrl: "http://testCluster-api.testnamespace.svc:8080", + APIUrl: "http://testCluster-api.testnamespace.svc.cluster.local:8080", }, Profile: basic.Profile{ Format: "json", From cd1ddabc46eb337f9ded9f4c067e6acefdf87540 Mon Sep 17 00:00:00 2001 From: Bhargavi-Chilaka Date: Fri, 24 Feb 2023 22:40:45 +0530 Subject: [PATCH 11/20] api version updated --- helm/sensu-operator/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/sensu-operator/Chart.yaml b/helm/sensu-operator/Chart.yaml index 7bd04f6d..6a8451b9 100644 --- a/helm/sensu-operator/Chart.yaml +++ b/helm/sensu-operator/Chart.yaml @@ -1,4 +1,4 @@ -apiversion: v2 +apiversion: v1 name: sensu-operator version: 0.0.0 description: ObjectRocket Sensu Operator From 5a83cedec2365c37069f80d74b409a68adc6b56e Mon Sep 17 00:00:00 2001 From: Bhargavi-Chilaka Date: Fri, 24 Feb 2023 22:55:21 +0530 Subject: [PATCH 12/20] api version updated --- helm/sensu-operator/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/sensu-operator/Chart.yaml b/helm/sensu-operator/Chart.yaml index 6a8451b9..20946bc7 100644 --- a/helm/sensu-operator/Chart.yaml +++ b/helm/sensu-operator/Chart.yaml @@ -1,4 +1,4 @@ -apiversion: v1 +apiVersion: v1 name: sensu-operator version: 0.0.0 description: ObjectRocket Sensu Operator From 84faccf343bad4093a916055fa8ed134a136be26 Mon Sep 17 00:00:00 2001 From: Swapnika Katamreddy Date: Fri, 3 Mar 2023 18:14:36 +0530 Subject: [PATCH 13/20] Update values.yaml and k8sutil.go --- helm/sensu-operator/values.yaml | 2 +- pkg/util/k8sutil/k8sutil.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/helm/sensu-operator/values.yaml b/helm/sensu-operator/values.yaml index 915d0b0e..05c756d4 100644 --- a/helm/sensu-operator/values.yaml +++ b/helm/sensu-operator/values.yaml @@ -37,7 +37,7 @@ tolerations: value: product_worker rbac: - clusterRole: sensu + clusterRole: sensu-operator sensu: logLevel: info diff --git a/pkg/util/k8sutil/k8sutil.go b/pkg/util/k8sutil/k8sutil.go index a6176f41..16e750cc 100644 --- a/pkg/util/k8sutil/k8sutil.go +++ b/pkg/util/k8sutil/k8sutil.go @@ -693,7 +693,7 @@ func InClusterConfig() (*rest.Config, error) { // Work around https://github.com/kubernetes/kubernetes/issues/40973 // See https://github.com/sensu/sensu-operator/issues/731#issuecomment-283804819 if len(os.Getenv("KUBERNETES_SERVICE_HOST")) == 0 { - addrs, err := net.LookupHost("kubernetes.default.svc") + addrs, err := net.LookupHost("kubernetes.default.svc.cluster.local") if err != nil { panic(err) } From 4f14a242affd25f316fd79cd4cbde3595c456df2 Mon Sep 17 00:00:00 2001 From: Swapnika Katamreddy Date: Tue, 7 Mar 2023 19:05:40 +0530 Subject: [PATCH 14/20] Version updated --- Makefile | 2 +- example/deployment.yaml | 6 +++--- helm/sensu-operator/Chart.yaml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 1985cb41..f24aac70 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ DOCKER := $(shell command -v docker) DOCKER_IMAGE = objectrocket/sensu-operator # allow builds without tags -IMAGE_VERSION ?= latest +IMAGE_VERSION ?= 0.10.2-rc9 # Test if the dependencies we need to run this Makefile are installed deps-development: diff --git a/example/deployment.yaml b/example/deployment.yaml index 63a77b34..4ac0d6aa 100644 --- a/example/deployment.yaml +++ b/example/deployment.yaml @@ -22,7 +22,7 @@ spec: selector: matchLabels: app: sensu-operator - release: sensu-operato + release: sensu-operator template: metadata: labels: @@ -32,8 +32,8 @@ spec: spec: containers: - name: sensu-operator - image: objectrocket/sensu-operator:latest - imagePullPolicy: Never + image: objectrocket/sensu-operator:0.10.2-rc9 + imagePullPolicy: Always env: - name: MY_POD_NAMESPACE valueFrom: diff --git a/helm/sensu-operator/Chart.yaml b/helm/sensu-operator/Chart.yaml index 20946bc7..1a897baf 100644 --- a/helm/sensu-operator/Chart.yaml +++ b/helm/sensu-operator/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: sensu-operator -version: 0.0.0 +version: 0.10.2-rc9 description: ObjectRocket Sensu Operator keywords: - ObjectRocket @@ -16,4 +16,4 @@ maintainers: # (optional) url: objectrocket.com engine: gotpl # The name of the template engine (optional, defaults to gotpl) deprecated: false -appVersion: 0.0.0 +appVersion: 0.10.2-rc9 From 23829771013126f51241620fcec0bb04afcb1be9 Mon Sep 17 00:00:00 2001 From: Swapnika Katamreddy Date: Tue, 7 Mar 2023 19:24:09 +0530 Subject: [PATCH 15/20] Version Updated --- Makefile | 2 +- example/deployment.yaml | 2 +- helm/sensu-operator/Chart.yaml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index f24aac70..fe353ec3 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ DOCKER := $(shell command -v docker) DOCKER_IMAGE = objectrocket/sensu-operator # allow builds without tags -IMAGE_VERSION ?= 0.10.2-rc9 +IMAGE_VERSION ?= 0.10.2-rc10 # Test if the dependencies we need to run this Makefile are installed deps-development: diff --git a/example/deployment.yaml b/example/deployment.yaml index 4ac0d6aa..90e51eaf 100644 --- a/example/deployment.yaml +++ b/example/deployment.yaml @@ -32,7 +32,7 @@ spec: spec: containers: - name: sensu-operator - image: objectrocket/sensu-operator:0.10.2-rc9 + image: objectrocket/sensu-operator:0.10.2-rc10 imagePullPolicy: Always env: - name: MY_POD_NAMESPACE diff --git a/helm/sensu-operator/Chart.yaml b/helm/sensu-operator/Chart.yaml index 1a897baf..1658b9db 100644 --- a/helm/sensu-operator/Chart.yaml +++ b/helm/sensu-operator/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: sensu-operator -version: 0.10.2-rc9 +version: 0.0.0 description: ObjectRocket Sensu Operator keywords: - ObjectRocket @@ -16,4 +16,4 @@ maintainers: # (optional) url: objectrocket.com engine: gotpl # The name of the template engine (optional, defaults to gotpl) deprecated: false -appVersion: 0.10.2-rc9 +appVersion: 0.10.2-rc10 From 7641071870ce689445f64145ff4582ca55fd0b0f Mon Sep 17 00:00:00 2001 From: Bhargavi-Chilaka Date: Fri, 10 Mar 2023 14:57:23 +0530 Subject: [PATCH 16/20] Image version updated --- Makefile | 2 +- example/deployment.yaml | 2 +- helm/sensu-operator/Chart.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index fe353ec3..1985cb41 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ DOCKER := $(shell command -v docker) DOCKER_IMAGE = objectrocket/sensu-operator # allow builds without tags -IMAGE_VERSION ?= 0.10.2-rc10 +IMAGE_VERSION ?= latest # Test if the dependencies we need to run this Makefile are installed deps-development: diff --git a/example/deployment.yaml b/example/deployment.yaml index 90e51eaf..ac2db4a5 100644 --- a/example/deployment.yaml +++ b/example/deployment.yaml @@ -32,7 +32,7 @@ spec: spec: containers: - name: sensu-operator - image: objectrocket/sensu-operator:0.10.2-rc10 + image: objectrocket/sensu-operator:latest imagePullPolicy: Always env: - name: MY_POD_NAMESPACE diff --git a/helm/sensu-operator/Chart.yaml b/helm/sensu-operator/Chart.yaml index 1658b9db..20946bc7 100644 --- a/helm/sensu-operator/Chart.yaml +++ b/helm/sensu-operator/Chart.yaml @@ -16,4 +16,4 @@ maintainers: # (optional) url: objectrocket.com engine: gotpl # The name of the template engine (optional, defaults to gotpl) deprecated: false -appVersion: 0.10.2-rc10 +appVersion: 0.0.0 From fdb0758758b604f207d14eab80acb127d3f63ba1 Mon Sep 17 00:00:00 2001 From: Bhargavi-Chilaka Date: Thu, 23 Mar 2023 17:35:31 +0530 Subject: [PATCH 17/20] namespace changed --- example/example-sensu-cluster-objectrocket.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/example-sensu-cluster-objectrocket.yaml b/example/example-sensu-cluster-objectrocket.yaml index 38fb227d..2003dc52 100644 --- a/example/example-sensu-cluster-objectrocket.yaml +++ b/example/example-sensu-cluster-objectrocket.yaml @@ -3,7 +3,7 @@ kind: SensuCluster metadata: annotations: objectrocket.com/scope: clusterwide - name: orsensu + name: sensu namespace: sensu spec: pod: From 318728a3684664bc4627f9c6ed98574db2220db1 Mon Sep 17 00:00:00 2001 From: Biswajit Mohanty Date: Mon, 27 Mar 2023 14:03:05 +0530 Subject: [PATCH 18/20] volume removed --- pkg/util/k8sutil/k8sutil.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pkg/util/k8sutil/k8sutil.go b/pkg/util/k8sutil/k8sutil.go index 16e750cc..d7db2f77 100644 --- a/pkg/util/k8sutil/k8sutil.go +++ b/pkg/util/k8sutil/k8sutil.go @@ -625,13 +625,7 @@ EOL cat /etc/sensu/backend.yml `, token, clusterName, m.Namespace, options)}, VolumeMounts: []v1.VolumeMount{configVolumeMount}, - }, - { - Image: imageNameBusybox(cs.Pod), - Name: "volume-mount-hack", - Command: []string{"sh", "-c", "chown -R 1000:1000 /var/lib/sensu/etcd;"}, - VolumeMounts: []v1.VolumeMount{configVolumeMountData}, - }, + } }, Containers: []v1.Container{container}, RestartPolicy: v1.RestartPolicyAlways, From 68e5ec8071405749f60beb8f0093cbb31ea501ec Mon Sep 17 00:00:00 2001 From: Biswajit Mohanty Date: Mon, 27 Mar 2023 14:06:26 +0530 Subject: [PATCH 19/20] volume removed --- pkg/util/k8sutil/k8sutil.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/util/k8sutil/k8sutil.go b/pkg/util/k8sutil/k8sutil.go index d7db2f77..11f3604e 100644 --- a/pkg/util/k8sutil/k8sutil.go +++ b/pkg/util/k8sutil/k8sutil.go @@ -625,7 +625,8 @@ EOL cat /etc/sensu/backend.yml `, token, clusterName, m.Namespace, options)}, VolumeMounts: []v1.VolumeMount{configVolumeMount}, - } + }, + }, Containers: []v1.Container{container}, RestartPolicy: v1.RestartPolicyAlways, From a9b7b1ba635e093d68f1940484dc56113f5041e4 Mon Sep 17 00:00:00 2001 From: Biswajit Mohanty Date: Mon, 27 Mar 2023 14:10:45 +0530 Subject: [PATCH 20/20] volume removed --- pkg/util/k8sutil/k8sutil.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/util/k8sutil/k8sutil.go b/pkg/util/k8sutil/k8sutil.go index 11f3604e..3002bcbe 100644 --- a/pkg/util/k8sutil/k8sutil.go +++ b/pkg/util/k8sutil/k8sutil.go @@ -501,10 +501,10 @@ etcd-key-file: %[1]s/server.key Name: "etcsensu", MountPath: "/etc/sensu", } - configVolumeMountData := v1.VolumeMount{ + /*configVolumeMountData := v1.VolumeMount{ Name: "etcd-data", MountPath: "/var/lib/sensu/etcd", - } + }*/ container := containerWithProbes( sensuContainer(strings.Split(commands, " "), cs.Repository, cs.Version, cs.ClusterAdminUsername, cs.ClusterAdminPassword),