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

Apply application label metadata to podTemplate #132

Closed
macedigital opened this issue May 15, 2019 · 1 comment
Closed

Apply application label metadata to podTemplate #132

macedigital opened this issue May 15, 2019 · 1 comment

Comments

@macedigital
Copy link

macedigital commented May 15, 2019

Description:

Prior to kubernetes-training/pull/32, when using the provided stackset-template as-is, CDP builds will complain about missing application-labels, even though one is provided on the StackSet-level (see screenshot):

pod-template-warning

Expected behavior:

Metadata (application) labels should be inherited by the stackTemplate's podTemplate without the need for manual additions (or the example should include said change, see PR mentioned earlier).

Actual Behavior:

A user has to apply this patch to the stackset.yaml file in order to make the warning go away.

diff --git a/deploy/apply/stackset.yaml b/deploy/apply/stackset.yaml
index fbbf351..a3fe84d 100644
--- a/deploy/apply/stackset.yaml
+++ b/deploy/apply/stackset.yaml
@@ -19,6 +19,9 @@ spec:
       replicas: {{{REPLICAS}}}
       # full Pod template.
       podTemplate:
+        metadata:
+          labels:
+            application: "{{{APPLICATION}}}"
         spec:
           containers:
           - name: "{{{APPLICATION}}}"
@mikkeloscar
Copy link
Contributor

Hi, the controller does the right thing, but the status reporting is wrong. We will fix the status reporting.

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

No branches or pull requests

2 participants