Azure / k8s-create-secret

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

Add support for multiple secrets #81

Open alxxyz opened 1 year ago

alxxyz commented 1 year ago

At the moment we should call the action multiple times in case we have multiple secrets. It will be useful to set multiple secrets at once in one action call.

github-actions[bot] commented 1 year ago

This issue is idle because it has been open for 14 days with no activity.

OliverMKing commented 1 year ago

Hi @alxxyz! We don't want to add this feature because it would significantly complicate the way users have to use this action (actions can't take lists or other yaml features as inputs). Running the action multiple times should be just as effective of a solution.

Is there a reason why you want this action to be able to set multiple secrets at the same time instead of just running this action multiple times?

github-actions[bot] commented 1 year ago

This issue is idle because it has been open for 14 days with no activity.

alxxyz commented 1 year ago

Hi @OliverMKing, we have to pass 20-30 secrets, and it looks bad when we need to pass such amount of secrets

github-actions[bot] commented 1 year ago

This issue is idle because it has been open for 14 days with no activity.

mihiic commented 1 year ago

@alxxyz Would this work for you? Store whole secret manifest inside a github secret, and then apply it as a resource directly?

For example:

Github Secret content:

apiVersion: v1
kind: Secret
metadata:
  name: <secret name>
  namespace: <namespace name>
type: Opaque
data:
  DB_PASSWORD: <b64 of database password>
  RMQ_PASSWORD: <b64 of rmq password>
  JWT_SECRET_KEY: <b64 of jwt secret>

And then in your workflow definition:

      - name: Set secret
        env:
          SECRET_CONTENT: ${{ secrets.APP_SECRET }}
        run: |
          echo "$env:SECRET_CONTENT" | kubectl apply -f -
        shell: bash
github-actions[bot] commented 11 months ago

This issue is idle because it has been open for 14 days with no activity.