diff --git a/k8s/README.md b/k8s/README.md index f16a273..b47bc2e 100644 --- a/k8s/README.md +++ b/k8s/README.md @@ -5,26 +5,6 @@ Make sure you have a k8s cluster running and accessible, e.g. by installing [minikube](https://minikube.sigs.k8s.io/docs/) on your local machine. -## Secret setup to pull from ghcr.io - -Container images will be pulled from the GitHub container registry. -You will need to provide the login credentials as a secret to k8s. -[Follow the GitHub documentation on acquiring a personal access token.](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-to-the-container-registry) - -To save yourself some work, you'll find a script which generates the configuration file to correctly provision the -access token to your k8s instance in this directory. -Simply run the following commands. - -``` -$ ./generate-k8s-secret-yaml.sh "" "" > ghcr-secret.yaml -$ kubectl apply -f ghcr-secret.yaml -``` - -**It is highly encouraged to delete the resulting YAML file afterwards since it contains your access token in -(obfuscated) plain text.** - -## Deploy to k8s - To deploy, simply run the following commands. ``` diff --git a/k8s/generate-k8s-secret-yaml.sh b/k8s/generate-k8s-secret-yaml.sh deleted file mode 100755 index 04451d3..0000000 --- a/k8s/generate-k8s-secret-yaml.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh -if [ "$#" -ne 2 ]; then - echo "usage: $0 github_username github_access_token" - exit 1 -fi - -B64_BASIC_AUTH=$(printf "%s:%s" "$1" "$2" | base64 -w0) -B64_DOCKER_CONFIG_JSON=$(printf '{"auths": {"ghcr.io": {"auth": "%s"}}}' "$B64_BASIC_AUTH" | base64 -w0) - -cat <