k8s-create-secret
k8s-create-secret copied to clipboard
Invalid Secret type after using k8s-create-secret action
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:
Note: Removed actual values for security reasons.