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

Create tls secret autonaming. #206

Closed
wclr opened this issue Oct 9, 2024 · 2 comments
Closed

Create tls secret autonaming. #206

wclr opened this issue Oct 9, 2024 · 2 comments
Labels
kind/question Questions about existing features needs-triage Needs attention from the triage team

Comments

@wclr
Copy link

wclr commented Oct 9, 2024

I belive it is a general issue with pulumi auto-hasing names (when it is not derisable).

It is possible to avoid name-hasing of other resources created by chart if we set name in hemlOptions. But tls secret objects created still get hashes, I wonder is it possible to avoid this?

@pulumi-bot pulumi-bot added the needs-triage Needs attention from the triage team label Oct 9, 2024
@rquitales
Copy link
Member

@wclr Could you elaborate more on the secret names you're seeing and the Pulumi code you have that are causing these names? I've just tested out setting name in helmOptions to trigger between explicit and auto naming, but do not see the issue you're describing.

With autonaming:

import * as k8s from "@pulumi/kubernetes";
import * as certmanager from "@pulumi/kubernetes-cert-manager";

// Create a sandbox namespace.
const ns = new k8s.core.v1.Namespace("sandbox-ns");

// Install a cert manager into our cluster.
const manager = new certmanager.CertManager("cert-manager", {
  installCRDs: true,
  helmOptions: {
    namespace: ns.metadata.name,
    // name: "my-cert-manager", <- this is commented out
  },
});
# k get secrets -n sandbox-ns-7f856b94
NAME                                               TYPE                 DATA   AGE
cert-manager-helm-db816c75-webhook-ca              Opaque               3      94s
sh.helm.release.v1.cert-manager-helm-db816c75.v1   helm.sh/release.v1   1      96s

With explicit naming:

import * as k8s from "@pulumi/kubernetes";
import * as certmanager from "@pulumi/kubernetes-cert-manager";

// Create a sandbox namespace.
const ns = new k8s.core.v1.Namespace("sandbox-ns");

// Install a cert manager into our cluster.
const manager = new certmanager.CertManager("cert-manager", {
  installCRDs: true,
  helmOptions: {
    namespace: ns.metadata.name,
    // name: "my-cert-manager",
  },
});
# k get secrets -n sandbox-ns-861fe41b
NAME                                    TYPE                 DATA   AGE
my-cert-manager-webhook-ca              Opaque               3      2m55s
sh.helm.release.v1.my-cert-manager.v1   helm.sh/release.v1   1      2m56s

Note how the secret name does not contain any random suffixes in it.

@rquitales rquitales added awaiting-feedback Blocked on input from the author kind/question Questions about existing features and removed needs-triage Needs attention from the triage team labels Oct 11, 2024
@wclr
Copy link
Author

wclr commented Oct 11, 2024

I was talking about ingress tsl secret, that contains certifacates data. I got the secret named like "cert-tls-db816c75" that was managed by "cert-tls" Certificate.

But now (maybe after I've updated pulumi packages?) cert secret was created without hash (it is named just "cert-tls"). So I will close. Thanks for your attention.

@wclr wclr closed this as completed Oct 11, 2024
@pulumi-bot pulumi-bot added needs-triage Needs attention from the triage team and removed awaiting-feedback Blocked on input from the author labels Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Questions about existing features needs-triage Needs attention from the triage team
Projects
None yet
Development

No branches or pull requests

3 participants