Skip to content

Commit

Permalink
feat: new home for athens chart (#1845)
Browse files Browse the repository at this point in the history
  • Loading branch information
DrPsychick committed Mar 14, 2023
1 parent fe1e400 commit ac35a44
Show file tree
Hide file tree
Showing 22 changed files with 5 additions and 951 deletions.
33 changes: 0 additions & 33 deletions .circleci/config.yml

This file was deleted.

18 changes: 2 additions & 16 deletions DEVELOPMENT.md
Expand Up @@ -287,12 +287,7 @@ $ git cherry-pick <commit from main>
```

### Updating the helm chart

Regardless of which branch you created, you'll need to update the helm chart number. After you've cut the branch, make sure to change the versions in the [`Chart.yaml`](./charts/athens-proxy/Chart.yaml) file:

- If this is a new release of Athens, make sure to update the Docker image version [value](./charts/athens-proxy/values.yaml#L5)
- Increment the patch number in the [`version` field](./charts/athens-proxy/Chart.yaml#L2)
- Set the [`appVersion` field](./charts/athens-proxy/Chart.yaml#L2) to the semver of the new branch. Do not include the `v` prefix
see https://github.com/gomods/athens-charts

## Creating the new release in GitHub

Expand All @@ -311,17 +306,8 @@ Make sure the Github Actions CI/CD job finished, and check in Docker Hub to make
The Github Actions job will do everything except:

- Tweet out about the new release
- Update the helm chart in the `main` branch
- Update the helm chart

If you are a core maintainer and don't have access to the `@gomods` account, ask one of the maintainers to give you access. [Here](https://twitter.com/gomodsio/status/1240016379962691585) is an example showing the general format of these tweets. Obviously you should use your creativity here though!

Finally, you'll need to update the helm version number in the `main` branch. Create a new branch called `update-helm-$CURRENT_TAG` and update the following files:

- [charts/athens-proxy/values.yaml](./charts/athens-proxy/values.yaml) - update the `image.tag` field to the latest version number you created, including the `v`. This field should be near the top of the file
- [charts/athens-proxy/Chart.yaml](./charts/athens-proxy/Chart.yaml) - update the `version` field and the `appVersion` field
- Increment the patch number in the `version` field
- Change the `appVersion` field to the tag name of the GitHub version you created, including the `v`

[Here](https://github.com/gomods/athens/pull/1574) is an example of how to do this.

Finally, create a pull request from your new branch into the `main` branch. It will be reviewed and merged as soon as possible.
8 changes: 0 additions & 8 deletions Makefile
Expand Up @@ -89,14 +89,6 @@ proxy-docker:
docker-push:
./scripts/push-docker-images.sh

.PHONY: charts-push
charts-push: build-image
docker run --rm -it \
-v `pwd`:/go/src/github.com/gomods/athens \
-e AZURE_STORAGE_CONNECTION_STRING \
-e CHARTS_REPO \
athens-build ./scripts/push-helm-charts.sh

bench:
./scripts/benchmark.sh

Expand Down
18 changes: 0 additions & 18 deletions charts/athens-proxy/Chart.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions charts/athens-proxy/OWNERS

This file was deleted.

85 changes: 1 addition & 84 deletions charts/athens-proxy/README.md
@@ -1,85 +1,2 @@
# Athens Proxy Helm Chart

## What is Athens?

[Athens](https://docs.gomods.io) is a repository for packages used by your go packages.

Athens provides a repository for [Go Modules](https://github.com/golang/go/wiki/Modules) that you can run. It serves public code and your private code for you, so you don't have to pull directly from a version control system (VCS) like GitHub or GitLab.

## Prerequisites

* Kubernetes 1.10+

## Requirements

- A running Kubernetes cluster
- [Kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) installed and setup to use the cluster
- [Helm](https://helm.sh/) [installed](https://github.com/helm/helm#install) and setup to use the cluster (helm init) or [Tillerless Helm](https://github.com/rimusz/helm-tiller)

## Deploy Athens

The fastest way to install Athens using Helm is to deploy it from our public Helm chart repository. First, add the repository with this command:

Hint: To make the chart available again, the chart is temporarily hosted at sickhub.github.io until we've found a new solution.

```console
$ helm repo add athens https://sickhub.github.io/athens-proxy
$ helm repo update
```

Next, install the chart with default values to `athens` namespace:

```
$ helm install athens/athens-proxy -n athens --namespace athens
```

This will deploy a single Athens instance in the `athens` namespace with `disk` storage enabled. Additionally, a `ClusterIP` service will be created.


## Advanced Configuration

For more advanced configuration options please check Athens [docs](https://docs.gomods.io/install/install-on-kubernetes/#advanced-configuration).

Available options:
- [Replicas](https://docs.gomods.io/install/install-on-kubernetes/#replicas)
- [Access to private repositories via Github](https://docs.gomods.io/install/install-on-kubernetes/#give-athens-access-to-private-repositories-via-github-token-optional)
- [Storage Providers](https://docs.gomods.io/install/install-on-kubernetes/#storage-providers)
- [Kubernetes Service](https://docs.gomods.io/install/install-on-kubernetes/#kubernetes-service)
- [Ingress Resource](https://docs.gomods.io/install/install-on-kubernetes/#ingress-resource)
- [Upstream module repository](https://docs.gomods.io/install/install-on-kubernetes/#upstream-module-repository)
- [.netrc file support](https://docs.gomods.io/install/install-on-kubernetes/#netrc-file-support)
- [gitconfig support](https://docs.gomods.io/install/install-on-kubernetes/#gitconfig-support)

### Pass extra configuration environment variables

You can pass any extra environment variables supported in [config.dev.toml](../../../config.dev.toml).
The example below shows how to set username/password for basic auth:

```yaml
configEnvVars:
- name: BASIC_AUTH_USER
value: "some_user"
- name: BASIC_AUTH_PASS
value: "some_password"
```

### Private git servers over ssh support

One or more of git servers can added to `sshGitServers`, and the corresponding config files (git config and ssh config) and ssh keys will be created. Athens then will use these configs and keys to download the source from the git servers.

```yaml
sshGitServers:
## Private git servers over ssh
## to enable uncomment lines with single hash below
## hostname of the git server
- host: git.example.com
## ssh username
user: git
## ssh private key for the user
privateKey: |
-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----
## ssh port
port: 22
```
The chart has a new home at https://github.com/gomods/athens-charts
27 changes: 0 additions & 27 deletions charts/athens-proxy/templates/NOTES.txt

This file was deleted.

19 changes: 0 additions & 19 deletions charts/athens-proxy/templates/_helpers.tpl

This file was deleted.

26 changes: 0 additions & 26 deletions charts/athens-proxy/templates/config-ssh-git-servers.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions charts/athens-proxy/templates/config-upstream.yaml

This file was deleted.

0 comments on commit ac35a44

Please sign in to comment.