-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature - Add/Modify/Delete tags for model resource #261
base: main
Are you sure you want to change the base?
Changes from 3 commits
f5b80a3
d5ca8ae
63768ef
0e99f49
9eca23c
99037c2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
ack_generate_info: | ||
build_date: "2024-02-24T00:04:37Z" | ||
build_hash: f429bd95efc1c7286e7cc973dc174a30490a5521 | ||
go_version: go1.22.0 | ||
version: v0.30.0-3-gf429bd9 | ||
build_date: "2024-03-01T09:24:39Z" | ||
build_hash: c2165b65565ab3a094cfb474c4396f4d14c7ef1e | ||
go_version: go1.21.6 | ||
version: v0.27.1-55-gc2165b6 | ||
api_directory_checksum: 731faf4c5d6d6f5140b4e0786127df447f773217 | ||
api_version: v1alpha1 | ||
aws_sdk_go_version: v1.50.15 | ||
generator_config_info: | ||
file_checksum: 0d728ab3662c7e538aff6727f087b54c5969fdcf | ||
file_checksum: 43c8931df528f38bf2c179722e7878f4615d5584 | ||
original_file_name: generator.yaml | ||
last_modification: | ||
reason: API generation |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,8 @@ apiVersion: apiextensions.k8s.io/v1 | |
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.14.0 | ||
controller-gen.kubebuilder.io/version: v0.9.2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You need to install controller-gen v0.14.0 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
creationTimestamp: null | ||
name: fieldexports.services.k8s.aws | ||
spec: | ||
group: services.k8s.aws | ||
|
@@ -20,37 +21,30 @@ spec: | |
description: FieldExport is the schema for the FieldExport 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 | ||
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 | ||
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: | ||
description: FieldExportSpec defines the desired state of the FieldExport. | ||
properties: | ||
from: | ||
description: |- | ||
ResourceFieldSelector provides the values necessary to identify an individual | ||
field on an individual K8s resource. | ||
description: ResourceFieldSelector provides the values necessary to | ||
identify an individual field on an individual K8s resource. | ||
properties: | ||
path: | ||
type: string | ||
resource: | ||
description: |- | ||
NamespacedResource provides all the values necessary to identify an ACK | ||
resource of a given type (within the same namespace as the custom resource | ||
containing this type). | ||
description: NamespacedResource provides all the values necessary | ||
to identify an ACK resource of a given type (within the same | ||
namespace as the custom resource containing this type). | ||
properties: | ||
group: | ||
type: string | ||
|
@@ -68,18 +62,16 @@ spec: | |
- resource | ||
type: object | ||
to: | ||
description: |- | ||
FieldExportTarget provides the values necessary to identify the | ||
output path for a field export. | ||
description: FieldExportTarget provides the values necessary to identify | ||
the output path for a field export. | ||
properties: | ||
key: | ||
description: Key overrides the default value (`<namespace>.<FieldExport-resource-name>`) | ||
for the FieldExport target | ||
type: string | ||
kind: | ||
description: |- | ||
FieldExportOutputType represents all types that can be produced by a field | ||
export operation | ||
description: FieldExportOutputType represents all types that can | ||
be produced by a field export operation | ||
enum: | ||
- configmap | ||
- secret | ||
|
@@ -102,14 +94,12 @@ spec: | |
description: FieldExportStatus defines the observed status of the FieldExport. | ||
properties: | ||
conditions: | ||
description: |- | ||
A collection of `ackv1alpha1.Condition` objects that describe the various | ||
recoverable states of the field CR | ||
description: A collection of `ackv1alpha1.Condition` objects that | ||
describe the various recoverable states of the field CR | ||
items: | ||
description: |- | ||
Condition is the common struct used by all CRDs managed by ACK service | ||
controllers to indicate terminal states of the CR and its backend AWS | ||
service API resource | ||
description: Condition is the common struct used by all CRDs managed | ||
by ACK service controllers to indicate terminal states of the | ||
CR and its backend AWS service API resource | ||
properties: | ||
lastTransitionTime: | ||
description: Last time the condition transitioned from one status | ||
|
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: 0.0.0-non-release-version | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please pull the controller tags There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
appVersion: 0.0.0-non-release-version | ||
home: https://github.com/aws-controllers-k8s/sagemaker-controller | ||
icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png | ||
sources: | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This generates code that treats
AddTags
as the Update API Call to update the model.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@a-hilaly - Thanks for review.
Sagemaker model API do not have any modify /update method , as fields are immutable except tags . Also Sagemaker API resource only have "ADDTAG" and "DELETE TAG" . So to handle update on this resource will have to use one of these two. So chose "ADD TAGS" and handling "DELETE tags" using template hooks.
Let me know if you think any other approach we can consider
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with Amine, need to discuss this further as we need to throw appropriate error if any other fields except Tags are modified as Model does not have udpate API, maybe implement it completely via hooks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@surajkota - Added check in update_pre hooks to validate field to update, if it is other than tag , reconciler will update "message" status. Please review
Please let me know if you feel anything else is require