From 23ae809cd60158ce5f40bf339bc628dd925b21aa Mon Sep 17 00:00:00 2001 From: AWS Controllers for Kubernetes Bot <82905295+ack-bot@users.noreply.github.com> Date: Thu, 15 Jun 2023 12:59:40 -0600 Subject: [PATCH] Update to ACK runtime `v0.26.0`, code-generator `v0.26.1` (#51) Co-authored-by: ci-robot --- apis/v1alpha1/ack-generate-metadata.yaml | 6 +++--- config/controller/deployment.yaml | 3 +++ config/controller/kustomization.yaml | 2 +- helm/Chart.yaml | 4 ++-- helm/templates/NOTES.txt | 2 +- helm/templates/_helpers.tpl | 2 +- helm/templates/deployment.yaml | 3 +++ helm/values.schema.json | 3 +++ helm/values.yaml | 8 ++++++-- pkg/resource/domain/resource.go | 2 +- 10 files changed, 24 insertions(+), 11 deletions(-) diff --git a/apis/v1alpha1/ack-generate-metadata.yaml b/apis/v1alpha1/ack-generate-metadata.yaml index 203f88a..104a0db 100755 --- a/apis/v1alpha1/ack-generate-metadata.yaml +++ b/apis/v1alpha1/ack-generate-metadata.yaml @@ -1,8 +1,8 @@ ack_generate_info: - build_date: "2023-05-01T22:43:30Z" - build_hash: 6657565bb742e5cd4cd340d01d5e4786b5fbabc0 + build_date: "2023-05-15T23:33:07Z" + build_hash: 8f3ba427974fd6e769926778d54834eaee3b81a3 go_version: go1.19 - version: v0.26.0 + version: v0.26.1 api_directory_checksum: 57450e5cda284334325fd5db32e833165d5426ae api_version: v1alpha1 aws_sdk_go_version: v1.44.93 diff --git a/config/controller/deployment.yaml b/config/controller/deployment.yaml index 392f0a3..ac63dff 100644 --- a/config/controller/deployment.yaml +++ b/config/controller/deployment.yaml @@ -73,6 +73,9 @@ spec: capabilities: drop: - ALL + securityContext: + seccompProfile: + type: RuntimeDefault terminationGracePeriodSeconds: 10 serviceAccountName: ack-opensearchservice-controller hostIPC: false diff --git a/config/controller/kustomization.yaml b/config/controller/kustomization.yaml index 93f424e..2f46c39 100644 --- a/config/controller/kustomization.yaml +++ b/config/controller/kustomization.yaml @@ -6,4 +6,4 @@ kind: Kustomization images: - name: controller newName: public.ecr.aws/aws-controllers-k8s/opensearchservice-controller - newTag: v0.0.15 + newTag: 0.0.16 diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 8488bc2..55a0b01 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 name: opensearchservice-chart description: A Helm chart for the ACK service controller for Amazon OpenSearch Service (OpenSearch) -version: v0.0.15 -appVersion: v0.0.15 +version: 0.0.16 +appVersion: 0.0.16 home: https://github.com/aws-controllers-k8s/opensearchservice-controller icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png sources: diff --git a/helm/templates/NOTES.txt b/helm/templates/NOTES.txt index 116a113..42169b9 100644 --- a/helm/templates/NOTES.txt +++ b/helm/templates/NOTES.txt @@ -1,5 +1,5 @@ {{ .Chart.Name }} has been installed. -This chart deploys "public.ecr.aws/aws-controllers-k8s/opensearchservice-controller:v0.0.15". +This chart deploys "public.ecr.aws/aws-controllers-k8s/opensearchservice-controller:0.0.16". Check its status by running: kubectl --namespace {{ .Release.Namespace }} get pods -l "app.kubernetes.io/instance={{ .Release.Name }}" diff --git a/helm/templates/_helpers.tpl b/helm/templates/_helpers.tpl index 973704c..391d5de 100644 --- a/helm/templates/_helpers.tpl +++ b/helm/templates/_helpers.tpl @@ -33,7 +33,7 @@ If release name contains chart name it will be used as a full name. {{- define "watch-namespace" -}} {{- if eq .Values.installScope "namespace" -}} -{{- .Release.Namespace -}} +{{ .Values.watchNamespace | default .Release.Namespace }} {{- end -}} {{- end -}} diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index b3c0ede..7504a61 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -116,6 +116,9 @@ spec: capabilities: drop: - ALL + securityContext: + seccompProfile: + type: RuntimeDefault terminationGracePeriodSeconds: 10 nodeSelector: {{ toYaml .Values.deployment.nodeSelector | nindent 8 }} {{ if .Values.deployment.tolerations -}} diff --git a/helm/values.schema.json b/helm/values.schema.json index d5a8d35..79fd18c 100644 --- a/helm/values.schema.json +++ b/helm/values.schema.json @@ -196,6 +196,9 @@ "type": "string", "enum": ["cluster", "namespace"] }, + "watchNamespace": { + "type": "string" + }, "resourceTags": { "type": "array", "items": { diff --git a/helm/values.yaml b/helm/values.yaml index 99f4a6e..da30253 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -4,7 +4,7 @@ image: repository: public.ecr.aws/aws-controllers-k8s/opensearchservice-controller - tag: v0.0.15 + tag: 0.0.16 pullPolicy: IfNotPresent pullSecrets: [] @@ -31,7 +31,7 @@ deployment: # If "installScope: cluster" then these labels will be applied to ClusterRole role: - labels: {} + labels: {} metrics: service: @@ -72,6 +72,10 @@ log: # cluster wide. installScope: cluster +# Set the value of the "namespace" to be watched by the controller +# This value is only used when the `installScope` is set to "namespace". If left empty, the default value is the release namespace for the chart. +watchNamespace: "" + resourceTags: # Configures the ACK service controller to always set key/value pairs tags on # resources that it manages. diff --git a/pkg/resource/domain/resource.go b/pkg/resource/domain/resource.go index faa7853..cce4c07 100644 --- a/pkg/resource/domain/resource.go +++ b/pkg/resource/domain/resource.go @@ -45,7 +45,7 @@ func (r *resource) Identifiers() acktypes.AWSResourceIdentifiers { } // IsBeingDeleted returns true if the Kubernetes resource has a non-zero -// deletion timestemp +// deletion timestamp func (r *resource) IsBeingDeleted() bool { return !r.ko.DeletionTimestamp.IsZero() }