diff --git a/incubating/google-secret-manager/README.md b/incubating/google-secret-manager/README.md index 213dc15fb..cf2153704 100644 --- a/incubating/google-secret-manager/README.md +++ b/incubating/google-secret-manager/README.md @@ -4,11 +4,11 @@ PreReqs: 1. [Hybrid Codefresh Runner](https://codefresh.io/docs/docs/administration/codefresh-runner/) on GKE -1. GKE w/ [Workload Identity Enabled](https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity) +2. GKE w/ [Workload Identity Enabled](https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity) -1. GKE w/ [Config Connector Enabled](https://cloud.google.com/config-connector/docs/how-to/getting-started) +3. GKE w/ [Config Connector Enabled](https://cloud.google.com/config-connector/docs/how-to/getting-started) -1. Create IAM Policy Binding between GCP SA and GKE SA. +4. Create IAM Policy Binding between GCP SA and GKE SA. ``` gcloud iam service-accounts add-iam-policy-binding @.iam.gserviceaccount.com \ @@ -16,7 +16,7 @@ gcloud iam service-accounts add-iam-policy-binding @.svc.id.goog[/default]" ``` -1. Hybrid Codefresh Runner's Service Account `default` in the Runner namepsace must be properly annotated with a GSM Service Account that has access to Google Secret Manager to read the Secret. +5. Hybrid Codefresh Runner's Service Account `default` in the Runner namepsace must be properly annotated with a GSM Service Account that has access to Google Secret Manager to read the Secret. Example of the annotation required. ``` diff --git a/incubating/google-secret-manager/step/secret_manager.png b/incubating/google-secret-manager/images/secret_manager.png similarity index 100% rename from incubating/google-secret-manager/step/secret_manager.png rename to incubating/google-secret-manager/images/secret_manager.png diff --git a/incubating/google-secret-manager/step.yaml b/incubating/google-secret-manager/step.yaml index 9d9a02d57..6a46572d4 100644 --- a/incubating/google-secret-manager/step.yaml +++ b/incubating/google-secret-manager/step.yaml @@ -13,7 +13,7 @@ metadata: official: true icon: type: image - url: 'https://cdn.jsdelivr.net/gh/codefresh-contrib/google-secret-manager@main/step/secret_manager.png' + url: 'https://cdn.jsdelivr.net/gh/codefresh-io/steps/incubating/google-secret-manager/images/secret_manager.png' background: '#f4f4f4' examples: - description: fetch-secret-from-gsm diff --git a/incubating/google-secret-manager/step/step.yaml b/incubating/google-secret-manager/step/step.yaml deleted file mode 100644 index 9d9a02d57..000000000 --- a/incubating/google-secret-manager/step/step.yaml +++ /dev/null @@ -1,73 +0,0 @@ -version: '1.0' -kind: step-type -metadata: - name: google-secret-manager - version: 0.0.1 - title: Fetch secrets from Google Secret Manager - isPublic: true - description: Read secrets from Google Secret Manager inside a Codefresh pipeline. - sources: - - 'https://github.com/codefresh-contrib/google-secret-manager/tree/main/step' - maintainers: - - name: Anthony Rozario - official: true - icon: - type: image - url: 'https://cdn.jsdelivr.net/gh/codefresh-contrib/google-secret-manager@main/step/secret_manager.png' - background: '#f4f4f4' - examples: - - description: fetch-secret-from-gsm - workflow: - get-secret: - title: Importing GSM Secret - type: google-secret-manager - arguments: - GCP_PROJECT_ID: '${{PROJECT_ID}}' - GCP_SECRET_ID: '${{SECRET_ID}}' - GCP_SECRET_VERSION: '${{SECRET_VERSION}}' - ENV_VAR_KEY: '${{ENV_VAR}}' -spec: - arguments: |- - { - "definitions": {}, - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "patterns": [], - "required": [ - "GCP_PROJECT_ID", - "GCP_SECRET_ID", - "GCP_SECRET_VERSION", - "ENV_VAR_KEY" - ], - "properties": { - "GCP_PROJECT_ID": { - "type": "string", - "description": "Name of the Secret's GCP Project" - }, - "GCP_SECRET_ID": { - "type": "string", - "description": "Name of the Secret" - }, - "GCP_SECRET_VERSION": { - "type": "string", - "description": "Version of the Secret" - }, - "ENV_VAR_KEY": { - "type": "string", - "description": "Environment variable key to store the Secret's value" - } - } - } - steps: - main: - name: fetch-google-secret - image: codefreshplugins/google-secret-manager:0.0.1 - working_directory: / - environment: - - 'GCP_PROJECT_ID=${{GCP_PROJECT_ID}}' - - 'GCP_SECRET_ID=${{GCP_SECRET_ID}}' - - 'GCP_SECRET_VERSION=${{GCP_SECRET_VERSION}}' - - 'ENV_VAR_KEY=${{ENV_VAR_KEY}}' - commands: - - python3 /get-secrets.py