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

[ingress] allow api-version spec #483

Closed
wants to merge 1 commit into from

Conversation

tony-kerz
Copy link

helm template --debug -n ae-system --set server.ingress.enabled=1 my-release .
---
# Source: vault/templates/server-ingress.yaml
apiVersion: networking.k8s.io/v1beta1


kind: Ingress
metadata:
  name: my-release-vault
  namespace: ae-system
  labels:
    helm.sh/chart: vault-0.10.0
    app.kubernetes.io/name: vault
    app.kubernetes.io/instance: my-release
    app.kubernetes.io/managed-by: Helm
spec:
  rules:
    - host: "chart-example.local"
      http:
        paths:
          - path: /
            backend:
              serviceName: my-release-vault
              servicePort: 8200
---
helm template --debug -n ae-system --set server.ingress.enabled=1 --set server.ingress.apiVersion=networking.k8s.io/v1 my-release .
---
# Source: vault/templates/server-ingress.yaml
apiVersion: networking.k8s.io/v1

kind: Ingress
metadata:
  name: my-release-vault
  namespace: ae-system
  labels:
    helm.sh/chart: vault-0.10.0
    app.kubernetes.io/name: vault
    app.kubernetes.io/instance: my-release
    app.kubernetes.io/managed-by: Helm
spec:
  rules:
    - host: "chart-example.local"
      http:
        paths:
          - path: /
            backend:
              serviceName: my-release-vault
              servicePort: 8200
---

@hashicorp-cla
Copy link

hashicorp-cla commented Mar 30, 2021

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@jasonodonnell jasonodonnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @tony-kerz, thanks for the contribution!

Can you help me understand why this change is being introduced? We don't offer api version configurables on any other objects so I'm curious what issues you are running into?

Additionally for any PR with configurables to be merged, there must be unit test coverage. You can find the bats unit tests in test/unit, but please hold off until we understand the scope of this change more.

@tony-kerz
Copy link
Author

hi @jasonodonnell,

sure, yeah, the helm chart won't install on k8s v1.19.x, see this issue, is that sufficient motivation?

best,
tony.

@jasonodonnell jasonodonnell linked an issue Apr 8, 2021 that may be closed by this pull request
@jasonodonnell
Copy link
Contributor

Hi @tony-kerz, thanks for pointing me to that issue. I've now linked it to this PR.

I'm very hesitant to allow users to configure this on their own. Instead I'm thinking this should use if else statements and lookup the capability of the server. The APIs don't change very often so we can expand when needed, but it would be one less thing for the user to configure.

Thoughts?

@tony-kerz
Copy link
Author

the capabilities lookup is cool, but u can see how it fell short this time around and now the chart is unusable in certain contexts until a new version is released.

i've been bitten by the shifting api version situation numerous times in the past, and custom forks are always an extra hassle, so i might endorse a belt-and-suspenders approach which uses a "case" type thing with all known versions at a point in time, but also allows an override to keep the chart in play during periods of change.

@jasonodonnell
Copy link
Contributor

@tony-kerz, I'm fine with a switch case. Would you mind updating the PR to support it?

@tony-kerz
Copy link
Author

sure, will do, thanks jason!

on a side note, i tried to run the ingress bats test and choked on the (undocumented?) dependency on python yq because i myself have migrated to the go version of yq to reduce the surface area of my runtimes.

any thoughts on cutting over to the go portable yq?

@tony-kerz
Copy link
Author

thx for looking at this @jasonodonnell i think #498 should be fine for this, let's just focus on merging that ;)

@tony-kerz tony-kerz closed this Apr 25, 2021
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.

Upgrade the Ingress Api versions to accomodate the v1
3 participants