feat: new home for athens chart (#1845)

This commit is contained in:
DrPsychick
2023-03-14 06:08:18 +01:00
committed by GitHub
parent fe1e4007eb
commit ac35a44e5a
22 changed files with 5 additions and 951 deletions
-18
View File
@@ -1,18 +0,0 @@
apiVersion: v1
name: athens-proxy
version: 0.5.2
appVersion: 0.11.1
description: The proxy server for Go modules
icon: https://raw.githubusercontent.com/gomods/athens/main/docs/static/banner.png
keywords:
- Golang
- Package Management
- Goproxy
home: https://github.com/gomods/athens
sources:
maintainers:
- name: rimusz
email: rmocius@gmail.com
- name: arschles
email: aaron@ecomaz.net
engine: gotpl
-7
View File
@@ -1,7 +0,0 @@
approvers:
- rimusz
- arschles
reviewers:
- rimusz
- arschles
+1 -84
View File
@@ -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
View File
@@ -1,27 +0,0 @@
{{- if .Values.ingress.enabled }}
The Athens can be accessed via URL:
{{- else }}
Get the Athens URL by running these commands:
{{- end }}
{{- if (and .Values.ingress.enabled .Values.ingress.tls) }}
{{- range .Values.ingress.hosts }}
https://{{ . }}
{{- end }}
{{- else if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http://{{ . }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ template "fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "fullname" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:3000
{{- end }}
@@ -1,19 +0,0 @@
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- define "readinessPath" -}}
{{- if contains "v0.2.0" .Values.image.tag -}}/{{- else -}}/readyz{{- end -}}
{{- end -}}
@@ -1,26 +0,0 @@
{{- if .Values.sshGitServers -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "fullname" . }}-ssh-git-servers
labels:
app: {{ template "fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
data:
ssh_config: |
{{- range $server := .Values.sshGitServers }}
Host {{ $server.host }}
Hostname {{ $server.host }}
User {{ $server.user }}
Port {{ $server.port }}
StrictHostKeyChecking no
IdentityFile /ssh-keys/id_rsa-{{ $server.host }}
{{- end }}
git_config: |
{{- range $server := .Values.sshGitServers }}
[url "ssh://{{ $server.user }}@{{ $server.host }}:{{ $server.port}}"]
insteadOf = https://{{ $server.host }}
{{- end }}
{{- end -}}
@@ -1,15 +0,0 @@
{{- if .Values.upstreamProxy.enabled -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "fullname" . }}-upstream
labels:
app: {{ template "fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
data:
FilterForUpstreamProxy: |-
# FilterFile for fetching modules directly from upstream proxy
D
{{- end -}}
@@ -1,250 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "fullname" . }}
labels:
app: {{ template "fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
replicas: {{ .Values.replicaCount }}
{{- if .Values.strategy }}
strategy:
{{ toYaml .Values.strategy | indent 4 }}
{{- if eq .Values.strategy.type "Recreate" }}
rollingUpdate: null
{{- end }}
{{- end }}
selector:
matchLabels:
app: {{ template "fullname" . }}
release: "{{ .Release.Name }}"
template:
metadata:
labels:
app: {{ template "fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
annotations:
checksum/upstream: {{ include (print $.Template.BasePath "/config-upstream.yaml") . | sha256sum }}
checksum/ssh-config: {{ include (print $.Template.BasePath "/config-ssh-git-servers.yaml") . | sha256sum }}
checksum/ssh-secret: {{ include (print $.Template.BasePath "/secret-ssh-git-servers.yaml") . | sha256sum }}
{{- if .Values.annotations }}
{{ toYaml .Values.annotations | indent 8 }}
{{- end }}
spec:
serviceAccount: {{ template "fullname" . }}
{{- if .Values.sshGitServers }}
initContainers:
- name: copy-key-files
image: alpine:3.9
command:
- sh
- -c
args: ["cp /root/.ssh/id_rsa* /ssh-keys && chmod 400 /ssh-keys/*"]
volumeMounts:
- name: ssh-keys
mountPath: /ssh-keys
{{- range $server := .Values.sshGitServers }}
- name: ssh-git-servers-secret
mountPath: /root/.ssh/id_rsa-{{ $server.host }}
subPath: id_rsa-{{ $server.host }}
{{- end }}
{{- end }}
containers:
- name: {{ template "fullname" . }}
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
livenessProbe:
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
httpGet:
path: "/healthz"
port: 3000
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
successThreshold: {{ .Values.livenessProbe.successThreshold }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
readinessProbe:
httpGet:
path: "{{ template "readinessPath" . }}"
port: 3000
env:
- name: ATHENS_GOGET_WORKERS
{{- if .Values.goGetWorkers }}
value: {{ .Values.goGetWorkers | quote }}
{{- else }}
value: "3"
{{- end }}
{{- if .Values.configEnvVars }}
{{ toYaml .Values.configEnvVars | indent 8 }}
{{- end }}
- name: ATHENS_STORAGE_TYPE
value: {{ .Values.storage.type | quote }}
{{- if eq .Values.storage.type "disk"}}
- name: ATHENS_DISK_STORAGE_ROOT
value: {{ .Values.storage.disk.storageRoot | quote }}
{{- else if eq .Values.storage.type "mongo"}}
- name: ATHENS_MONGO_STORAGE_URL
value: {{ .Values.storage.mongo.url | quote }}
{{- else if eq .Values.storage.type "s3" }}
- name: AWS_REGION
value: {{ .Values.storage.s3.region | quote }}
- name: ATHENS_S3_BUCKET_NAME
value: {{ .Values.storage.s3.bucket | quote }}
- name: AWS_USE_DEFAULT_CONFIGURATION
value: {{ .Values.storage.s3.useDefaultConfiguration | quote }}
- name: AWS_FORCE_PATH_STYLE
value: {{ .Values.storage.s3.ForcePathStyle | quote }}
{{- if .Values.storage.s3.access_key_id }}
- name: AWS_ACCESS_KEY_ID
value: {{ .Values.storage.s3.access_key_id | quote }}
{{- end }}
{{- if .Values.storage.s3.secret_access_key }}
- name: AWS_SECRET_ACCESS_KEY
value: {{ .Values.storage.s3.secret_access_key | quote }}
{{- end }}
{{- if .Values.storage.s3.session_token }}
- name: AWS_SESSION_TOKEN
value: {{ .Values.storage.s3.session_token | quote }}
{{- end }}
{{- else if eq .Values.storage.type "gcp"}}
- name: GOOGLE_CLOUD_PROJECT
value: {{ .Values.storage.gcp.projectID | quote }}
- name: ATHENS_STORAGE_GCP_BUCKET
value: {{ .Values.storage.gcp.bucket | quote }}
{{- if .Values.storage.gcp.serviceAccount }}
- name: ATHENS_STORAGE_GCP_JSON_KEY
value: {{ .Values.storage.gcp.serviceAccount | b64enc | quote }}
{{- end }}
{{- else if eq .Values.storage.type "minio" }}
{{- if .Values.storage.minio.endpoint }}
- name: ATHENS_MINIO_ENDPOINT
value: {{ .Values.storage.minio.endpoint | quote }}
{{- end }}
{{- if .Values.storage.minio.accessKey }}
- name: ATHENS_MINIO_ACCESS_KEY_ID
value: {{ .Values.storage.minio.accessKey | quote }}
{{- end }}
{{- if .Values.storage.minio.secretKey }}
- name: ATHENS_MINIO_SECRET_ACCESS_KEY
value: {{ .Values.storage.minio.secretKey | quote }}
{{- end }}
{{- if .Values.storage.minio.bucket }}
- name: ATHENS_MINIO_BUCKET_NAME
value: {{ .Values.storage.minio.bucket | quote }}
{{- end }}
{{- end }}
{{- if .Values.netrc.enabled }}
- name: ATHENS_NETRC_PATH
value: "/etc/netrc/.netrc"
{{- end }}
{{- if .Values.upstreamProxy.enabled }}
- name: ATHENS_FILTER_FILE
value: "/usr/local/lib/FilterForUpstreamProxy"
- name: ATHENS_GLOBAL_ENDPOINT
value: {{ .Values.upstreamProxy.url | quote }}
{{- end }}
{{- if .Values.jaeger.enabled }}
- name: ATHENS_TRACE_EXPORTER_URL
value: {{ .Values.jaeger.url | quote }}
- name: ATHENS_TRACE_EXPORTER
value: "jaeger"
{{- end }}
{{- if .Values.basicAuth.enabled }}
- name: BASIC_AUTH_USER
valueFrom:
secretKeyRef:
name: {{ default "athens-proxy-basic-auth" .Values.basicAuth.secretName | quote }}
key: {{ default "username" .Values.basicAuth.usernameSecretKey | quote }}
- name: BASIC_AUTH_PASS
valueFrom:
secretKeyRef:
name: {{ default "athens-proxy-basic-auth" .Values.basicAuth.secretName | quote }}
key: {{ default "password" .Values.basicAuth.passwordSecretKey | quote }}
{{- end }}
ports:
- containerPort: 3000
{{- if or (eq .Values.storage.type "disk") .Values.upstreamProxy.enabled .Values.netrc.enabled .Values.sshGitServers .Values.gitconfig.enabled}}
volumeMounts:
{{- end }}
{{- if eq .Values.storage.type "disk" }}
- name: storage-volume
mountPath: {{ .Values.storage.disk.storageRoot | quote }}
{{- end }}
{{- if .Values.upstreamProxy.enabled }}
- name: upstream-config
mountPath: "/usr/local/lib"
readOnly: true
{{- end }}
{{- if .Values.netrc.enabled }}
- name: netrc
mountPath: "/etc/netrc"
readOnly: true
{{- end }}
{{- if .Values.sshGitServers }}
- name: ssh-git-servers-config
mountPath: /root/.ssh/config
subPath: ssh_config
- name: ssh-git-servers-config
mountPath: /root/.gitconfig
subPath: git_config
- name: ssh-keys
mountPath: /ssh-keys
{{- end }}
{{- if .Values.gitconfig.enabled }}
- name: gitconfig
mountPath: "/etc/gitconfig"
subPath: "gitconfig"
{{- end }}
{{- with .Values.resources }}
resources:
{{ toYaml . | indent 10 }}
{{- end }}
volumes:
- name: storage-volume
{{- if .Values.storage.disk.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ template "fullname" . }}-storage
{{- else }}
emptyDir: {}
{{- end }}
{{- if .Values.upstreamProxy.enabled }}
- name: upstream-config
configMap:
name: {{ template "fullname" . }}-upstream
{{- end }}
{{- if .Values.netrc.enabled }}
- name: netrc
secret:
secretName: {{ .Values.netrc.existingSecret }}
{{- end }}
{{- if .Values.sshGitServers }}
- name: ssh-keys
emptyDir: {}
- name: ssh-git-servers-config
configMap:
name: {{ template "fullname" . }}-ssh-git-servers
- name: ssh-git-servers-secret
secret:
secretName: {{ template "fullname" . }}-ssh-git-servers
{{- end }}
{{- if .Values.gitconfig.enabled }}
- name: gitconfig
secret:
secretName: {{ .Values.gitconfig.secretName }}
items:
- key: {{ .Values.gitconfig.secretKey }}
path: "gitconfig"
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
@@ -1,64 +0,0 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "fullname" . -}}
{{- $svcPort := .Values.service.servicePort -}}
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
{{- end }}
{{- end }}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" -}}
apiVersion: networking.k8s.io/v1
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app: {{ template "fullname" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
pathType: {{ .pathType }}
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
@@ -1,45 +0,0 @@
{{- if .Values.jaeger.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "fullname" . }}-jaeger
labels:
app: {{ template "fullname" . }}-jaeger
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
replicas: 1
selector:
matchLabels:
app: {{ template "fullname" . }}-jaeger
release: "{{ .Release.Name }}"
template:
metadata:
labels:
app: {{ template "fullname" . }}-jaeger
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
spec:
containers:
- env:
- name: COLLECTOR_ZIPKIN_HTTP_PORT
value: "9441"
image: "{{ .Values.jaeger.image.repository }}:{{ .Values.jaeger.image.tag }}"
name: {{ template "fullname" . }}-jaeger
ports:
- containerPort: 14268
protocol: TCP
- containerPort: 5775
protocol: UDP
- containerPort: 6831
protocol: UDP
- containerPort: 6832
protocol: UDP
- containerPort: 5778
protocol: TCP
- containerPort: 16686
protocol: TCP
- containerPort: 9411
protocol: TCP
{{- end -}}
@@ -1,41 +0,0 @@
{{- if .Values.jaeger.enabled -}}
apiVersion: v1
kind: Service
metadata:
name: {{ template "fullname" . }}-jaeger
labels:
app: {{ template "fullname" . }}-jaeger
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
type: {{ .Values.jaeger.type }}
ports:
- name: jaeger-collector-http
port: 14268
protocol: TCP
targetPort: 14268
- name: jaeger-zipkin-thrift
port: 5775
protocol: UDP
targetPort: 5775
- name: jaeger-compact
port: 6831
protocol: UDP
targetPort: 6831
- name: jaeger-binary
port: 6832
protocol: UDP
targetPort: 6832
- name: jaeger-configs
port: 5778
protocol: TCP
targetPort: 5778
- name: jaeger-query-http
port: 16686
protocol: TCP
targetPort: 16686
selector:
app: {{ template "fullname" . }}-jaeger
release: "{{ .Release.Name }}"
{{- end -}}
@@ -1,11 +0,0 @@
{{- if .Values.sshGitServers -}}
kind: Secret
apiVersion: v1
metadata:
name: {{ template "fullname" . }}-ssh-git-servers
type: Opaque
data:
{{- range $server := .Values.sshGitServers }}
id_rsa-{{ $server.host }}: {{ $server.privateKey | b64enc | quote }}
{{- end }}
{{- end -}}
@@ -1,15 +0,0 @@
{{- if .Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "fullname" . }}
labels:
app: {{ template "fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
{{- with .Values.serviceAccount.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
{{- end }}
@@ -1,26 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "fullname" . }}
{{- if .Values.service.annotations }}
annotations:
{{ toYaml .Values.service.annotations | indent 4 }}
{{- end }}
labels:
app: {{ template "fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
type: {{ .Values.service.type }}
ports:
- name: http
port: {{ .Values.service.servicePort }}
targetPort: 3000
protocol: TCP
{{- if eq .Values.service.type "NodePort" }}
nodePort: {{ .Values.service.nodePort.port }}
{{- end }}
selector:
app: {{ template "fullname" . }}
release: "{{ .Release.Name }}"
@@ -1,24 +0,0 @@
{{- if and (eq .Values.storage.type "disk") .Values.storage.disk.persistence.enabled }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ template "fullname" . }}-storage
labels:
app: {{ template "fullname" . }}-storage
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
accessModes:
- {{ .Values.storage.disk.persistence.accessMode | quote }}
resources:
requests:
storage: {{ .Values.storage.disk.persistence.size | quote }}
{{- if .Values.storage.disk.persistence.storageClass }}
{{- if (eq "-" .Values.storage.disk.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.storage.disk.persistence.storageClass }}"
{{- end }}
{{- end }}
{{- end }}
-170
View File
@@ -1,170 +0,0 @@
replicaCount: 1
image:
registry: docker.io
repository: gomods/athens
tag: v0.11.0
## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
##
pullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 3
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
## Server Deployment Strategy type
# strategy:
# type: Recreate
service:
## Additional annotations to apply to the service
annotations: {}
## Port as exposed by the service
servicePort: 80
## 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.
type: ClusterIP
## Further configuration if service is of type "NodePort"
nodePort:
## Available port in allowable range (e.g. 30000 - 32767 on minikube)
port: 30080
ingress:
enabled: false
# Provide key/value annotations
annotations:
className: ""
# Provide an array of values for the ingress host mapping
hosts:
# - host: athens-proxy.local
# paths:
# - path: /
# pathType: ImplementationSpecific
# Provide a base64 encoded cert for TLS use
tls:
storage:
type: disk
disk:
storageRoot: "/var/lib/athens"
persistence:
## Note if you use disk.persistence.enabled, replicaCount should be set to 1 unless your access mode is ReadWriteMany
## and strategy type must be Recreate
enabled: false
accessMode: ReadWriteOnce
size: 4Gi
mongo:
# you must set this on the command line when you run 'helm install'
# for example, you need to run 'helm install --set storage.mongo.url=myurl ...'
url: "SET THIS ON THE COMMAND LINE"
s3:
# you must set s3 bucket and region when running 'helm install'
region: ""
bucket: ""
useDefaultConfiguration: true
minio:
# All these variables needs to be set when configuring athens to run with minio backend
endpoint: ""
accessKey: ""
secretKey: ""
bucket: ""
gcp:
# 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'
projectID: ""
bucket: ""
# 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.
serviceAccount: ""
# Extra environment variables to be passed
# You can add any new ones at the bottom
configEnvVars: {}
# Extra annotations to be added to the athens pods
annotations: {}
# HTTP basic auth
basicAuth:
enabled: false
secretName: athens-proxy-basic-auth
passwordSecretKey: password
usernameSecretKey: username
netrc:
# if enabled, it expects to find the content of a valid .netrc file imported as a secret named netrcsecret
enabled: false
existingSecret: netrcsecret
# gitconfig section provides a way to inject git config file to make athens able to fetch modules from private git repos.
gitconfig:
# By default, gitconfig is disabled.
enabled: false
# Name of the kubernetes secret (in the same namespace as athens-proxy) that contains git config.
secretName: athens-proxy-gitconfig
# Key in the kubernetes secret that contains git config data.
secretKey: gitconfig
upstreamProxy:
# This 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
# - another Athens server
enabled: false
url: "https://gocenter.io"
jaeger:
## Type of service; valid values are "ClusterIP", "LoadBalancer", and "NodePort".
type: ClusterIP
image:
repository: jaegertracing/all-in-one
tag: latest
enabled: true
# you must set this on the command line when you run 'helm install'
# for example, you need to run 'helm install --set jaeger.url=myurl ...'
url: "SET THIS ON THE COMMAND LINE"
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
goGetWorkers: 3
serviceAccount:
create: true
annotations: {}
nodeSelector: {}
tolerations: []
affinity: {}
resources: {}
# limits:
# cpu: 100m
# memory: 64Mi
# requests:
# cpu: 100m
# memory: 64Mi