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

Implement name prefix/suffix transformers #1134

Merged
merged 3 commits into from
Apr 9, 2024

Conversation

stefanprodan
Copy link
Member

Closes: #1133

.spec.namePrefix and .spec.nameSuffix are optional fields used to specify a prefix and suffix
to be added to the names of all the resources in the Kustomization.

apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
  name: app
spec:
  # ...omitted for brevity
  namePrefix: "prefix-"
  nameSuffix: "-suffix"

@stefanprodan stefanprodan added the area/api API related issues and pull requests label Apr 9, 2024
@stefanprodan stefanprodan requested a review from souleb April 9, 2024 12:16
// NamePrefix will prefix the names of all managed resources.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=200
// +kubebuilder:validation:Optional
Copy link
Member

Choose a reason for hiding this comment

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

It seems that there isn't any difference between // +kubebuilder:validation:Optional and // +optional

Copy link
Member Author

Choose a reason for hiding this comment

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

This is how is set on others fields. If we decided to drop one, this is not the place to do it.

Copy link
Member

@souleb souleb left a comment

Choose a reason for hiding this comment

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

LGTM!

@stefanprodan stefanprodan merged commit 440b9da into main Apr 9, 2024
7 checks passed
@stefanprodan stefanprodan deleted the kustomize-name-prefix-suffix branch April 9, 2024 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api API related issues and pull requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add namePrefix and nameSuffix to Flux Kustomization API
2 participants