hello, I'm using pulumi kubernetes operator, how d...
# general
h
hello, I'm using pulumi kubernetes operator, how do I access value of a secret in
Program
CR? I have this in my `Stack`:
Copy code
---
apiVersion: <http://pulumi.com/v1|pulumi.com/v1>
kind: Stack
metadata:
  name: github
spec:
  stack: budimanjojo/github
  programRef:
    name: github
  destroyOnFinalize: true
  envRefs:
    GITHUB_OWNER:
      type: Literal
      literal:
        value: budimanjojo
    GITHUB_TOKEN:
      type: Secret
      secret:
        name: github-secret
        key: GITHUB_TOKEN
    PULUMI_ACCESS_TOKEN:
      type: Secret
      secret:
        name: github-secret
        key: PULUMI_ACCESS_TOKEN
  secretsRef:
    test_secret:
      type: Secret
      secret:
        name: github-secret
        key: test_secret
in my
Program
, I want to access the
test_secret
but I got this error:
resource "test_secret" not found
. Here's the Program:
Copy code
---
apiVersion: <http://pulumi.com/v1|pulumi.com/v1>
kind: Program
metadata:
  name: github
program:
  resources:
    exampleVariable:
      type: github:ActionsSecret
      properties:
        repository: pulumi-testing
        secretName: test_secret
        encryptedValue: ${test_secret}
s
There is pulumi operator? Good to know.
h
yes there is, can't get it to work though 😞 Maybe it's better to use a fluxRepository or git repo as source because I can't get the
Program
CR to work
s
can you give me eli5 of how it works? I assume it waits for stack resource in kubernetes and if you create one it will deploy/update whatever is there right ?
h
https://github.com/pulumi/pulumi-kubernetes-operator it can create a stack for you or u can give it an existing stack and it will update whenever u update something in the project (I hope)
s
cool