diff --git a/.changelog/3793.changed.txt b/.changelog/3793.changed.txt new file mode 100644 index 0000000000..d062d80568 --- /dev/null +++ b/.changelog/3793.changed.txt @@ -0,0 +1 @@ +chore: update Sumo Logic Kubernetes Setup to v3.15.1 \ No newline at end of file diff --git a/deploy/helm/sumologic/values.yaml b/deploy/helm/sumologic/values.yaml index 284f72d4b7..9efed32101 100644 --- a/deploy/helm/sumologic/values.yaml +++ b/deploy/helm/sumologic/values.yaml @@ -98,7 +98,7 @@ sumologic: job: image: repository: public.ecr.aws/sumologic/kubernetes-setup - tag: 3.14.0 + tag: 3.15.1 pullPolicy: IfNotPresent ## Optionally specify an array of pullSecrets. ## They will be added to serviceaccount that is used for Sumo Logic's diff --git a/tests/helm/testdata/goldenfile/cleanup/basic.output.yaml b/tests/helm/testdata/goldenfile/cleanup/basic.output.yaml new file mode 100644 index 0000000000..39f4f1520e --- /dev/null +++ b/tests/helm/testdata/goldenfile/cleanup/basic.output.yaml @@ -0,0 +1,70 @@ +--- +# Source: sumologic/templates/cleanup/job.yaml +apiVersion: batch/v1 +kind: Job +metadata: + name: RELEASE-NAME-sumologic-cleanup + namespace: sumologic + annotations: + helm.sh/hook: pre-delete + helm.sh/hook-weight: "3" + helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded + labels: + app: RELEASE-NAME-sumologic-cleanup + chart: "sumologic-%CURRENT_CHART_VERSION%" + release: "RELEASE-NAME" + heritage: "Helm" +spec: + ttlSecondsAfterFinished: 120 + template: + metadata: + annotations: + labels: + spec: + restartPolicy: OnFailure + serviceAccountName: RELEASE-NAME-sumologic-cleanup + volumes: + - name: configmap + configMap: + name: RELEASE-NAME-sumologic-cleanup + defaultMode: 0777 + - name: cleanup + emptyDir: {} + initContainers: + - name: copy-files + image: public.ecr.aws/sumologic/busybox:latest + command: ["sh", "-c", "cp /configmap/* /etc/terraform"] + volumeMounts: + - name: configmap + mountPath: /configmap + - name: cleanup + mountPath: /etc/terraform + containers: + - name: cleanup + image: public.ecr.aws/sumologic/kubernetes-setup:3.15.1 + imagePullPolicy: IfNotPresent + volumeMounts: + - name: cleanup + mountPath: /etc/terraform + command: ["/etc/terraform/cleanup.sh"] + envFrom: + - secretRef: + name: RELEASE-NAME-sumologic-cleanup + env: + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: SUMOLOGIC_BASE_URL + value: + - name: SUMOLOGIC_COLLECTOR_NAME + value: kubernetes + - name: CHART_VERSION + value: "%CURRENT_CHART_VERSION%" + - name: SUMOLOGIC_SECRET_NAME + value: "sumologic" + + - name: NO_PROXY + value: kubernetes.default.svc + securityContext: + runAsUser: 1000 diff --git a/tests/helm/testdata/goldenfile/cleanup/sumologic-mock-no-secret.output.yaml b/tests/helm/testdata/goldenfile/cleanup/sumologic-mock-no-secret.output.yaml new file mode 100644 index 0000000000..872c28f2b7 --- /dev/null +++ b/tests/helm/testdata/goldenfile/cleanup/sumologic-mock-no-secret.output.yaml @@ -0,0 +1,70 @@ +--- +# Source: sumologic/templates/cleanup/job.yaml +apiVersion: batch/v1 +kind: Job +metadata: + name: RELEASE-NAME-sumologic-cleanup + namespace: sumologic + annotations: + helm.sh/hook: pre-delete + helm.sh/hook-weight: "3" + helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded + labels: + app: RELEASE-NAME-sumologic-cleanup + chart: "sumologic-%CURRENT_CHART_VERSION%" + release: "RELEASE-NAME" + heritage: "Helm" +spec: + ttlSecondsAfterFinished: 120 + template: + metadata: + annotations: + labels: + spec: + restartPolicy: OnFailure + serviceAccountName: RELEASE-NAME-sumologic-cleanup + volumes: + - name: configmap + configMap: + name: RELEASE-NAME-sumologic-cleanup + defaultMode: 0777 + - name: cleanup + emptyDir: {} + initContainers: + - name: copy-files + image: public.ecr.aws/sumologic/busybox:latest + command: ["sh", "-c", "cp /configmap/* /etc/terraform"] + volumeMounts: + - name: configmap + mountPath: /configmap + - name: cleanup + mountPath: /etc/terraform + containers: + - name: cleanup + image: public.ecr.aws/sumologic/kubernetes-setup:3.15.1 + imagePullPolicy: IfNotPresent + volumeMounts: + - name: cleanup + mountPath: /etc/terraform + command: ["/etc/terraform/cleanup.sh"] + envFrom: + - secretRef: + name: RELEASE-NAME-sumologic-cleanup + env: + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: SUMOLOGIC_BASE_URL + value: http://RELEASE-NAME-sumologic-mock.sumologic.svc.cluster.local.:3000/terraform/api/ + - name: SUMOLOGIC_COLLECTOR_NAME + value: kubernetes + - name: CHART_VERSION + value: "%CURRENT_CHART_VERSION%" + - name: SUMOLOGIC_SECRET_NAME + value: "sumologic" + + - name: NO_PROXY + value: kubernetes.default.svc + securityContext: + runAsUser: 1000 diff --git a/tests/helm/testdata/goldenfile/cleanup/sumologic-mock.output.yaml b/tests/helm/testdata/goldenfile/cleanup/sumologic-mock.output.yaml new file mode 100644 index 0000000000..e54124b33a --- /dev/null +++ b/tests/helm/testdata/goldenfile/cleanup/sumologic-mock.output.yaml @@ -0,0 +1,70 @@ +--- +# Source: sumologic/templates/cleanup/job.yaml +apiVersion: batch/v1 +kind: Job +metadata: + name: RELEASE-NAME-sumologic-cleanup + namespace: sumologic + annotations: + helm.sh/hook: pre-delete + helm.sh/hook-weight: "3" + helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded + labels: + app: RELEASE-NAME-sumologic-cleanup + chart: "sumologic-%CURRENT_CHART_VERSION%" + release: "RELEASE-NAME" + heritage: "Helm" +spec: + ttlSecondsAfterFinished: 120 + template: + metadata: + annotations: + labels: + spec: + restartPolicy: OnFailure + serviceAccountName: RELEASE-NAME-sumologic-cleanup + volumes: + - name: configmap + configMap: + name: RELEASE-NAME-sumologic-cleanup + defaultMode: 0777 + - name: cleanup + emptyDir: {} + initContainers: + - name: copy-files + image: myrepo:mytag + command: ["sh", "-c", "cp /configmap/* /etc/terraform"] + volumeMounts: + - name: configmap + mountPath: /configmap + - name: cleanup + mountPath: /etc/terraform + containers: + - name: cleanup + image: public.ecr.aws/sumologic/kubernetes-setup:3.15.1 + imagePullPolicy: IfNotPresent + volumeMounts: + - name: cleanup + mountPath: /etc/terraform + command: ["/etc/terraform/cleanup.sh"] + envFrom: + - secretRef: + name: RELEASE-NAME-sumologic-cleanup + env: + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: SUMOLOGIC_BASE_URL + value: http://RELEASE-NAME-sumologic-mock.sumologic.svc.cluster.local.:3000/terraform/api/ + - name: SUMOLOGIC_COLLECTOR_NAME + value: kubernetes + - name: CHART_VERSION + value: "%CURRENT_CHART_VERSION%" + - name: SUMOLOGIC_SECRET_NAME + value: "sumologic" + + - name: NO_PROXY + value: kubernetes.default.svc + securityContext: + runAsUser: 1000 diff --git a/tests/helm/testdata/goldenfile/setup/monitors_with_email_notifications.output.yaml b/tests/helm/testdata/goldenfile/setup/monitors_with_email_notifications.output.yaml new file mode 100644 index 0000000000..a74f846af9 --- /dev/null +++ b/tests/helm/testdata/goldenfile/setup/monitors_with_email_notifications.output.yaml @@ -0,0 +1,83 @@ +--- +# Source: sumologic/templates/setup/job.yaml +apiVersion: batch/v1 +kind: Job +metadata: + name: RELEASE-NAME-sumologic-setup + namespace: sumologic + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-weight: "3" + helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded + labels: + app: RELEASE-NAME-sumologic + chart: "sumologic-%CURRENT_CHART_VERSION%" + release: "RELEASE-NAME" + heritage: "Helm" +spec: + ttlSecondsAfterFinished: 120 + template: + metadata: + annotations: + labels: + spec: + restartPolicy: OnFailure + serviceAccountName: RELEASE-NAME-sumologic-setup + nodeSelector: + kubernetes.io/os: linux + volumes: + - name: setup + configMap: + name: RELEASE-NAME-sumologic-setup + defaultMode: 0777 + - name: custom + configMap: + name: RELEASE-NAME-sumologic-setup-custom + defaultMode: 0777 + containers: + - name: setup + image: public.ecr.aws/sumologic/kubernetes-setup:3.15.1 + imagePullPolicy: IfNotPresent + command: ["/etc/terraform/setup.sh"] + resources: + limits: + cpu: 2000m + memory: 256Mi + requests: + cpu: 200m + memory: 64Mi + volumeMounts: + - name: setup + mountPath: /etc/terraform + - name: custom + mountPath: /customer-scripts + envFrom: + - secretRef: + name: RELEASE-NAME-sumologic-setup + env: + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: SUMOLOGIC_BASE_URL + value: + - name: SUMOLOGIC_COLLECTOR_NAME + value: kubernetes + - name: SUMOLOGIC_SECRET_NAME + value: "sumologic" + - name: CHART_VERSION + value: "%CURRENT_CHART_VERSION%" + - name: SUMOLOGIC_MONITORS_ENABLED + value: "true" + - name: SUMOLOGIC_MONITORS_STATUS + value: "enabled" + - name: SUMOLOGIC_MONITORS_NOTIFICATIONS_RECIPIENTS + value: | + ["test@test.lh","email@locahost.lh"] + - name: SUMOLOGIC_DASHBOARDS_ENABLED + value: "true" + + - name: NO_PROXY + value: kubernetes.default.svc + securityContext: + runAsUser: 1000 diff --git a/tests/helm/testdata/goldenfile/setup/monitors_with_single_email.output.yaml b/tests/helm/testdata/goldenfile/setup/monitors_with_single_email.output.yaml new file mode 100644 index 0000000000..03ee27dcae --- /dev/null +++ b/tests/helm/testdata/goldenfile/setup/monitors_with_single_email.output.yaml @@ -0,0 +1,83 @@ +--- +# Source: sumologic/templates/setup/job.yaml +apiVersion: batch/v1 +kind: Job +metadata: + name: RELEASE-NAME-sumologic-setup + namespace: sumologic + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-weight: "3" + helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded + labels: + app: RELEASE-NAME-sumologic + chart: "sumologic-%CURRENT_CHART_VERSION%" + release: "RELEASE-NAME" + heritage: "Helm" +spec: + ttlSecondsAfterFinished: 120 + template: + metadata: + annotations: + labels: + spec: + restartPolicy: OnFailure + serviceAccountName: RELEASE-NAME-sumologic-setup + nodeSelector: + kubernetes.io/os: linux + volumes: + - name: setup + configMap: + name: RELEASE-NAME-sumologic-setup + defaultMode: 0777 + - name: custom + configMap: + name: RELEASE-NAME-sumologic-setup-custom + defaultMode: 0777 + containers: + - name: setup + image: public.ecr.aws/sumologic/kubernetes-setup:3.15.1 + imagePullPolicy: IfNotPresent + command: ["/etc/terraform/setup.sh"] + resources: + limits: + cpu: 2000m + memory: 256Mi + requests: + cpu: 200m + memory: 64Mi + volumeMounts: + - name: setup + mountPath: /etc/terraform + - name: custom + mountPath: /customer-scripts + envFrom: + - secretRef: + name: RELEASE-NAME-sumologic-setup + env: + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: SUMOLOGIC_BASE_URL + value: + - name: SUMOLOGIC_COLLECTOR_NAME + value: kubernetes + - name: SUMOLOGIC_SECRET_NAME + value: "sumologic" + - name: CHART_VERSION + value: "%CURRENT_CHART_VERSION%" + - name: SUMOLOGIC_MONITORS_ENABLED + value: "true" + - name: SUMOLOGIC_MONITORS_STATUS + value: "enabled" + - name: SUMOLOGIC_MONITORS_NOTIFICATIONS_RECIPIENTS + value: | + ["email@locahost.lh"] + - name: SUMOLOGIC_DASHBOARDS_ENABLED + value: "true" + + - name: NO_PROXY + value: kubernetes.default.svc + securityContext: + runAsUser: 1000 diff --git a/tests/helm/testdata/goldenfile/setup/setup/basic.output.yaml b/tests/helm/testdata/goldenfile/setup/setup/basic.output.yaml index 0b3473ef16..5534730d22 100644 --- a/tests/helm/testdata/goldenfile/setup/setup/basic.output.yaml +++ b/tests/helm/testdata/goldenfile/setup/setup/basic.output.yaml @@ -33,7 +33,7 @@ spec: defaultMode: 0777 containers: - name: setup - image: public.ecr.aws/sumologic/kubernetes-setup:3.14.0 + image: public.ecr.aws/sumologic/kubernetes-setup:3.15.1 imagePullPolicy: IfNotPresent command: ["/etc/terraform/setup.sh"] resources: diff --git a/tests/helm/testdata/goldenfile/setup/sumologic-mock-no-secret.output.yaml b/tests/helm/testdata/goldenfile/setup/sumologic-mock-no-secret.output.yaml new file mode 100644 index 0000000000..9249f0e937 --- /dev/null +++ b/tests/helm/testdata/goldenfile/setup/sumologic-mock-no-secret.output.yaml @@ -0,0 +1,80 @@ +--- +# Source: sumologic/templates/setup/job.yaml +apiVersion: batch/v1 +kind: Job +metadata: + name: RELEASE-NAME-sumologic-setup + namespace: sumologic + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-weight: "3" + helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded + labels: + app: RELEASE-NAME-sumologic + chart: "sumologic-%CURRENT_CHART_VERSION%" + release: "RELEASE-NAME" + heritage: "Helm" +spec: + ttlSecondsAfterFinished: 120 + template: + metadata: + annotations: + labels: + spec: + restartPolicy: OnFailure + serviceAccountName: RELEASE-NAME-sumologic-setup + nodeSelector: + kubernetes.io/os: linux + volumes: + - name: setup + configMap: + name: RELEASE-NAME-sumologic-setup + defaultMode: 0777 + - name: custom + configMap: + name: RELEASE-NAME-sumologic-setup-custom + defaultMode: 0777 + containers: + - name: setup + image: public.ecr.aws/sumologic/kubernetes-setup:3.15.1 + imagePullPolicy: IfNotPresent + command: ["/etc/terraform/setup.sh"] + resources: + limits: + cpu: 2000m + memory: 256Mi + requests: + cpu: 200m + memory: 64Mi + volumeMounts: + - name: setup + mountPath: /etc/terraform + - name: custom + mountPath: /customer-scripts + envFrom: + - secretRef: + name: RELEASE-NAME-sumologic-setup + env: + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: SUMOLOGIC_BASE_URL + value: http://RELEASE-NAME-sumologic-mock.sumologic.svc.cluster.local.:3000/terraform/api/ + - name: SUMOLOGIC_COLLECTOR_NAME + value: kubernetes + - name: SUMOLOGIC_SECRET_NAME + value: "sumologic" + - name: CHART_VERSION + value: "%CURRENT_CHART_VERSION%" + - name: SUMOLOGIC_MONITORS_ENABLED + value: "true" + - name: SUMOLOGIC_MONITORS_STATUS + value: "enabled" + - name: SUMOLOGIC_DASHBOARDS_ENABLED + value: "true" + + - name: NO_PROXY + value: kubernetes.default.svc + securityContext: + runAsUser: 1000 diff --git a/tests/helm/testdata/goldenfile/setup/sumologic-mock.output.yaml b/tests/helm/testdata/goldenfile/setup/sumologic-mock.output.yaml new file mode 100644 index 0000000000..9249f0e937 --- /dev/null +++ b/tests/helm/testdata/goldenfile/setup/sumologic-mock.output.yaml @@ -0,0 +1,80 @@ +--- +# Source: sumologic/templates/setup/job.yaml +apiVersion: batch/v1 +kind: Job +metadata: + name: RELEASE-NAME-sumologic-setup + namespace: sumologic + annotations: + helm.sh/hook: pre-install,pre-upgrade + helm.sh/hook-weight: "3" + helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded + labels: + app: RELEASE-NAME-sumologic + chart: "sumologic-%CURRENT_CHART_VERSION%" + release: "RELEASE-NAME" + heritage: "Helm" +spec: + ttlSecondsAfterFinished: 120 + template: + metadata: + annotations: + labels: + spec: + restartPolicy: OnFailure + serviceAccountName: RELEASE-NAME-sumologic-setup + nodeSelector: + kubernetes.io/os: linux + volumes: + - name: setup + configMap: + name: RELEASE-NAME-sumologic-setup + defaultMode: 0777 + - name: custom + configMap: + name: RELEASE-NAME-sumologic-setup-custom + defaultMode: 0777 + containers: + - name: setup + image: public.ecr.aws/sumologic/kubernetes-setup:3.15.1 + imagePullPolicy: IfNotPresent + command: ["/etc/terraform/setup.sh"] + resources: + limits: + cpu: 2000m + memory: 256Mi + requests: + cpu: 200m + memory: 64Mi + volumeMounts: + - name: setup + mountPath: /etc/terraform + - name: custom + mountPath: /customer-scripts + envFrom: + - secretRef: + name: RELEASE-NAME-sumologic-setup + env: + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: SUMOLOGIC_BASE_URL + value: http://RELEASE-NAME-sumologic-mock.sumologic.svc.cluster.local.:3000/terraform/api/ + - name: SUMOLOGIC_COLLECTOR_NAME + value: kubernetes + - name: SUMOLOGIC_SECRET_NAME + value: "sumologic" + - name: CHART_VERSION + value: "%CURRENT_CHART_VERSION%" + - name: SUMOLOGIC_MONITORS_ENABLED + value: "true" + - name: SUMOLOGIC_MONITORS_STATUS + value: "enabled" + - name: SUMOLOGIC_DASHBOARDS_ENABLED + value: "true" + + - name: NO_PROXY + value: kubernetes.default.svc + securityContext: + runAsUser: 1000