Skip to content

Commit

Permalink
fix: remove GitHub credential setup from k8s
Browse files Browse the repository at this point in the history
  • Loading branch information
mjugl committed Apr 18, 2024
1 parent a598eaa commit 964102f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 40 deletions.
20 changes: 0 additions & 20 deletions k8s/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<GitHub username>" "<GitHub access token>" > 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.

```
Expand Down
18 changes: 0 additions & 18 deletions k8s/generate-k8s-secret-yaml.sh

This file was deleted.

2 changes: 0 additions & 2 deletions k8s/node-result-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,3 @@ spec:
port: http-result-srv
failureThreshold: 3
periodSeconds: 10
imagePullSecrets:
- name: dockerconfigjson-github-com

0 comments on commit 964102f

Please sign in to comment.