Open lswith opened 6 years ago
/remove-lifecycle stale
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
I guess this should be something similar to the images, which are, in some way, also URIs, you define your ingress with a placeholder host service1.myproject.local
and then have a kustomization with:
Prod:
hosts:
- name: service1.myproject.local
newName: myservice1.company.com
- name: service2.myproject.local
newName: myservice2.company.com
Test:
hosts:
- name: service1.myproject.local
newName: myservice1.test.local
- name: service2.myproject.local
newName: myservice2.test.local
this should update all host references, not just ingress routes, but also gateway apis, and preferrably also the tls hosts
this is certainly more stable than having a json patch replace the xth, yth and zth element of an array.
And if there really needs to be an update to something else, like a crd, the images transformer implementation already has a mechanism for that with configurations (https://github.com/kubernetes-sigs/kustomize/blob/master/examples/transformerconfigs/images/kustomization.yaml)
It could even be that #3492/#3737 is enough, but that it's adoption is hindered by the lack of documentation?
This is where i'm getting stuck at being able to use the replacements transformer for ingress hosts:
replacements:
- source:
kind: Ingress
fieldPaths:
- spec.rules.*.host
- spec.tls.*.hosts.*
# what goes here to specify which host I want to replace?
target:
# what goes here to set a specific value?
If a ReplacementTransformer won't do as-is, shouldn't we propose a modification to it, instead of going forward with an entire new transformer for now?
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
Kyverno seems to provide a solution for that: https://kyverno.io/policies/other/replace-ingress-hosts/replace-ingress-hosts/
That may be a good workaround to the lack of support in kustomize
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
What about just adding a new directive that allows one to override arbitrary merge keys, something like:
Base:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress
spec:
rules:
- host: placeholder
Patch:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress
spec:
rules:
- $mergeKey: placeholder
host: example.com
i believed it should be possible with the replacements, but i never got to figure out how they worked exactly. Maybe it wasn't really designed for it and it's still lacking a simple tweak?
I wrote this from what i could find in the ReplaceTransformer issues, but couldn't find how to tell it what to replacE.
replacements: - source: kind: Ingress fieldPaths: - spec.rules.*.host - spec.tls.*.hosts.* # what goes here to specify which host I want to replace? target: # what goes here to set a specific value?
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
I think a reasonably common use case is to swap an ingress's host value:
Can we get a feature to set this?