-
Notifications
You must be signed in to change notification settings - Fork 166
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
Enable custom pod labels for helm chart #326
Enable custom pod labels for helm chart #326
Conversation
Hi @MarkDPierce, why |
When I use a custom label of
These customLabels are not included in the template metadata. Due to security reasons we need labels at the pod level. So every templated pod will get these custom labels. Thanks for actually asking because I totally forgot to add My change should have it looking like
|
Sorry, that was a long winded explanation to just say deployment.yaml only has
So customLabels wouldnt work in this scenario. |
Thanks for full explanation. Now after some looking around, I'm not fully certain we should have In k6-operator case, there's only one Deployment which makes it easier; though I suspect in the future we might need to make further breaking changes here. I'd appreciate some feedback from community here, about how everyone uses labels in their charts 🙂 |
@@ -2,7 +2,7 @@ apiVersion: v1 | |||
appVersion: "0.0.11" | |||
description: A Helm chart to install the k6-operator | |||
name: k6-operator | |||
version: 1.2.0 | |||
version: 2.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you think it should be a breaking change? This seems like a "pure" addition: old deployments should continue to work as is. I.e. why not 1.3.0?
FYI, I'll need to test it a bit and probably return to this PR ~ tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for sharing your experience with versioning of other Helm charts. The chart in k6-operator was added very recently and we're figuring out the "right way" still 😅
Let's go with major bump this time indeed 👍
It's a feature change and other charts we've worked on within the open
source community prefer a major bump. I also attempted to find any docs you
might have had towards the process. So went with best guess, I'm happy to
change or conform to what ever you deem appropriate.
…On Tue, Oct 31, 2023, 11:35 Olha Yevtushenko ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In charts/k6-operator/Chart.yaml
<#326 (comment)>:
> @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "0.0.11"
description: A Helm chart to install the k6-operator
name: k6-operator
-version: 1.2.0
+version: 2.0.0
Why do you think it should be a breaking change? This seems like a "pure"
addition: old deployments should continue to work as is. I.e. why not 1.3.0?
FYI, I'll need to test it a bit and probably return to this PR ~ tomorrow.
—
Reply to this email directly, view it on GitHub
<#326 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AK56WNSNSJ57K32AQ5HWDVLYCDH6JAVCNFSM6AAAAAA6V4LZRCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTOMBVHE3TANJUGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay!
The chart generated looks fine and working 🙌 I have a small change request: could you please add podLabels
to example in charts/k6-operator/samples/customAnnotationsAndLabels.yaml
? It could be an additional sample (file) too, btw.
And another thing. I've noticed that there is an additional empty line in manifest when one omits podLabels
like this:
...
metadata:
labels:
app.kubernetes.io/name: k6-operator
app.kubernetes.io/instance: release-name
spec:
...
😕 The same empty line is inserted with custom labels which use similar definition and default {}
so it's not just change in this PR. This is a minor thing but if you or someone knows how to fix it, I'd appreciate a PR here 😄
@@ -2,7 +2,7 @@ apiVersion: v1 | |||
appVersion: "0.0.11" | |||
description: A Helm chart to install the k6-operator | |||
name: k6-operator | |||
version: 1.2.0 | |||
version: 2.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for sharing your experience with versioning of other Helm charts. The chart in k6-operator was added very recently and we're figuring out the "right way" still 😅
Let's go with major bump this time indeed 👍
Hey sorry for the delay. Work had prio. I took a stab at the line breaks in your labels and annotations but it might require a bit of refactoring. At least with both you have ---
# Source: k6-operator/templates/namespace.yaml
apiVersion: v1
kind: Namespace
metadata:
name: release-name-system
labels:
app.kubernetes.io/name: release-name-k6-operator
control-plane: "controller-manager"
foo: bar
annotations:
bar: foo
---
# Source: k6-operator/templates/serviceAccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: k6-operator-controller
namespace: release-name-system
labels:
app.kubernetes.io/component: controller
helm.sh/chart: k6-operator-2.0.0
app.kubernetes.io/name: k6-operator
app.kubernetes.io/instance: release-name
app.kubernetes.io/version: "0.0.11"
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/part-of: k6-operator
foo: bar
annotations:
bar: foo But I do think the changes would be out of scope for this change. |
@MarkDPierce yes, the line break would be out of scope, but thanks for taking a look. If you see the solution, please feel free to open a PR 🙂 ATM, I don't think Either way, the |
Hey, we leverage tooling that requires certain labels to be present. While deploying into our ecosystem I noticed the pods don't have the capability to have custom labels. This PR is meant to include that annotation and feature for others that require specific pods labels