Skip to content
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

ASC-402: Modify NSTemplateTierSpec to support SA token copy #380

Merged
merged 11 commits into from
Oct 17, 2023
Binary file modified .DS_Store
Binary file not shown.
11 changes: 11 additions & 0 deletions api/v1alpha1/nstemplatetier_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@ type NSTemplateTierSpec struct {
// +optional
// +mapType=atomic
SpaceRoles map[string]NSTemplateTierSpaceRole `json:"spaceRoles,omitempty"`

// Provides the name of the Service Account whose token is to be copied
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor thing - but I guess this comment relates more to the SaTokenToCopy field, while the struct comment could be something generic like: "SpaceRequestConfigName stores all the configuration related to the Space Request feature".

WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same for the comment on the struct at line 31.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems better to me .Updated .

// +optional
SpaceRequestConfigName SpaceRequestConfig `json:"spaceRequestConfig,omitempty"`
Kartikey-star marked this conversation as resolved.
Show resolved Hide resolved
}

// SpaceRequestConfig provides the name of the Service Account whose token is to be copied
// +k8s:openapi-gen=true
type SpaceRequestConfig struct {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
type SpaceRequestConfig struct {
// +k8s:openapi-gen=true
type SpaceRequestConfig struct {

// +optional
SaTokenToCopy string `json:"saTokenToCopy,omitempty"`
Kartikey-star marked this conversation as resolved.
Show resolved Hide resolved
}

// NSTemplateTierNamespace the namespace definition in an NSTemplateTier resource
Expand Down
16 changes: 16 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

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

29 changes: 28 additions & 1 deletion api/v1alpha1/zz_generated.openapi.go

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