I have a question regarding pulumi and kubernetes,...
# general
q
I have a question regarding pulumi and kubernetes, specifically helm deployments. It's been quite a learning curve, but somehow missed crd2pulumi and was using yaml files with transformations. Beyond changing a few basic parameters with transformations it gets pretty ugly real quick. So switched over to crd2pulumi generated classes and it's a thing of beauty now. I was just wondering if there's a way to get rid of all yaml, including the helm chart values in an elegant strongly-typed way.
Here's what I have in the yaml
Copy code
volumes: 
  - mountPath: /data
    name: traefik-config
    type: configMap

additionalArguments:
  - --providers.file.filename=/data/traefik-config.yaml
  - --entrypoints.websecure.http.tls.certresolver=le 
  - --entrypoints.websecure.http.tls.domains[0].main=xxx
  - --entrypoints.websecure.http.tls.domains[0].sans=*.xxx

  - --certificatesresolvers.le.acme.dnschallenge.provider=azure
  - --certificatesresolvers.le.acme.email=xxxx
  - --certificatesresolvers.le.acme.dnschallenge.resolvers=1.1.1.1
  - --certificatesresolvers.le.acme.storage=/certs/acme.json

  - --certificatesresolvers.le.acme.dnschallenge=true
  - --certificatesresolvers.le.acme.caserver=<https://acme-staging-v02.api.letsencrypt.org/directory>
  - --certificatesresolvers.le.acme.tlschallenge=false

  - --entrypoints.web.address=:80
  - --<http://entrypoints.web.http.redirections.entryPoint.to|entrypoints.web.http.redirections.entryPoint.to>=websecure
  - --entrypoints.web.http.redirections.entryPoint.scheme=https
  - --entrypoints.websecure.address=:443

env: 
  - name: AZURE_CLIENT_ID
    valueFrom:
      secretKeyRef:
        key: client_id
        name: azure-api-credentials
  - name: AZURE_CLIENT_SECRET
    valueFrom:
      secretKeyRef:
        key: client_secret
        name: azure-api-credentials
  - name: AZURE_SUBSCRIPTION_ID
    valueFrom:
      secretKeyRef:
        key: subscription_id
        name: azure-api-credentials
  - name: AZURE_TENANT_ID
    valueFrom:
      secretKeyRef:
        key: tenant_id
        name: azure-api-credentials
  - name: AZURE_RESOURCE_GROUP
    valueFrom:
      secretKeyRef:
        key: resource_group
        name: azure-api-credentials

ports:
  web:
    port: 80
    expose: true
    exposedPort: 80
    protocol: TCP
    nodePort: 32080
  websecure:
    port: 443
    expose: true
    exposedPort: 443
    protocol: TCP
    nodePort: 32443

service:
  enabled: true
  type: NodePort

persistence:
  enabled: true
  path: /certs
  size: 128Mi
Oh and forgot to mention this is for c#
I've seen this page describing a Dictionary build up, but would like something strongly typed - https://www.pulumi.com/registry/packages/kubernetes/api-docs/helm/v3/chart/#set-chart-values
(if possible)
b
@quick-fall-21011 some charts publish a
values.schema.json
which we could use to generate type definitions, but we don't currently support them. I opened https://github.com/pulumi/pulumi-kubernetes/issues/1866 for it
q
@billowy-army-68599 thanks a lot!