-
Notifications
You must be signed in to change notification settings - Fork 229
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
would it be possible to concatenate label value with global labels now? #355
Comments
That's more like a feature to add to allow templating on raw k8s yaml, but it might be easier to convert your externalSecret into a simple helm chart |
no go for this feature? i've actually found quite a few apps that follow this exact same pattern with replacing encapsulated values only |
for example using static IPs on GKE cluster by referenced names, we have several clusters in some GCP projects, and we'd love to have the ability to name it something like gke-prod-tr01-ingress, gke-prod-tr01-thanos-ip, gke-prod-dc02-ingress , etc. but right now this is not possible or I only through kustomize, which means I have to describe it for each cluster, overly complex for something simple. Can I not get anyone else interested in this type of feature? |
easier example. ingress domain prefixing. this should be a feature request |
Agree with @wzrdtales , this would be hugely helpful for ingress domains. Even when you are using Helm,most public helm charts that generate Ingress object ask you to pass the full DNS name as a value, which means if you want to get just a part of the domain name from the cluster labels, you end up needing to fork all your helm charts. |
Spoke with @StrongMonkey on this and have the following question: what would this feature enable you to do that converting to a Helm chart would not? We are wary of having templating-like functionality on raw k8s YAML since Fleet tries to be relatively "un-opinionated". However, I'd like to discuss in case we are missing something: @philomory @wzrdtales @virtuman |
Hi @nickgerace I have the following use case which is using a Helm Chart via Fleet. I would like to annotate a K8s Service Account in order to use AWS' IAM Roles For Service Accounts feature. The annotation would be different for each cluster. Contents of defaultNamespace: my-namespace
helm:
releaseName: my-release
repo: https://repo-url/helm-charts
chart: chart-name
version: 1.0.0
values:
serviceAccount:
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::global.fleet.${clusterLabels.aws_account_id}:role/${global.fleet.clusterLabels.iam_role_name} The above currently does not work because Cluster Labels cannot be interpolated within the String. From what I can see, allowing variable interpolation in the Values parameter would allow it to work. Is there an alternative way? |
@dennyc-au I believe you can use workaround like this
So first parameterize those two labels as values.yaml |
Thanks for your response. Is your suggestion to put the I tested by putting the following apiVersion: v1
kind: ServiceAccount
metadata:
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::123456789012:role/role-name
name: service-account-name If your suggestion is actually to insert the |
@dennyc-au Yes, my suggestion is to modify the helm chart as a workaround for now. |
@StrongMonkey ok, understood. As I mentioned, modifying the Helm Chart is not ideal. Is this sufficient reasoning to request the variable interpolation functionality to be implemented? |
@dennyc-au Yes, we will discuss this along with team. cc @nickgerace |
Thank you @StrongMonkey |
I'd concur with @dennyc-au, having to maintain a private fork of every single public helm chart we deploy to our fleet would be suboptimal, so having basic variable interpolation in fleet.yaml would be wonderful. |
We see the use case! I've marked this as a Release Candidate accordingly. Thanks for sticking with us for exploring this user need for this feature. |
I believe this is now implemented with #671 |
Now that #325 and #152 are marked as resolved, would this be possible to achieve for non-helm-based resources:
we are adding a series of ExternalSecrets on each new cluster that is spun up. Unfortunately we have not yet found a way to register new cluster in hashicorp vault, that remains a manual step, but we would like for the externalSecrets to be formed properly to reflect the cluster and the role names that are based on cluster name.
so essentualy, we need to concatenate string with value from cluster-display-name label, such as - this is PSEUDO-CODE-EXAMPLE not intended to work:
I cluster name is:
and I want to add something like "-role" to the cluster name as a value to a helm attribute:
to achieve something like this as a final result that gets applied to the cluster (see vaultMountPoint and vaultRole keys ):
The text was updated successfully, but these errors were encountered: