Skip to content

Commit

Permalink
Update to ACK runtime v0.32.0, code-generator v0.32.1 (#263)
Browse files Browse the repository at this point in the history
### Update to ACK runtime `v0.32.0`, code-generator `v0.32.1`

----------

* ACK code-generator `v0.32.1` [release notes](https://github.com/aws-controllers-k8s/code-generator/releases/tag/v0.32.1)
* ACK runtime `v0.32.0` [release notes](https://github.com/aws-controllers-k8s/runtime/releases/tag/v0.32.0)

----------

NOTE:
This PR increments the release version of service controller from `v1.2.7` to `v1.2.8`

Once this PR is merged, release `v1.2.8` 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.8
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.
  • Loading branch information
ack-bot authored Mar 11, 2024
1 parent 8a77430 commit 3a86a3b
Show file tree
Hide file tree
Showing 12 changed files with 94 additions and 20 deletions.
6 changes: 3 additions & 3 deletions apis/v1alpha1/ack-generate-metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ack_generate_info:
build_date: "2024-02-24T00:04:37Z"
build_hash: f429bd95efc1c7286e7cc973dc174a30490a5521
build_date: "2024-03-06T21:33:47Z"
build_hash: a5ba3c851434263128a1464a2c41e528779eeefa
go_version: go1.22.0
version: v0.30.0-3-gf429bd9
version: v0.32.1
api_directory_checksum: 731faf4c5d6d6f5140b4e0786127df447f773217
api_version: v1alpha1
aws_sdk_go_version: v1.50.15
Expand Down
19 changes: 19 additions & 0 deletions cmd/controller/main.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions config/controller/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ spec:
- --enable-leader-election=$(ENABLE_LEADER_ELECTION)
- --leader-election-namespace
- "$(LEADER_ELECTION_NAMESPACE)"
- --reconcile-default-max-concurrent-syncs
- "$(RECONCILE_DEFAULT_MAX_CONCURRENT_SYNCS)"
image: controller:latest
name: controller
ports:
Expand Down Expand Up @@ -72,13 +74,27 @@ spec:
value: "false"
- name: LEADER_ELECTION_NAMESPACE
value: "ack-system"
- name: "RECONCILE_DEFAULT_MAX_CONCURRENT_SYNCS"
value: "1"
securityContext:
allowPrivilegeEscalation: false
privileged: false
runAsNonRoot: true
capabilities:
drop:
- ALL
livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
securityContext:
seccompProfile:
type: RuntimeDefault
Expand Down
2 changes: 1 addition & 1 deletion config/controller/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ kind: Kustomization
images:
- name: controller
newName: public.ecr.aws/aws-controllers-k8s/sagemaker-controller
newTag: 1.2.7
newTag: 1.2.8
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/aws-controllers-k8s/sagemaker-controller
go 1.21

require (
github.com/aws-controllers-k8s/runtime v0.30.0
github.com/aws-controllers-k8s/runtime v0.32.0
github.com/aws/aws-sdk-go v1.50.15
github.com/ghodss/yaml v1.0.0
github.com/go-logr/logr v1.4.1
Expand All @@ -14,7 +14,7 @@ require (
k8s.io/api v0.29.0
k8s.io/apimachinery v0.29.0
k8s.io/client-go v0.29.0
sigs.k8s.io/controller-runtime v0.17.0
sigs.k8s.io/controller-runtime v0.17.2
)

require (
Expand Down
10 changes: 4 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
github.com/aws-controllers-k8s/runtime v0.30.0 h1:AibYRdi/7xUA3t8BA0u8g+J+OioaTAT6R4Vq8hxLiYw=
github.com/aws-controllers-k8s/runtime v0.30.0/go.mod h1:Pv1ozlUaO11KO2mwPN/HzhAtZ70ZDE9UP24mjsbkul0=
github.com/aws/aws-sdk-go v1.49.0 h1:g9BkW1fo9GqKfwg2+zCD+TW/D36Ux+vtfJ8guF4AYmY=
github.com/aws/aws-sdk-go v1.49.0/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
github.com/aws-controllers-k8s/runtime v0.32.0 h1:R0dQs8vRlK50KZ7rgdExqExdlUgFSAzDT8q1HCxc1uc=
github.com/aws-controllers-k8s/runtime v0.32.0/go.mod h1:6qr9ULkjOHo0fTwEUkE+48IxHqNbHxvvf/9JzGoR8pM=
github.com/aws/aws-sdk-go v1.50.15 h1:wEMnPfEQQFaoIJwuO18zq/vtG4Ft7NxQ3r9xlEi/8zg=
github.com/aws/aws-sdk-go v1.50.15/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
Expand Down Expand Up @@ -219,8 +217,8 @@ k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/A
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA=
k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI=
k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
sigs.k8s.io/controller-runtime v0.17.0 h1:fjJQf8Ukya+VjogLO6/bNX9HE6Y2xpsO5+fyS26ur/s=
sigs.k8s.io/controller-runtime v0.17.0/go.mod h1:+MngTvIQQQhfXtwfdGw/UOQ/aIaqsYywfCINOtwMO/s=
sigs.k8s.io/controller-runtime v0.17.2 h1:FwHwD1CTUemg0pW2otk7/U5/i5m2ymzvOXdbeGOUvw0=
sigs.k8s.io/controller-runtime v0.17.2/go.mod h1:+MngTvIQQQhfXtwfdGw/UOQ/aIaqsYywfCINOtwMO/s=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4=
Expand Down
4 changes: 2 additions & 2 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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.7
appVersion: 1.2.7
version: 1.2.8
appVersion: 1.2.8
home: https://github.com/aws-controllers-k8s/sagemaker-controller
icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png
sources:
Expand Down
2 changes: 1 addition & 1 deletion helm/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ .Chart.Name }} has been installed.
This chart deploys "public.ecr.aws/aws-controllers-k8s/sagemaker-controller:1.2.7".
This chart deploys "public.ecr.aws/aws-controllers-k8s/sagemaker-controller:1.2.8".

Check its status by running:
kubectl --namespace {{ .Release.Namespace }} get pods -l "app.kubernetes.io/instance={{ .Release.Name }}"
Expand Down
3 changes: 2 additions & 1 deletion helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ If release name contains chart name it will be used as a full name.

{{/* The path the shared credentials file is mounted */}}
{{- define "ack-sagemaker-controller.aws.credentials.path" -}}
{{- printf "%s/%s" (include "aws.credentials.secret_mount_path" .) .Values.aws.credentials.secretKey -}}
{{ $secret_mount_path := include "ack-sagemaker-controller.aws.credentials.secret_mount_path" . }}
{{- printf "%s/%s" $secret_mount_path .Values.aws.credentials.secretKey -}}
{{- end -}}

{{/* The rules a of ClusterRole or Role */}}
Expand Down
32 changes: 30 additions & 2 deletions helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,21 @@ spec:
- --leader-election-namespace
- "$(LEADER_ELECTION_NAMESPACE)"
{{- end }}
{{- if gt .Values.reconcile.defaultResyncPeriod 0.0 }}
{{- if gt (int .Values.reconcile.defaultResyncPeriod) 0 }}
- --reconcile-default-resync-seconds
- "$(RECONCILE_DEFAULT_RESYNC_SECONDS)"
{{- end }}
{{- range $key, $value := .Values.reconcile.resourceResyncPeriods }}
- --reconcile-resource-resync-seconds
- "$(RECONCILE_RESOURCE_RESYNC_SECONDS_{{ $key | upper }})"
{{- end }}
{{- if gt (int .Values.reconcile.defaultMaxConcurrentSyncs) 0 }}
- --reconcile-default-max-concurrent-syncs
- "$(RECONCILE_DEFAULT_MAX_CONCURRENT_SYNCS)"
{{- end }}
{{- range $key, $value := .Values.reconcile.resourceMaxConcurrentSyncs }}
- --reconcile-resource-max-concurrent-syncs
- "$(RECONCILE_RESOURCE_MAX_CONCURRENT_SYNCS_{{ $key | upper }})"
{{- end }}
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
Expand Down Expand Up @@ -99,13 +107,21 @@ spec:
value: {{ .Values.log.level | quote }}
- name: ACK_RESOURCE_TAGS
value: {{ join "," .Values.resourceTags | quote }}
{{- if gt .Values.reconcile.defaultResyncPeriod 0.0 }}
{{- if gt (int .Values.reconcile.defaultResyncPeriod) 0 }}
- name: RECONCILE_DEFAULT_RESYNC_SECONDS
value: {{ .Values.reconcile.defaultResyncPeriod | quote }}
{{- end }}
{{- range $key, $value := .Values.reconcile.resourceResyncPeriods }}
- name: RECONCILE_RESOURCE_RESYNC_SECONDS_{{ $key | upper }}
value: {{ $key }}={{ $value }}
{{- end }}
{{- if gt (int .Values.reconcile.defaultMaxConcurrentSyncs) 0 }}
- name: RECONCILE_DEFAULT_MAX_CONCURRENT_SYNCS
value: {{ .Values.reconcile.defaultMaxConcurrentSyncs | quote }}
{{- end }}
{{- range $key, $value := .Values.reconcile.resourceMaxConcurrentSyncs }}
- name: RECONCILE_RESOURCE_MAX_CONCURRENT_SYNCS_{{ $key | upper }}
value: {{ $key }}={{ $value }}
{{- end }}
{{- if .Values.aws.credentials.secretName }}
- name: AWS_SHARED_CREDENTIALS_FILE
Expand All @@ -132,6 +148,18 @@ spec:
capabilities:
drop:
- ALL
livenessProbe:
httpGet:
path: /healthz
port: 8081
initialDelaySeconds: 15
periodSeconds: 20
readinessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
securityContext:
seccompProfile:
type: RuntimeDefault
Expand Down
8 changes: 7 additions & 1 deletion helm/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,19 @@
"enum": ["delete", "retain"]
},
"reconcile": {
"description": "Reconcile resync settings. Parameters to tune the controller's drift remediation period.",
"description": "Reconcile settings. This is used to configure the controller's reconciliation behavior. e.g resyncPeriod and maxConcurrentSyncs",
"properties": {
"defaultResyncPeriod": {
"type": "number"
},
"resourceResyncPeriods": {
"type": "object"
},
"defaultMaxConcurentSyncs": {
"type": "number"
},
"resourceMaxConcurrentSyncs": {
"type": "object"
}
},
"type": "object"
Expand Down
8 changes: 7 additions & 1 deletion helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

image:
repository: public.ecr.aws/aws-controllers-k8s/sagemaker-controller
tag: 1.2.7
tag: 1.2.8
pullPolicy: IfNotPresent
pullSecrets: []

Expand Down Expand Up @@ -128,6 +128,12 @@ reconcile:
# An object representing the reconcile resync configuration for each specific resource.
resourceResyncPeriods: {}

# The default number of concurrent syncs that a reconciler can perform.
defaultMaxConcurrentSyncs: 1
# An object representing the reconcile max concurrent syncs configuration for each specific
# resource.
resourceMaxConcurrentSyncs: {}

serviceAccount:
# Specifies whether a service account should be created
create: true
Expand Down

0 comments on commit 3a86a3b

Please sign in to comment.