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

Referenced resources #132

Merged
merged 1 commit into from
Feb 7, 2023
Merged

Referenced resources #132

merged 1 commit into from
Feb 7, 2023

Conversation

gianlucam76
Copy link
Member

When referencing a ConfigMap/Secret namespace can be set of left empty.

If namespace is set, it uniquely identifies a ConfigMap/Secret. The content of such resource is deployed in each workload cluster matching the ClusterProfile.

If namespace is left empty, at time of deployment, Sveltos will look for a resource with provided name in the cluster namespace. For instance setting:

PolicyRefs:

  • namespace: "" name: foo kind: ConfigMap

will have Sveltos use:

  1. ConfigMap foo in namespace A when deploying resources for a cluster in namespace A;
  2. ConfigMap foo in namespace B when deploying resources for a cluster in namespace B.

This PR adds code, unit tests and functional verification test.

When referencing a ConfigMap/Secret namespace can be set of left empty.

If namespace is set, it uniquely identifies a ConfigMap/Secret. The
content of such resource is deployed in each workload cluster matching
the ClusterProfile.

If namespace is left empty, at time of deployment, Sveltos will look for
a resource with provided name in the cluster namespace.
For instance setting:

PolicyRefs:
- namespace: ""
  name: foo
  kind: ConfigMap

will have Sveltos use:
1. ConfigMap foo in namespace A when deploying resources for a cluster
in namespace A;
2. ConfigMap foo in namespace B when deploying resources for a cluster
in namespace B.

This PR adds code, unit tests and functional verification test.
@gianlucam76 gianlucam76 merged commit 21c2062 into projectsveltos:dev Feb 7, 2023
@gianlucam76 gianlucam76 deleted the referenced-resource-namespace branch February 7, 2023 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant