Skip to content

Conversation

@nimish-ks
Copy link
Member

@nimish-ks nimish-ks commented Oct 28, 2024

How to test things locally:

  • Start a new kubernetes cluster - minikube start
  • Apply the CRD - kubectl apply -f kubectl apply -f crd-template.yaml
  • Create the Phase service token v2 secret
kubectl create secret generic phase-service-token \
  --from-literal=token=<TOKEN> \
  --type=Opaque \
  --namespace=default
  • Apply the following CR:
apiVersion: secrets.phase.dev/v1alpha1
kind: PhaseSecret
metadata:
  name: example-phase-secret
  namespace: default
spec:
  phaseApp: "example-app" # The name of your Phase application
  phaseAppEnv: "development" # OPTIONAL The Phase application environment to fetch secrets from
  phaseAppEnvPath: "/" # OPTIONAL Path within the Phase application environment to fetch secrets from
  phaseHost: "http://localhost" # OPTIONAL - URL of a Phase Console instance
  authentication:
    serviceToken:
      serviceTokenSecretReference:
        secretName: "phase-service-token" # Name of the Phase service token with access to your application
        secretNamespace: "default"
  managedSecretReferences: # Managed secrets in Kubernetes that Phase will sync secrets with
    - secretName: "my-application-secret" # Name of the managed secret in Kubernetes that will be consumed by your application
      secretNamespace: "default"
  • In python venv - install all dependencies
  • Run the operator in dev mode - kopf run src/main.py
  • Watch for secrets being created - watch kubectl get secrets
  • Verify that the secret has been synced - kubectl get secret my-application-secret -o yaml

@nimish-ks nimish-ks added the enhancement New feature or request label Oct 28, 2024
@nimish-ks nimish-ks self-assigned this Oct 28, 2024
@nimish-ks nimish-ks marked this pull request as draft October 28, 2024 15:41
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Oct 29, 2024

Deploying helm-repo-kubernetes-secrets-operator with  Cloudflare Pages  Cloudflare Pages

Latest commit: cdb7b78
Status: ✅  Deploy successful!
Preview URL: https://bd5ad4ae.helm-repo-kubernetes-secrets-operator.pages.dev
Branch Preview URL: https://feat--add-service-account-su.helm-repo-kubernetes-secrets-operator.pages.dev

View logs

@nimish-ks nimish-ks marked this pull request as ready for review October 29, 2024 07:51
@nimish-ks nimish-ks merged commit fd82dbc into main Oct 29, 2024
2 checks passed
@nimish-ks nimish-ks deleted the feat--add-service-account-support branch October 29, 2024 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants