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

[aws-load-balancer-controller ]chart generates non empty diff #347

Closed
admssa opened this issue Nov 13, 2020 · 13 comments
Closed

[aws-load-balancer-controller ]chart generates non empty diff #347

admssa opened this issue Nov 13, 2020 · 13 comments

Comments

@admssa
Copy link

admssa commented Nov 13, 2020

Hi guys. I have a small issue with aws-load-balancer-controller helm chart. It designed in such way that it generates non-empty diff each apply/upgrade.
It creates a secret with new values each time:

data:
  ca.crt: {{ $tls.caCert }}
  tls.crt: {{ $tls.clientCert }}
  tls.key: {{ $tls.clientKey }}

and generates non-empty helm diff
Use case: this chart prevents us from implementing CD for our infrastructure code.
I saw enableCertManager flag but I wasn't going to use certMamager.

image

@joncolby
Copy link

I am running into the same issue. I also am not using cert manager.

@kishorj
Copy link
Contributor

kishorj commented Jan 13, 2021

@admssa would it be acceptable to be able to specify the private key during chart installation/template generation?

@tyrken
Copy link

tyrken commented Feb 15, 2021

Also hit this while not using cert-manager. I guess the options are to provide it as optional helm input values or read it from an existing secret.

Would have preferred the latter except I'm not sure it will work given kubernetes/kubernetes#72944 (K8s cannot read webhook's CABundle from secret). Not sure if some helm-trickery can do it at apply time...

@eytanhanig
Copy link

For those using Argo CD, I wrote the following code to ignore these specific fields. All you need to do is add it to your Application manifest:

kind: Application
spec:
  ignoreDifferences:
  - kind: Secret
    name: aws-load-balancer-tls
    jsonPointers:
    - /data/ca.crt
    - /data/tls.crt
    - /data/tls.key
  - group: admissionregistration.k8s.io
    kind: MutatingWebhookConfiguration
    name: aws-load-balancer-webhook
    jsonPointers:
    - /webhooks/0/clientConfig/caBundle
    - /webhooks/1/clientConfig/caBundle
  - group: admissionregistration.k8s.io
    kind: ValidatingWebhookConfiguration
    name: aws-load-balancer-webhook
    jsonPointers:
    - /webhooks/0/clientConfig/caBundle

@NArnott
Copy link

NArnott commented Mar 9, 2021

I am trying to apply this chart using Pulumi, and get the same diff with every deploy. Specifing a specific key so this doesn't happen every time would be helpful.

@johnjeffers
Copy link

I had to make a minor change to @eytanhanig 's solution above after upgrading to aws-load-balancer-controller 2.2.0.

kind: Application
spec:
  ignoreDifferences:
  - kind: Secret
    name: aws-load-balancer-tls
    jsonPointers:
    - /data/ca.crt
    - /data/tls.crt
    - /data/tls.key
  - group: admissionregistration.k8s.io
    kind: MutatingWebhookConfiguration
    name: aws-load-balancer-webhook
    jsonPointers:
    - /webhooks/0/clientConfig/caBundle
    - /webhooks/1/clientConfig/caBundle
  - group: admissionregistration.k8s.io
    kind: ValidatingWebhookConfiguration
    name: aws-load-balancer-webhook
    jsonPointers:
    - /webhooks/0/clientConfig/caBundle
    - /webhooks/1/clientConfig/caBundle

The extra last line is the only change.

@ypicard
Copy link

ypicard commented Jul 6, 2021

Has anyone managed to get rid of this output using Helmfile ?

@kishorj
Copy link
Contributor

kishorj commented Oct 4, 2021

@admssa, we will provide options to reuse existing TLS secrets via the upstream PR kubernetes-sigs/aws-load-balancer-controller#2264.

All new features/fixes to the lb controller helm chart goes to the upstream repository and we sync up to eks-charts during release. I'm closing the issue. If you have further concerns please open an issue in the upstream repo.

@kishorj kishorj closed this as completed Oct 4, 2021
@davidroth
Copy link

@Kishorb I upgraded to the helm chart version 1.3.1 and configured keepTLSSecret: true.
Unfortunately, the issue remains. Is there anything else I need to configure?

@lcaproni-pp
Copy link

I am in the boat with @davidroth - still seeing this issue after upgrading. Even tried re-installing from scratch etc. but no dice.

@ypicard
Copy link

ypicard commented Oct 23, 2021

If you open a new issue, please mention here for tracking purposes @davidroth @lcaproni-pp.

@lcaproni-pp
Copy link

I opened an issue here

@K3ndu
Copy link

K3ndu commented Jun 30, 2023

If you encounter this problem with new version of alb-controller again, it seems they added new caBundle, to fix it just add another line:
name: aws-load-balancer-webhook
jsonPointers:
- /webhooks/0/clientConfig/caBundle
- /webhooks/1/clientConfig/caBundle
- /webhooks/2/clientConfig/caBundle

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