Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Latest commit

 

History

History

gcloud-function

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Deploy in a Google Cloud Function

You can deploy the webhook to a Google cloud function using the following steps:

  1. Clone this repository and make it your working directory:
git clone https://github.com/secrethub/secrethub-kubernetes-mutating-webhook.git && cd secrethub-kubernetes-mutating-webhook
  1. Deploy the webhook to a Google Cloud Function:
gcloud functions deploy secrethub-mutating-webhook --runtime go113 --entry-point F --trigger-http --allow-unauthenticated

The function is configured to allow unauthenticated requests. The function doesn't give access to any resources or data. It only allows you to mutate provided data.

  1. Set the Google Cloud Function URL in the config.yaml:
URL=$(gcloud functions describe secrethub-mutating-webhook --format 'value(httpsTrigger.url)') sed -i "s|YOUR_CLOUD_FUNCTION_URL|$URL|" deploy/gcloud-function/config.yaml
  1. Enable the webhook on your Kubernetes cluster:
kubectl apply -f deploy/gcloud-function