From 7206174c745cce07babc36003143f704b86ad358 Mon Sep 17 00:00:00 2001 From: AWS Controllers for Kubernetes Bot <82905295+ack-bot@users.noreply.github.com> Date: Fri, 15 Sep 2023 11:45:13 -0700 Subject: [PATCH] Update to ACK runtime `v0.27.1`, code-generator `v0.27.1` (#249) ### Update to ACK runtime `v0.27.1`, code-generator `v0.27.1` ---------- * ACK code-generator `v0.27.1` [release notes](https://github.com/aws-controllers-k8s/code-generator/releases/tag/v0.27.1) * ACK runtime `v0.27.1` [release notes](https://github.com/aws-controllers-k8s/runtime/releases/tag/v0.27.1) ---------- NOTE: This PR increments the release version of service controller from `v1.2.3` to `v1.2.4` Once this PR is merged, release `v1.2.4` will be automatically created for `sagemaker-controller` **Please close this PR, if you do not want the new patch release for `sagemaker-controller`** ---------- #### stdout for `make build-controller`: ``` building ack-generate ... ok. ==== building sagemaker-controller ==== Copying common custom resource definitions into sagemaker Building Kubernetes API objects for sagemaker Generating deepcopy code for sagemaker Generating custom resource definitions for sagemaker Building service controller for sagemaker Generating RBAC manifests for sagemaker Running gofmt against generated code for sagemaker Updating additional GitHub repository maintenance files ==== building sagemaker-controller release artifacts ==== Building release artifacts for sagemaker-v1.2.4 Generating common custom resource definitions Generating custom resource definitions for sagemaker Generating RBAC manifests for sagemaker ``` ---------- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. --- 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/deployment.yaml | 15 +++++++-------- .../leader-election-role-binding.yaml | 2 +- helm/values.schema.json | 3 +++ helm/values.yaml | 19 ++++++++++++++++--- 9 files changed, 36 insertions(+), 20 deletions(-) diff --git a/apis/v1alpha1/ack-generate-metadata.yaml b/apis/v1alpha1/ack-generate-metadata.yaml index 044d9d97..6f67fad9 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-09-07T02:00:18Z" - build_hash: 2f2b5e916c59ae2a793a1cc9f9d7333b197c9549 + build_date: "2023-09-15T00:01:42Z" + build_hash: 892f29d00a4c4ad21a2fa32919921de18190979d go_version: go1.21.0 - version: v0.27.0 + version: v0.27.1 api_directory_checksum: 62a1b01c505efd55545d306c2353b9673ce344fb api_version: v1alpha1 aws_sdk_go_version: v1.44.218 diff --git a/config/controller/deployment.yaml b/config/controller/deployment.yaml index e757bbc0..3964b564 100644 --- a/config/controller/deployment.yaml +++ b/config/controller/deployment.yaml @@ -85,5 +85,6 @@ spec: terminationGracePeriodSeconds: 10 serviceAccountName: ack-sagemaker-controller hostIPC: false - hostNetwork: false hostPID: false + hostNetwork: false + dnsPolicy: ClusterFirst diff --git a/config/controller/kustomization.yaml b/config/controller/kustomization.yaml index 5c03393d..86c63894 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/sagemaker-controller - newTag: 1.2.3 + newTag: 1.2.4 diff --git a/helm/Chart.yaml b/helm/Chart.yaml index e0a5108b..cab5316e 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 name: sagemaker-chart description: A Helm chart for the ACK service controller for Amazon SageMaker (SageMaker) -version: 1.2.3 -appVersion: 1.2.3 +version: 1.2.4 +appVersion: 1.2.4 home: https://github.com/aws-controllers-k8s/sagemaker-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 63589d54..acf2dc1a 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/sagemaker-controller:1.2.3". +This chart deploys "public.ecr.aws/aws-controllers-k8s/sagemaker-controller:1.2.4". Check its status by running: kubectl --namespace {{ .Release.Namespace }} get pods -l "app.kubernetes.io/instance={{ .Release.Name }}" diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index 77a67eaa..f40b5f22 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -11,7 +11,7 @@ metadata: k8s-app: {{ include "app.name" . }} helm.sh/chart: {{ include "chart.name-version" . }} spec: - replicas: 1 + replicas: {{ .Values.deployment.replicas }} selector: matchLabels: app.kubernetes.io/name: {{ include "app.name" . }} @@ -48,8 +48,9 @@ spec: - "$(AWS_REGION)" - --aws-endpoint-url - "$(AWS_ENDPOINT_URL)" +{{- if .Values.log.enable_development_logging }} - --enable-development-logging - - "$(ENABLE_DEVELOPMENT_LOGGING)" +{{- end }} - --log-level - "$(ACK_LOG_LEVEL)" - --resource-tags @@ -58,10 +59,11 @@ spec: - "$(ACK_WATCH_NAMESPACE)" - --deletion-policy - "$(DELETION_POLICY)" +{{- if .Values.leaderElection.enabled }} - --enable-leader-election - - "$(ENABLE_LEADER_ELECTION)" - --leader-election-namespace - "$(LEADER_ELECTION_NAMESPACE)" +{{- end }} {{- if gt .Values.reconcile.defaultResyncPeriod 0.0 }} - --reconcile-default-resync-seconds - "$(RECONCILE_DEFAULT_RESYNC_SECONDS)" @@ -91,12 +93,8 @@ spec: value: {{ include "watch-namespace" . }} - name: DELETION_POLICY value: {{ .Values.deletionPolicy }} - - name: ENABLED_LEADER_ELECTION - value: {{ .Values.leaderElection.enabled | quote }} - name: LEADER_ELECTION_NAMESPACE value: {{ .Values.leaderElection.namespace | quote }} - - name: ACK_ENABLE_DEVELOPMENT_LOGGING - value: {{ .Values.log.enable_development_logging | quote }} - name: ACK_LOG_LEVEL value: {{ .Values.log.level | quote }} - name: ACK_RESOURCE_TAGS @@ -149,8 +147,9 @@ spec: priorityClassName: {{ .Values.deployment.priorityClassName }} {{ end -}} hostIPC: false - hostNetwork: false hostPID: false + hostNetwork: {{ .Values.deployment.hostNetwork }} + dnsPolicy: {{ .Values.deployment.dnsPolicy }} volumes: {{- if .Values.aws.credentials.secretName -}} - name: {{ .Values.aws.credentials.secretName }} diff --git a/helm/templates/leader-election-role-binding.yaml b/helm/templates/leader-election-role-binding.yaml index 8d6b1f57..94a3846c 100644 --- a/helm/templates/leader-election-role-binding.yaml +++ b/helm/templates/leader-election-role-binding.yaml @@ -14,5 +14,5 @@ roleRef: name: sagemaker-leader-election-role subjects: - kind: ServiceAccount - name: ack-sagemaker-controller + name: {{ include "service-account.name" . }} namespace: {{ .Release.Namespace }}{{- end }} diff --git a/helm/values.schema.json b/helm/values.schema.json index cba0a357..ac28b680 100644 --- a/helm/values.schema.json +++ b/helm/values.schema.json @@ -47,6 +47,9 @@ "minimum": 1, "maximum": 65535 }, + "replicas": { + "type": "integer" + }, "nodeSelector": { "type": "object" }, diff --git a/helm/values.yaml b/helm/values.yaml index 7b4d5dea..ee9be077 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -4,7 +4,7 @@ image: repository: public.ecr.aws/aws-controllers-k8s/sagemaker-controller - tag: 1.2.3 + tag: 1.2.4 pullPolicy: IfNotPresent pullSecrets: [] @@ -15,6 +15,10 @@ deployment: annotations: {} labels: {} containerPort: 8080 + # Number of Deployment replicas + # This determines how many instances of the controller will be running. It's recommended + # to enable leader election if you need to increase the number of replicas > 1 + replicas: 1 # Which nodeSelector to set? # See: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector nodeSelector: @@ -28,6 +32,15 @@ deployment: # Which priorityClassName to set? # See: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#pod-priority priorityClassName: "" + # Specifies the hostname of the Pod. + # If not specified, the pod's hostname will be set to a system-defined value. + hostNetwork: false + # Set DNS policy for the pod. + # Defaults to "ClusterFirst". + # Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. + # To have DNS options set along with hostNetwork, you have to specify DNS policy + # explicitly to 'ClusterFirstWithHostNet'. + dnsPolicy: ClusterFirst extraVolumes: [] extraVolumeMounts: [] @@ -52,7 +65,7 @@ deployment: # If "installScope: cluster" then these labels will be applied to ClusterRole role: labels: {} - + metrics: service: # Set to true to automatically create a Kubernetes Service resource for the @@ -80,7 +93,7 @@ aws: # Secret stringData key that contains the credentials secretKey: "credentials" # Profile used for AWS credentials - profile: "default" + profile: "default" # log level for the controller log: