From 799b9bf466acd574afbb4471a8dd8acef8d013cd Mon Sep 17 00:00:00 2001 From: DrPsychick Date: Sat, 28 Jan 2023 00:17:34 +0100 Subject: [PATCH] wip: remove chart and update all references to new repo --- charts/athens-proxy/Chart.yaml | 18 -- charts/athens-proxy/OWNERS | 7 - charts/athens-proxy/README.md | 83 ------ charts/athens-proxy/templates/NOTES.txt | 27 -- charts/athens-proxy/templates/_helpers.tpl | 19 -- .../templates/config-ssh-git-servers.yaml | 26 -- .../templates/config-upstream.yaml | 15 -- charts/athens-proxy/templates/deployment.yaml | 250 ------------------ charts/athens-proxy/templates/ingress.yaml | 64 ----- .../athens-proxy/templates/jaeger-deploy.yaml | 45 ---- charts/athens-proxy/templates/jaeger-svc.yaml | 41 --- .../templates/secret-ssh-git-servers.yaml | 11 - .../templates/service-account.yaml | 15 -- charts/athens-proxy/templates/service.yaml | 26 -- .../athens-proxy/templates/storage-pvc.yaml | 24 -- charts/athens-proxy/values.yaml | 170 ------------ docs/content/install/install-on-kubernetes.md | 30 +-- .../install/install-on-kubernetes.zh.md | 28 +- scripts/push-helm-charts.sh | 50 ---- 19 files changed, 29 insertions(+), 920 deletions(-) delete mode 100644 charts/athens-proxy/Chart.yaml delete mode 100644 charts/athens-proxy/OWNERS delete mode 100644 charts/athens-proxy/README.md delete mode 100644 charts/athens-proxy/templates/NOTES.txt delete mode 100644 charts/athens-proxy/templates/_helpers.tpl delete mode 100644 charts/athens-proxy/templates/config-ssh-git-servers.yaml delete mode 100644 charts/athens-proxy/templates/config-upstream.yaml delete mode 100644 charts/athens-proxy/templates/deployment.yaml delete mode 100644 charts/athens-proxy/templates/ingress.yaml delete mode 100644 charts/athens-proxy/templates/jaeger-deploy.yaml delete mode 100644 charts/athens-proxy/templates/jaeger-svc.yaml delete mode 100644 charts/athens-proxy/templates/secret-ssh-git-servers.yaml delete mode 100644 charts/athens-proxy/templates/service-account.yaml delete mode 100644 charts/athens-proxy/templates/service.yaml delete mode 100644 charts/athens-proxy/templates/storage-pvc.yaml delete mode 100644 charts/athens-proxy/values.yaml delete mode 100755 scripts/push-helm-charts.sh diff --git a/charts/athens-proxy/Chart.yaml b/charts/athens-proxy/Chart.yaml deleted file mode 100644 index c2b54b671b..0000000000 --- a/charts/athens-proxy/Chart.yaml +++ /dev/null @@ -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 diff --git a/charts/athens-proxy/OWNERS b/charts/athens-proxy/OWNERS deleted file mode 100644 index a7fa638747..0000000000 --- a/charts/athens-proxy/OWNERS +++ /dev/null @@ -1,7 +0,0 @@ -approvers: -- rimusz -- arschles -reviewers: -- rimusz -- arschles - diff --git a/charts/athens-proxy/README.md b/charts/athens-proxy/README.md deleted file mode 100644 index 032df14ac2..0000000000 --- a/charts/athens-proxy/README.md +++ /dev/null @@ -1,83 +0,0 @@ -# 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: - -```console -$ helm repo add gomods https://athens.blob.core.windows.net/charts -$ helm repo update -``` - -Next, install the chart with default values to `athens` namespace: - -``` -$ helm install gomods/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 -``` diff --git a/charts/athens-proxy/templates/NOTES.txt b/charts/athens-proxy/templates/NOTES.txt deleted file mode 100644 index 9f7c0d8437..0000000000 --- a/charts/athens-proxy/templates/NOTES.txt +++ /dev/null @@ -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 }} diff --git a/charts/athens-proxy/templates/_helpers.tpl b/charts/athens-proxy/templates/_helpers.tpl deleted file mode 100644 index dd892ad80f..0000000000 --- a/charts/athens-proxy/templates/_helpers.tpl +++ /dev/null @@ -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 -}} diff --git a/charts/athens-proxy/templates/config-ssh-git-servers.yaml b/charts/athens-proxy/templates/config-ssh-git-servers.yaml deleted file mode 100644 index e5cceba3f6..0000000000 --- a/charts/athens-proxy/templates/config-ssh-git-servers.yaml +++ /dev/null @@ -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 -}} diff --git a/charts/athens-proxy/templates/config-upstream.yaml b/charts/athens-proxy/templates/config-upstream.yaml deleted file mode 100644 index ccce0684ba..0000000000 --- a/charts/athens-proxy/templates/config-upstream.yaml +++ /dev/null @@ -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 -}} diff --git a/charts/athens-proxy/templates/deployment.yaml b/charts/athens-proxy/templates/deployment.yaml deleted file mode 100644 index 48516fab81..0000000000 --- a/charts/athens-proxy/templates/deployment.yaml +++ /dev/null @@ -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 }} diff --git a/charts/athens-proxy/templates/ingress.yaml b/charts/athens-proxy/templates/ingress.yaml deleted file mode 100644 index eda575a8b2..0000000000 --- a/charts/athens-proxy/templates/ingress.yaml +++ /dev/null @@ -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 }} diff --git a/charts/athens-proxy/templates/jaeger-deploy.yaml b/charts/athens-proxy/templates/jaeger-deploy.yaml deleted file mode 100644 index 75083cc37c..0000000000 --- a/charts/athens-proxy/templates/jaeger-deploy.yaml +++ /dev/null @@ -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 -}} diff --git a/charts/athens-proxy/templates/jaeger-svc.yaml b/charts/athens-proxy/templates/jaeger-svc.yaml deleted file mode 100644 index 7c5a9d0296..0000000000 --- a/charts/athens-proxy/templates/jaeger-svc.yaml +++ /dev/null @@ -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 -}} diff --git a/charts/athens-proxy/templates/secret-ssh-git-servers.yaml b/charts/athens-proxy/templates/secret-ssh-git-servers.yaml deleted file mode 100644 index 228a590dcb..0000000000 --- a/charts/athens-proxy/templates/secret-ssh-git-servers.yaml +++ /dev/null @@ -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 -}} diff --git a/charts/athens-proxy/templates/service-account.yaml b/charts/athens-proxy/templates/service-account.yaml deleted file mode 100644 index f616d7c6b9..0000000000 --- a/charts/athens-proxy/templates/service-account.yaml +++ /dev/null @@ -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 }} diff --git a/charts/athens-proxy/templates/service.yaml b/charts/athens-proxy/templates/service.yaml deleted file mode 100644 index 9f650df0e4..0000000000 --- a/charts/athens-proxy/templates/service.yaml +++ /dev/null @@ -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 }}" diff --git a/charts/athens-proxy/templates/storage-pvc.yaml b/charts/athens-proxy/templates/storage-pvc.yaml deleted file mode 100644 index 03cc8e0761..0000000000 --- a/charts/athens-proxy/templates/storage-pvc.yaml +++ /dev/null @@ -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 }} diff --git a/charts/athens-proxy/values.yaml b/charts/athens-proxy/values.yaml deleted file mode 100644 index b60f213d6f..0000000000 --- a/charts/athens-proxy/values.yaml +++ /dev/null @@ -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 diff --git a/docs/content/install/install-on-kubernetes.md b/docs/content/install/install-on-kubernetes.md index 5f22e83c0c..26568dcbf1 100644 --- a/docs/content/install/install-on-kubernetes.md +++ b/docs/content/install/install-on-kubernetes.md @@ -82,14 +82,14 @@ tiller-deploy-5456568744-76c6s 1/1 Running 0 5s 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: ```console -$ helm repo add gomods https://athens.blob.core.windows.net/charts +$ 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 gomods/athens-proxy -n athens --namespace athens +$ 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. @@ -101,7 +101,7 @@ This will deploy a single Athens instance in the `athens` namespace with `disk` By default, the chart will install Athens with a replica count of 1. To change this, change the `replicaCount` value: ```console -helm install gomods/athens-proxy -n athens --namespace athens --set replicaCount=3 +helm install athens/athens-proxy -n athens --namespace athens --set replicaCount=3 ``` ### Resources @@ -109,7 +109,7 @@ helm install gomods/athens-proxy -n athens --namespace athens --set replicaCount By default, the chart will install Athens without specific resource requests or limits. To change this, change the `resources` value: ```console -helm install gomods/athens-proxy -n athens --namespace athens \ +helm install athens/athens-proxy -n athens --namespace athens \ --set resources.requests.cpu=100m \ --set resources.requests.memory=64Mi \ --set resources.limits.cpu=100m \ @@ -142,7 +142,7 @@ persistence: Add it to `override-values.yaml` file and run: ```console -helm install gomods/athens-proxy -n athens --namespace athens -f override-values.yaml +helm install athens/athens-proxy -n athens --namespace athens -f override-values.yaml ``` `enabled` is used to turn on the PVC feature of the chart, while the other values relate directly to the values defined in the PersistentVolumeClaim documentation. @@ -152,7 +152,7 @@ helm install gomods/athens-proxy -n athens --namespace athens -f override-values To use the Mongo DB storage provider, you will first need a MongoDB instance. Once you have deployed MongoDB, you can configure Athens using the connection string via `storage.mongo.url`. You will also need to set `storage.type` to "mongo". ``` -helm install gomods/athens-proxy -n athens --namespace athens --set storage.type=mongo --set storage.mongo.url= +helm install athens/athens-proxy -n athens --namespace athens --set storage.type=mongo --set storage.mongo.url= ``` #### S3 Configuration @@ -163,7 +163,7 @@ variables, shared credentials files, and EC2 instance credentials. To manually s `storage.s3.secret_access_key`, and change `storage.s3.useDefaultConfiguration` to `false`. ``` -helm install gomods/athens-proxy -n athens --namespace athens --set storage.type=s3 --set storage.s3.region= --set storage.s3.bucket= +helm install athens/athens-proxy -n athens --namespace athens --set storage.type=s3 --set storage.s3.region= --set storage.s3.bucket= ``` #### Minio Configuration @@ -174,7 +174,7 @@ You need to create a bucket inside your minio-installation or use an existing on Last athens need authentication credentials for your minio in `storage.minio.accessKey` and `storage.minio.secretKey`. ``` -helm install gomods/athens-proxy -n athens --namespace athens --set storage.type=minio --set storage.minio.endpoint= --set storage.minio.bucket= --set storage.minio.accessKey= --set storage.minio.secretKey= +helm install athens/athens-proxy -n athens --namespace athens --set storage.type=minio --set storage.minio.endpoint= --set storage.minio.bucket= --set storage.minio.accessKey= --set storage.minio.secretKey= ``` #### Google Cloud Storage @@ -186,7 +186,7 @@ helm install gomods/athens-proxy -n athens --namespace athens --set storage.type 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. ``` - helm install gomods/athens-proxy -n athens --namespace athens --set storage.type=gcp --set storage.gcp.projectID= --set storage.gcp.bucket= + helm install athens/athens-proxy -n athens --namespace athens --set storage.type=gcp --set storage.gcp.projectID= --set storage.gcp.bucket= ``` ### Kubernetes Service @@ -194,7 +194,7 @@ helm install gomods/athens-proxy -n athens --namespace athens --set storage.type By default, a Kubernetes `ClusterIP` service is created for the Athens proxy. "ClusterIP" is sufficient in the case when the Athens proxy will be used from within the cluster. To expose Athens outside of the cluster, consider using a "NodePort" or "LoadBalancer" service. This can be changed by setting the `service.type` value when installing the chart. For example, to deploy Athens using a NodePort service, the following command could be used: ```console -helm install gomods/athens-proxy -n athens --namespace athens --set service.type=NodePort +helm install athens/athens-proxy -n athens --namespace athens --set service.type=NodePort ``` ### Ingress Resource @@ -202,7 +202,7 @@ helm install gomods/athens-proxy -n athens --namespace athens --set service.type The chart can optionally create a Kubernetes [Ingress Resource](https://kubernetes.io/docs/concepts/services-networking/ingress/#the-ingress-resource) for you as well. To enable this feature, set the `ingress.enabled` resource to true. ```console -helm install gomods/athens-proxy -n athens --namespace athens --set ingress.enabled=true +helm install athens/athens-proxy -n athens --namespace athens --set ingress.enabled=true ``` Further configuration values are available in the `values.yaml` file: @@ -228,7 +228,7 @@ Example above sets automatic creation/retrieval of TLS certificates from [Let's Add it to `override-values.yaml` file and run: ```console -helm install gomods/athens-proxy -n athens --namespace athens -f override-values.yaml +helm install athens/athens-proxy -n athens --namespace athens -f override-values.yaml ``` ### Upstream module repository @@ -252,7 +252,7 @@ upstreamProxy: Add it to `override-values.yaml` file and run: ```console -helm install gomods/athens-proxy -n athens --namespace athens -f override-values.yaml +helm install athens/athens-proxy -n athens --namespace athens -f override-values.yaml ``` ### .netrc file support @@ -267,7 +267,7 @@ kubectl create secret generic netrcsecret --from-file=./netrc In order to instruct athens to fetch and use the secret, `netrc.enabled` flag must be set to true: ```console -helm install gomods/athens-proxy -n athens --namespace athens --set netrc.enabled=true +helm install athens/athens-proxy -n athens --namespace athens --set netrc.enabled=true ``` ### gitconfig support @@ -295,7 +295,7 @@ kubectl create secret generic athens-proxy-gitconfig --from-file=gitconfig=/tmp/ In order to instruct athens to use the secret, set appropriate flags (or parameters in `values.yaml`): ```console -helm install gomods/athens-proxy --name athens --namespace athens \ +helm install athens/athens-proxy --name athens --namespace athens \ --set gitconfig.enabled=true \ --set gitconfig.secretName=athens-proxy-gitconfig \ --set gitconfig.secretKey=gitconfig diff --git a/docs/content/install/install-on-kubernetes.zh.md b/docs/content/install/install-on-kubernetes.zh.md index 58a4d32d0c..ba2e60e624 100755 --- a/docs/content/install/install-on-kubernetes.zh.md +++ b/docs/content/install/install-on-kubernetes.zh.md @@ -82,13 +82,13 @@ tiller-deploy-5456568744-76c6s 1/1 Running 0 5s 使用Helm安装Athens的最快方法是从我们的公共Helm Chart库中进行部署。 首先,使用以下命令添加库 ```console -$ helm repo add gomods https://athens.blob.core.windows.net/charts +$ helm repo add athens https://sickhub.github.io/athens-proxy $ helm repo update ``` 接下来,将含有默认值的chart安装到`athens`命名空间: ``` -$ helm install gomods/athens-proxy -n athens --namespace athens +$ helm install athens/athens-proxy -n athens --namespace athens ``` 这将在`athens`命名空间中部署一个启用了`disk`本地存储的Athens实例。此外,还将创建一个`ClusterIP`服务。 @@ -100,7 +100,7 @@ $ helm install gomods/athens-proxy -n athens --namespace athens 默认情况下,该chart将安装副本数量为1的athens。要更改此设置,请更改`replicaCount`值: ```console -helm install gomods/athens-proxy -n athens --namespace athens --set replicaCount=3 +helm install athens/athens-proxy -n athens --namespace athens --set replicaCount=3 ``` ### 资源 @@ -108,7 +108,7 @@ helm install gomods/athens-proxy -n athens --namespace athens --set replicaCount 默认情况下,该chart将在没有特定资源请求或限制的情况下安装athens。 要更改此设置,请更改`resources`值: ```console -helm install gomods/athens-proxy -n athens --namespace athens \ +helm install athens/athens-proxy -n athens --namespace athens \ --set resources.requests.cpu=100m \ --set resources.requests.memory=64Mi \ --set resources.limits.cpu=100m \ @@ -141,7 +141,7 @@ persistence: 将其添加到`override values.yaml`文件并运行: ```console -helm install gomods/athens-proxy -n athens --namespace athens -f override-values.yaml +helm install athens/athens-proxy -n athens --namespace athens -f override-values.yaml ``` `enabled`用于打开chart的PVC功能,而其他值直接与PersistentVolumeClaim中定义的值相关。 @@ -152,7 +152,7 @@ helm install gomods/athens-proxy -n athens --namespace athens -f override-values 要使用Mongo DB存储提供程序,您首先需要一个MongoDB实例。当部署了MongoDB后,就可以通过`storage.mongo.url`字段使用连接字符串配置Athens。 您还需将`storage.type`设置为“mongo”。 ``` -helm install gomods/athens-proxy -n athens --namespace athens --set storage.type=mongo --set storage.mongo.url= +helm install athens/athens-proxy -n athens --namespace athens --set storage.type=mongo --set storage.mongo.url= ``` #### S3 配置 @@ -160,7 +160,7 @@ helm install gomods/athens-proxy -n athens --namespace athens --set storage.type 要在Athens中使用S3存储,请将`storage.type`设置为`s3`,并将`storage.s3.region`和`storage.s3.bucket`分别设置为所使用的AWS区域和S3存储桶名称。 默认情况下,Athens将尝试使用AWS SDK从环境变量、共享凭证文件(shared credentials files)和EC2实例凭证组成的链中加载AWS凭证。 要手动指定AWS凭证,请设置`storage.s3.access_key_id`,`storage.s3.secret_access_key`,并将`storage.s3.useDefaultConfiguration`更改为`false`。 ``` -helm install gomods/athens-proxy -n athens --namespace athens --set storage.type=s3 --set storage.s3.region= --set storage.s3.bucket= +helm install athens/athens-proxy -n athens --namespace athens --set storage.type=s3 --set storage.s3.region= --set storage.s3.bucket= ``` #### Minio 配置 @@ -169,7 +169,7 @@ helm install gomods/athens-proxy -n athens --namespace athens --set storage.type ``` -helm install gomods/athens-proxy -n athens --namespace athens --set storage.type=minio --set storage.minio.endpoint= --set storage.minio.bucket= --set storage.minio.accessKey= --set storage.minio.secretKey= +helm install athens/athens-proxy -n athens --namespace athens --set storage.type=minio --set storage.minio.endpoint= --set storage.minio.bucket= --set storage.minio.accessKey= --set storage.minio.secretKey= ``` ### Kubernetes 服务 @@ -177,7 +177,7 @@ helm install gomods/athens-proxy -n athens --namespace athens --set storage.type 默认情况下,Kubernetes中为Athens创建了一个`ClusterIP` 服务。在Kubernetes集群内使用Athens的场景下,`clusterip`就足够用了。如果要在Kubernetes集群外提供Athens的服务,请考虑使用“nodeport”或“loadbalancer”。可以在安装chart时通过设置`service.type`值来更改此设置。例如,要使用nodeport服务部署Athens,可以使用以下命令: ```console -helm install gomods/athens-proxy -n athens --namespace athens --set service.type=NodePort +helm install athens/athens-proxy -n athens --namespace athens --set service.type=NodePort ``` ### Ingress 资源 @@ -185,7 +185,7 @@ helm install gomods/athens-proxy -n athens --namespace athens --set service.type 该chart可以选择性为您的创建一个Kubernetes [Ingress 资源](https://kubernetes.io/docs/concepts/services-networking/ingress/#the-ingress-resource)。要启用此功能,请将`ingress.enabled`资源设置为true。 ```console -helm install gomods/athens-proxy -n athens --namespace athens --set ingress.enabled=true +helm install athens/athens-proxy -n athens --namespace athens --set ingress.enabled=true ``` `values.yaml`文件中提供了更多配置选项: @@ -211,7 +211,7 @@ ingress: 将其添加到`override-values.yaml`文件中并运行: ```console -helm install gomods/athens-proxy -n athens --namespace athens -f override-values.yaml +helm install athens/athens-proxy -n athens --namespace athens -f override-values.yaml ``` ### 上游的模块(module)库 @@ -235,7 +235,7 @@ upstreamProxy: 将其添加到 `override-values.yaml` 文件里并运行: ```console -helm install gomods/athens-proxy -n athens --namespace athens -f override-values.yaml +helm install athens/athens-proxy -n athens --namespace athens -f override-values.yaml ``` ### .netrc文件支持 @@ -249,7 +249,7 @@ kubectl create secret generic netrcsecret --from-file=./netrc 为了指导athens获取并使用密钥,`netrc.enabled`标志必须设置为true: ```console -helm install gomods/athens-proxy -n athens --namespace athens --set netrc.enabled=true +helm install athens/athens-proxy -n athens --namespace athens --set netrc.enabled=true ``` ### gitconfig支持 @@ -275,7 +275,7 @@ kubectl create secret generic athens-proxy-gitconfig --from-file=gitconfig=/tmp/ 为了使athens使用密钥,请设置适当的标志(或`values.yaml`中的参数): ```console -helm install gomods/athens-proxy --name athens --namespace athens \ +helm install athens/athens-proxy --name athens --namespace athens \ --set gitconfig.enabled=true \ --set gitconfig.secretName=athens-proxy-gitconfig \ --set gitconfig.secretKey=gitconfig diff --git a/scripts/push-helm-charts.sh b/scripts/push-helm-charts.sh deleted file mode 100755 index 6685687506..0000000000 --- a/scripts/push-helm-charts.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bash - -set -xeuo pipefail - -helm init --client-only - -##### -# set up the repo dir, and package up all charts -##### -CHARTS_REPO=${CHARTS_REPO:-"https://athens.blob.core.windows.net"} -CHARTS_BUCKET=charts -REPO_DIR=bin/charts # This is where we do the charge merge and dirty things up, not the source chart directory -mkdir -p $REPO_DIR -echo "entering $REPO_DIR" -cd $REPO_DIR -if curl --output /dev/null --silent --head --fail ${CHARTS_REPO}/${CHARTS_BUCKET}/index.yaml; then - echo "downloading existing index.yaml" - curl -sLO ${CHARTS_REPO}/${CHARTS_BUCKET}/index.yaml -fi - -##### -# package the charts -##### -for dir in `ls ../../charts`;do - if [ ! -f ../../charts/$dir/Chart.yaml ];then - echo "skipping $dir because it lacks a Chart.yaml file" - else - echo "packaging $dir" - helm dep build ../../charts/$dir - helm package ../../charts/$dir - fi -done - -if [ -f $REPO_DIR/index.yaml ]; then - echo "merging with existing index.yaml" - helm repo index --url "$CHARTS_REPO/$CHARTS_BUCKET" --merge index.yaml . -else - echo "generating new index.yaml" - helm repo index . -fi - -##### -# upload to Azure blob storage -##### -if [ ! -v AZURE_STORAGE_CONNECTION_STRING ]; then - echo "AZURE_STORAGE_CONNECTION_STRING env var required to publish" - exit 1 -fi -echo "uploading from $PWD" -az storage blob upload-batch --destination $CHARTS_BUCKET --source .