Azure / k8s-create-secret

GitHub Action to create Kubernetes cluster secrets
MIT License
35 stars 31 forks source link

Invalid Secret type after using k8s-create-secret action #100

Open harsha1163 opened 4 months ago

harsha1163 commented 4 months ago

Issue is when we use the below github action to generate/create a secret in k8s cluster

uses: azure/k8s-create-secret@v5 with: namespace: 'forecast-${{ matrix.client }}' secret-type: genric secret-name: 'dummy' string-data: '{"dummy1":"${{ steps.secrets.outputs.dummy1 }}","dummy2":"${{ steps.secrets.outputs.dummy2 }}","dummy3":"${{ steps.secrets.outputs.dummy3 }}","dummy4":"dummy4"}'

When we specify the "type" as generic --> the action should create the type of "Opaque" but it is trying to create a type of "generic" secret wherein the k8s doesn't have that type of secret. https://kubernetes.io/docs/concepts/configuration/secret/#secret-types

Created Secret o/p:

apiVersion: v1 data: dummy1: dummy2: dummy3: dummy4: kind: Secret metadata: creationTimestamp: "2024-06-07T09:32:28Z" name: dummy namespace: default type: Opaque

Note: Removed actual values for security reasons.

npcxiao commented 4 months ago

same issue

harsha1163 commented 4 months ago

Any update ?