athens-proxy

by Gomods

Helm chartv0.19.0App v0.20.0Verified publisher

The proxy server for Go modules

About this chart

Athens Proxy Helm Chart: athens-proxy

What is Athens?

Athens is a repository for packages used by your go packages.

Athens provides a repository for Go 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.19-0

Requirements

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:

$ helm repo add athens https://gomods.github.io/athens-charts
$ helm repo update

Next, install the chart with default values in the 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.

Values

KeyTypeDefaultDescription
affinityobject{}see https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#scheduling
annotationsobject{}Add extra annotations to the athens pods
autoscaling.apiVersionOverridestring""Overwrite the API version used for HPA, uses 'autoscaling/v2' by default. see https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/horizontal-pod-autoscaler-v2/
autoscaling.behaviorobject{}Define scaling behavior for HPA
autoscaling.enabledboolfalseEnable Horizontal Pod Autoscaling
autoscaling.maxReplicasint3
autoscaling.minReplicasint1
autoscaling.targetCPUUtilizationPercentageint80
autoscaling.targetMemoryUtilizationPercentageint80
basicAuth.enabledboolfalseIf enabled, it expects to find the username and password in the named secret provided below
basicAuth.passwordSecretKeystring"password"
basicAuth.secretNamestring"athens-proxy-basic-auth"Secret name, containing the 'passwordSecretKey' and 'usernameSecretKey'
basicAuth.usernameSecretKeystring"username"
configEnvVarslist[]Set environment variables to be passed to athens pods
extraContainerslist[]Define extra containers (e.g. sidecars) for athens-proxy
extraInitContainerslist[]Define extra init containers for athens-proxy
extraLabelsobject{}Add extra labels to all resources
extraVolumeMountsobject{}Add extra volume mounts to deployment pod primary container
extraVolumesobject{}Add extra volumes to deployment pod
gitconfig.enabledboolfalseIf enabled, it expects to find git configuration in the named secret provided below. By default, gitconfig is disabled
gitconfig.secretKeystring"gitconfig"Key in the kubernetes secret that contains git config data
gitconfig.secretNamestring"athens-proxy-gitconfig"Name of the kubernetes secret (in the same namespace as athens-proxy) that contains git config
goGetWorkersint3Specify the number of go workers
hostAliaseslist[]Add entries to the pod's /etc/hosts, see https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods/
image.pullPolicystring"IfNotPresent"Specify a imagePullPolicy. see http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
image.pullSecretslist[]Specify secrets containing credentials for pulling images
image.registrystring"docker.io"
image.repositorystring"gomods/athens"
image.runAsNonRootboolfalseDetermine if the image should run as root or user athens
ingress.annotationsobject{}
ingress.classNamestring""
ingress.enabledboolfalseCreate an Ingress resource for athens
ingress.hostslist[]Provide an array of values for the ingress host mapping
ingress.tlslist[]
initContainerImage.registrystring"docker.io"sshGitServers init container image registry
initContainerImage.repositorystring"library/alpine"sshGitServers init container image repository
initContainerImage.tagfloat3.9sshGitServers init container image tag
initContainerResourcesobject{}sshGitServers init container resources
initContainerSecurityContextobject{}sshGitServers init container security context configuration
jaeger.annotationsobject{}
jaeger.enabledboolfalseDeploy a jaeger "all-in-one" pod for tracing
jaeger.image.repositorystring"jaegertracing/all-in-one"
jaeger.image.tagstring"latest"
jaeger.typestring"ClusterIP"Type of service; valid values are "ClusterIP", "LoadBalancer", and "NodePort".
jaeger.urlstring""Specify the jaeger URL for the environment variable used by athens. With default settings, it uses the jaeger-collector-http port of the jaeger service.
lifecycleobject{}Container lifecycle hooks configuration. see API reference: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/
livenessProbe.failureThresholdint3
livenessProbe.periodSecondsint10
livenessProbe.successThresholdint1
livenessProbe.timeoutSecondsint1
metrics.serviceMonitor.enabledboolfalseCreate a ServiceMonitor for prometheus
metrics.serviceScrape.enabledboolfalseCreate a VMServiceScrape for victoria
netrc.enabledboolfalseIf enabled, it expects to find the content of a valid '.netrc' file in the named secret provided below
netrc.existingSecretstring"netrcsecret"Secret name, containing the '.netrc' file
nodeSelectorobject{}see https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#scheduling
podDisruptionBudget.enabledboolfalseCreate a PodDisruptionBudget for the deployment. see API ref https://kubernetes.io/docs/tasks/run-application/configure-pdb/
priorityClassNamestring""Priority class for pod scheduling. see API reference: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass
readinessProbe.failureThresholdint3
readinessProbe.periodSecondsint10
readinessProbe.successThresholdint1
readinessProbe.timeoutSecondsint1
replicaCountint1Set the number of athens-proxy replicas, unless autoscaling is enabled
resourcesobject{}Define resources for athens pods. see https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#resources
securityContextobject{}Container security context configuration. see API reference: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#securitycontext-v1-core. This will override the image.runAsNonRoot settings in the specified container if runAsUser or runAsGroup are set
service.annotationsobject{}Add annotations to the service
service.servicePortint80Port as exposed by the service
service.typestring"ClusterIP"Type of service; valid values are "ClusterIP", "LoadBalancer", and "NodePort". "ClusterIP" is sufficient in the case when the Proxy will be used from within the cluster. To expose externally, consider a "NodePort" or "LoadBalancer" service or use an "Ingress".
serviceAccount.annotationsobject{}
serviceAccount.createbooltrueCreate a ServiceAccount
singleFlight.etcd.endpointsstring""
singleFlight.redis.endpointstring""
singleFlight.redis.existingSecretstring""Name of an existing Kubernetes Secret containing the Redis password. If set, the inline password value is ignored. The secret must contain a key matching existingSecretKey.
singleFlight.redis.existingSecretKeystring"ATHENS_REDIS_PASSWORD"Key within the existing secret that holds the Redis password.
singleFlight.redis.lockConfigobject{}
singleFlight.redis.passwordstring""
singleFlight.redisSentinel.endpointsstring""
singleFlight.redisSentinel.existingSecretstring""Name of an existing Kubernetes Secret containing the sentinel password. If set, the inline sentinelPassword value is ignored.
singleFlight.redisSentinel.existingSecretKeystring"ATHENS_REDIS_SENTINEL_PASSWORD"Key within the existing secret that holds the sentinel password.
singleFlight.redisSentinel.lockConfigobject{}
singleFlight.redisSentinel.masterNamestring""
singleFlight.redisSentinel.redisPasswordstring""
singleFlight.redisSentinel.redisUsernamestring""
singleFlight.redisSentinel.sentinelPasswordstring""
singleFlight.typestring""SingleFlight type to use. Options are ["memory", "etcd", "redis", "redis-sentinel", "gcp", "azureblob"]. see https://docs.gomods.io/configuration/storage/#running-multiple-athens-pointed-at-the-same-storage
sshGitServerslist[]Configuration for private git servers that will provide ssh and git config to athens in a ConfigMap
storage.disk.persistence.accessModestring"ReadWriteOnce"
storage.disk.persistence.enabledboolfalseNote if you use disk.persistence.enabled, replicaCount should be set to 1 unless your access mode is 'ReadWriteMany' and strategy type must be 'Recreate'
storage.disk.persistence.sizestring"4Gi"
storage.disk.storageRootstring"/var/lib/athens"
storage.gcp.bucketstring""
storage.gcp.projectIDstring""For more information, see: https://docs.gomods.io/install/install-on-kubernetes/#google-cloud-storage you must set gcp projectID and bucket when running 'helm install'
storage.gcp.serviceAccountstring""Set serviceAccount to a key which has read/write access to the GCS bucket. If you are running Athens inside GCP, you will most likely not need this as GCP figures out internal authentication between products for you.
storage.minio.accessKeystring""
storage.minio.bucketstring""
storage.minio.endpointstring""All these variables needs to be set when configuring athens to run with minio backend
storage.minio.secretKeystring""
storage.mongo.urlstring""
storage.s3.accessKeystring""
storage.s3.bucketstring""
storage.s3.forcePathStyleboolfalse
storage.s3.regionstring""You must set s3 bucket and region when running 'helm install'
storage.s3.secretKeystring""
storage.s3.sessionTokenstring""
storage.s3.useDefaultConfigurationboolfalse
storage.typestring"disk"Storage type to use. For a single instance a PVC may be sufficient
strategy.rollingUpdate.maxSurgeint1
strategy.rollingUpdate.maxUnavailableint1
strategy.typestring"Recreate"Using RollingUpdate requires a shared storage
terminationGracePeriodSecondsint30see API reference: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#pod-v1-core. the default value is 30 seconds.
tolerationslist[]see https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#scheduling
tracing.enabledboolfalseSet ATHENS_TRACE_EXPORTER* environment variables to point to a tracing deployment.
tracing.typestring"jaeger"Value of ATHENS_TRACE_EXPORTER, supported values are "jaeger", "datadog", and "stackdriver".
tracing.urlstring""Value of ATHENS_TRACE_EXPORTER_URL
upstreamProxy.enabledboolfalseThis is where you can set the URL for the upstream module repository. If 'enabled' is set to true, Athens will try to download modules from the upstream when it doesn't find them in its own storage. Here's a non-exhaustive list of options you can set here: - https://gocenter.io - https://proxy.golang.org
upstreamProxy.urlstring"https://gocenter.io"

Advanced Configuration

For more advanced configuration options please check Athens docs.

Available options:

Deploy athens-proxy with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has athens-proxy on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartathens-proxy is pinned at v0.19.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply