diff --git a/OWNERS b/OWNERS index e949ede1..76d2e027 100644 --- a/OWNERS +++ b/OWNERS @@ -3,4 +3,4 @@ approvers: - core-ack-team reviewers: - - sagemaker-ack-team + - sagemaker-ack-team \ No newline at end of file diff --git a/OWNERS_ALIASES b/OWNERS_ALIASES index b9eaa727..90f1080e 100644 --- a/OWNERS_ALIASES +++ b/OWNERS_ALIASES @@ -19,4 +19,4 @@ aliases: - surajkota - ryansteakley - ananth102 - - sirutBuasai + - sirutBuasai \ No newline at end of file diff --git a/apis/v1alpha1/ack-generate-metadata.yaml b/apis/v1alpha1/ack-generate-metadata.yaml index 48e941bf..a501ec43 100755 --- a/apis/v1alpha1/ack-generate-metadata.yaml +++ b/apis/v1alpha1/ack-generate-metadata.yaml @@ -1,8 +1,8 @@ ack_generate_info: - build_date: "2025-11-07T20:37:17Z" - build_hash: eaabefb6bd7b2be8a1baf4478f22b3310e6921c8 - go_version: go1.25.0 - version: v0.52.0-6-geaabefb + build_date: "2025-11-12T22:32:38Z" + build_hash: c833f2d14f4fe8953663ff92f4661ae5fb01b8c8 + go_version: go1.25.4 + version: v0.53.1 api_directory_checksum: cdae97bbaa2ee28d0f130fa6ce3a7dfbf6393d1b api_version: v1alpha1 aws_sdk_go_version: v1.39.2 diff --git a/config/controller/deployment.yaml b/config/controller/deployment.yaml index d03d158a..a9b96ddf 100644 --- a/config/controller/deployment.yaml +++ b/config/controller/deployment.yaml @@ -43,6 +43,7 @@ spec: - "$(RECONCILE_DEFAULT_MAX_CONCURRENT_SYNCS)" - --feature-gates - "$(FEATURE_GATES)" + - --enable-carm=$(ENABLE_CARM) image: controller:latest name: controller ports: @@ -80,6 +81,8 @@ spec: value: "1" - name: "FEATURE_GATES" value: "" + - name: "ENABLE_CARM" + value: "true" securityContext: allowPrivilegeEscalation: false privileged: false diff --git a/config/controller/kustomization.yaml b/config/controller/kustomization.yaml index 25af2753..b715e519 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.5.0 + newTag: 1.5.1 diff --git a/config/crd/common/bases/services.k8s.aws_iamroleselectors.yaml b/config/crd/common/bases/services.k8s.aws_iamroleselectors.yaml new file mode 100644 index 00000000..9477c900 --- /dev/null +++ b/config/crd/common/bases/services.k8s.aws_iamroleselectors.yaml @@ -0,0 +1,90 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.19.0 + name: iamroleselectors.services.k8s.aws +spec: + group: services.k8s.aws + names: + kind: IAMRoleSelector + listKind: IAMRoleSelectorList + plural: iamroleselectors + singular: iamroleselector + scope: Cluster + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: IAMRoleSelector is the schema for the IAMRoleSelector API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + properties: + arn: + type: string + x-kubernetes-validations: + - message: Value is immutable once set + rule: self == oldSelf + namespaceSelector: + description: IAMRoleSelectorSpec defines the desired state of IAMRoleSelector + properties: + labelSelector: + description: LabelSelector is a label query over a set of resources. + properties: + matchLabels: + additionalProperties: + type: string + type: object + required: + - matchLabels + type: object + names: + items: + type: string + type: array + required: + - names + type: object + resourceTypeSelector: + items: + properties: + group: + type: string + kind: + type: string + version: + type: string + required: + - group + - kind + - version + type: object + type: array + required: + - arn + type: object + status: + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/config/crd/common/kustomization.yaml b/config/crd/common/kustomization.yaml index b2ede7b9..8165534d 100644 --- a/config/crd/common/kustomization.yaml +++ b/config/crd/common/kustomization.yaml @@ -3,4 +3,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: + - bases/services.k8s.aws_iamroleselectors.yaml - bases/services.k8s.aws_fieldexports.yaml diff --git a/config/rbac/cluster-role-controller.yaml b/config/rbac/cluster-role-controller.yaml index 345e5599..e6124bd1 100644 --- a/config/rbac/cluster-role-controller.yaml +++ b/config/rbac/cluster-role-controller.yaml @@ -93,8 +93,8 @@ rules: - apiGroups: - services.k8s.aws resources: - - adoptedresources - fieldexports + - iamroleselectors verbs: - create - delete @@ -106,8 +106,8 @@ rules: - apiGroups: - services.k8s.aws resources: - - adoptedresources/status - fieldexports/status + - iamroleselectors/status verbs: - get - patch diff --git a/go.mod b/go.mod index 15be1449..129c3b4e 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.24.0 toolchain go1.24.1 require ( - github.com/aws-controllers-k8s/runtime v0.52.0 + github.com/aws-controllers-k8s/runtime v0.53.1 github.com/aws/aws-sdk-go v1.55.6 github.com/aws/aws-sdk-go-v2 v1.39.2 github.com/aws/aws-sdk-go-v2/service/sagemaker v1.215.3 diff --git a/go.sum b/go.sum index d13d9a9b..29335f01 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/aws-controllers-k8s/runtime v0.52.0 h1:Q5UIAn6SSBr60t/DiU/zr6NLBlUuK2AG3yy2ma/9gDU= -github.com/aws-controllers-k8s/runtime v0.52.0/go.mod h1:OkUJN+Ds799JLYZsMJrO2vDJ4snxUeHK2MgrQHbU+Qc= +github.com/aws-controllers-k8s/runtime v0.53.1 h1:l9MkR1KfZW8H8icT5rrRK3pdnVVA4io/eINVe5aspWs= +github.com/aws-controllers-k8s/runtime v0.53.1/go.mod h1:OkUJN+Ds799JLYZsMJrO2vDJ4snxUeHK2MgrQHbU+Qc= github.com/aws/aws-sdk-go v1.55.6 h1:cSg4pvZ3m8dgYcgqB97MrcdjUmZ1BeMYKUxMMB89IPk= github.com/aws/aws-sdk-go v1.55.6/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= github.com/aws/aws-sdk-go-v2 v1.39.2 h1:EJLg8IdbzgeD7xgvZ+I8M1e0fL0ptn/M47lianzth0I= diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 398e0d6a..19a52790 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.5.0 -appVersion: 1.5.0 +version: 1.5.1 +appVersion: 1.5.1 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/crds/services.k8s.aws_iamroleselectors.yaml b/helm/crds/services.k8s.aws_iamroleselectors.yaml new file mode 100644 index 00000000..9477c900 --- /dev/null +++ b/helm/crds/services.k8s.aws_iamroleselectors.yaml @@ -0,0 +1,90 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.19.0 + name: iamroleselectors.services.k8s.aws +spec: + group: services.k8s.aws + names: + kind: IAMRoleSelector + listKind: IAMRoleSelectorList + plural: iamroleselectors + singular: iamroleselector + scope: Cluster + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: IAMRoleSelector is the schema for the IAMRoleSelector API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + properties: + arn: + type: string + x-kubernetes-validations: + - message: Value is immutable once set + rule: self == oldSelf + namespaceSelector: + description: IAMRoleSelectorSpec defines the desired state of IAMRoleSelector + properties: + labelSelector: + description: LabelSelector is a label query over a set of resources. + properties: + matchLabels: + additionalProperties: + type: string + type: object + required: + - matchLabels + type: object + names: + items: + type: string + type: array + required: + - names + type: object + resourceTypeSelector: + items: + properties: + group: + type: string + kind: + type: string + version: + type: string + required: + - group + - kind + - version + type: object + type: array + required: + - arn + type: object + status: + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/helm/templates/NOTES.txt b/helm/templates/NOTES.txt index bb234637..422c13b7 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.5.0". +This chart deploys "public.ecr.aws/aws-controllers-k8s/sagemaker-controller:1.5.1". 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 9998c974..5f6d4d4c 100644 --- a/helm/templates/_helpers.tpl +++ b/helm/templates/_helpers.tpl @@ -140,8 +140,8 @@ rules: - apiGroups: - services.k8s.aws resources: - - adoptedresources - fieldexports + - iamroleselectors verbs: - create - delete @@ -153,8 +153,8 @@ rules: - apiGroups: - services.k8s.aws resources: - - adoptedresources/status - fieldexports/status + - iamroleselectors/status verbs: - get - patch diff --git a/helm/values.yaml b/helm/values.yaml index 84b8e997..de39884c 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.5.0 + tag: 1.5.1 pullPolicy: IfNotPresent pullSecrets: [] @@ -205,4 +205,6 @@ featureGates: # Enable ReadOnlyResources feature/annotation. ReadOnlyResources: true # Enable ResourceAdoption feature/annotation. - ResourceAdoption: true \ No newline at end of file + ResourceAdoption: true + # Enable IAMRoleSelector, a multirole feature, replacing CARM. See https://github.com/aws-controllers-k8s/community/pull/2628 + IAMRoleSelector: false \ No newline at end of file diff --git a/pkg/resource/registry.go b/pkg/resource/registry.go index 3f3aa286..969531dd 100644 --- a/pkg/resource/registry.go +++ b/pkg/resource/registry.go @@ -20,8 +20,8 @@ import ( acktypes "github.com/aws-controllers-k8s/runtime/pkg/types" ) -// +kubebuilder:rbac:groups=services.k8s.aws,resources=adoptedresources,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=services.k8s.aws,resources=adoptedresources/status,verbs=get;update;patch +// +kubebuilder:rbac:groups=services.k8s.aws,resources=iamroleselectors,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=services.k8s.aws,resources=iamroleselectors/status,verbs=get;update;patch // +kubebuilder:rbac:groups=services.k8s.aws,resources=fieldexports,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=services.k8s.aws,resources=fieldexports/status,verbs=get;update;patch // +kubebuilder:rbac:groups="",resources=namespaces,verbs=get;list;watch