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

[SURE-9649] Kustomize nameSuffix not working with Fleet #3231

Open
kkaempf opened this issue Jan 21, 2025 · 0 comments
Open

[SURE-9649] Kustomize nameSuffix not working with Fleet #3231

kkaempf opened this issue Jan 21, 2025 · 0 comments
Labels
Milestone

Comments

@kkaempf
Copy link
Collaborator

kkaempf commented Jan 21, 2025

SURE-9649

Issue description:

NameSuffix directive in Kustomize doesn't work with Fleet but it's working fine only with kustomize CLI

Business impact:

Not possible to deploy 100 CRs using the nameSuffix to avoid naming collision

Repro steps:

(see JIRA for full yaml files)

Create a repo with the following secret in the base template file:

apiVersion: v1
kind: Secret
metadata:
  name: downstream-node
  namespace: default
type: Opaque
data:
  username: xxx
  password: xxx

The kustomize.yaml in the overlay:

nameSuffix: "-0"
resources:
  - ../../base  # Point to the base folder
patchesStrategicMerge:
  - secret-patch.yaml 

where the name suffix will add the -0 to -99 (in the example we want to deploy 100 CRs without collision)

The secret-patch.yaml will modify the values (kustomize and fleet are doing well this part) and it will try to rename the resource name to add the suffix:

apiVersion: v1
kind: Secret
metadata:
  name: downstream-node
  namespace: default
type: Opaque
data:
  username: xxx
  password: xxx

Actual behavior:

Using fleet the replacement file is:

apiVersion: v1
kind: Secret
metadata:
  name: downstream-node
  namespace: default
type: Opaque
data:
  username: xxx
  password: xxx

Expected behavior:

But the expected output (the same output you can get doing a manual kustomize build . command) is:

apiVersion: v1
kind: Secret
metadata:
  name: downstream-node-0
  namespace: default
type: Opaque
data:
  username: xxx
  password: xxx

where the values are replaced as well as the metadata.name with the suffix included

@kkaempf kkaempf added JIRA Must shout kind/bug labels Jan 21, 2025
@kkaempf kkaempf added this to Fleet Jan 21, 2025
@github-project-automation github-project-automation bot moved this to 🆕 New in Fleet Jan 21, 2025
@kkaempf kkaempf added this to the v2.10.3 milestone Jan 21, 2025
@kkaempf kkaempf moved this from 🆕 New to 📋 Backlog in Fleet Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant