mirror of
https://github.com/gomods/athens
synced 2026-02-03 11:00:32 +00:00
Create helm github action
* Trimmed trailing character fixing linting issue
* AppVersion not appVersion for "{{ defaults .appVersion }}" in
deployment.yaml
* Update kind, helm and chart testing versions
* apiVersion in Chart.yaml required helm 2.15.1
* kind deprecated kubeconfig-path in 0.7, fixed test-e2e.sh
* apps/v1 rather than apps/v1beta2 in deployment.yaml
* remove registry reference, add version back in for final fixes
Co-authored-by: Chris Mills <millscj01@gmail.com>
Co-authored-by: Marwan Sulaiman <marwan.sameer@gmail.com>
Co-authored-by: Aaron Schlesinger <aaron@ecomaz.net>
Co-authored-by: Ted Wexler <ted@stuckinacan.com>
This commit is contained in:
committed by
Chris Mills
parent
78101d3694
commit
de1da781ff
@@ -0,0 +1,33 @@
|
||||
name: helm-charts
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, reopened, synchronize]
|
||||
# paths:
|
||||
# - "charts/*"
|
||||
# - "test/e2e-kind.sh"
|
||||
jobs:
|
||||
shellcheck:
|
||||
if: github.event_name == 'pull_request'
|
||||
name: Shellcheck Helm Charts
|
||||
runs-on: ubuntu-latest
|
||||
container: koalaman/shellcheck-alpine
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: shellcheck -x test/e2e-kind.sh
|
||||
charts-e2e:
|
||||
name: Run E2E Tests on the Helm Chart
|
||||
needs: [shellcheck]
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CHART_TESTING_IMAGE: quay.io/helmpack/chart-testing
|
||||
CHART_TESTING_TAG: v2.4.1
|
||||
K8S_VERSION: v1.18.0
|
||||
KIND_VERSION: v0.8.1
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: git fetch --prune --unshallow
|
||||
- run: test/e2e-kind.sh
|
||||
# publish:
|
||||
# runs-on: ubuntu-latest
|
||||
# if: github.event_name == 'push'
|
||||
# container: alpine/helm
|
||||
@@ -1,3 +1,4 @@
|
||||
apiVersion: v1
|
||||
name: athens-proxy
|
||||
version: 0.4.12
|
||||
appVersion: 0.9.0
|
||||
|
||||
@@ -53,7 +53,7 @@ spec:
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ template "fullname" . }}
|
||||
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
livenessProbe:
|
||||
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{{- if .Values.jaeger.enabled -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "fullname" . }}-jaeger
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
replicaCount: 1
|
||||
image:
|
||||
registry: docker.io
|
||||
# registry: docker.io
|
||||
repository: gomods/athens
|
||||
# this defaults to the Chart.yaml's appVersion.
|
||||
# You can override this when you helm install
|
||||
tag: v0.9.0
|
||||
|
||||
## Specify a imagePullPolicy
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
1. Helm (CircleCI)
|
||||
https://github.com/helm/chart-testing-action Testing action we could use
|
||||
2. Windows tests (AppVeyor)
|
||||
3. Build/Test/DockerPush (DroneCI)
|
||||
@@ -2,3 +2,4 @@ target-branch: main
|
||||
chart-dirs:
|
||||
- charts
|
||||
helm-extra-args: --timeout 800
|
||||
check-version-increment: false
|
||||
|
||||
+4
-4
@@ -57,9 +57,9 @@ create_kind_cluster() {
|
||||
docker_exec mkdir -p /root/.kube
|
||||
|
||||
echo 'Copying kubeconfig to container...'
|
||||
local kubeconfig
|
||||
kubeconfig="$(kind get kubeconfig-path --name "$CLUSTER_NAME")"
|
||||
docker cp "$kubeconfig" ct:/root/.kube/config
|
||||
# local kubeconfig
|
||||
kind get kubeconfig --name "$CLUSTER_NAME" > kube-config.yaml
|
||||
docker cp kube-config.yaml ct:/root/.kube/config
|
||||
|
||||
docker_exec kubectl cluster-info
|
||||
echo
|
||||
@@ -115,4 +115,4 @@ main() {
|
||||
lint_charts
|
||||
}
|
||||
|
||||
main
|
||||
main
|
||||
@@ -15,18 +15,18 @@ metadata:
|
||||
name: local-path-provisioner-role
|
||||
namespace: local-path-storage
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes", "persistentvolumeclaims"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["endpoints", "persistentvolumes", "pods"]
|
||||
verbs: ["*"]
|
||||
- apiGroups: [""]
|
||||
resources: ["events"]
|
||||
verbs: ["create", "patch"]
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["storageclasses"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes", "persistentvolumeclaims"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["endpoints", "persistentvolumes", "pods"]
|
||||
verbs: ["*"]
|
||||
- apiGroups: [""]
|
||||
resources: ["events"]
|
||||
verbs: ["create", "patch"]
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["storageclasses"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
kind: ClusterRoleBinding
|
||||
@@ -38,11 +38,11 @@ roleRef:
|
||||
kind: ClusterRole
|
||||
name: local-path-provisioner-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: local-path-provisioner-service-account
|
||||
namespace: local-path-storage
|
||||
- kind: ServiceAccount
|
||||
name: local-path-provisioner-service-account
|
||||
namespace: local-path-storage
|
||||
---
|
||||
apiVersion: apps/v1beta2
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: local-path-provisioner
|
||||
@@ -59,23 +59,23 @@ spec:
|
||||
spec:
|
||||
serviceAccountName: local-path-provisioner-service-account
|
||||
containers:
|
||||
- name: local-path-provisioner
|
||||
image: rancher/local-path-provisioner:v0.0.8
|
||||
imagePullPolicy: Always
|
||||
command:
|
||||
- local-path-provisioner
|
||||
- --debug
|
||||
- start
|
||||
- --config
|
||||
- /etc/config/config.json
|
||||
volumeMounts:
|
||||
- name: config-volume
|
||||
mountPath: /etc/config/
|
||||
env:
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: local-path-provisioner
|
||||
image: rancher/local-path-provisioner:v0.0.8
|
||||
imagePullPolicy: Always
|
||||
command:
|
||||
- local-path-provisioner
|
||||
- --debug
|
||||
- start
|
||||
- --config
|
||||
- /etc/config/config.json
|
||||
volumeMounts:
|
||||
- name: config-volume
|
||||
mountPath: /etc/config/
|
||||
env:
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
volumes:
|
||||
- name: config-volume
|
||||
configMap:
|
||||
@@ -98,11 +98,11 @@ metadata:
|
||||
namespace: local-path-storage
|
||||
data:
|
||||
config.json: |-
|
||||
{
|
||||
"nodePathMap":[
|
||||
{
|
||||
"node":"DEFAULT_PATH_FOR_NON_LISTED_NODES",
|
||||
"paths":["/opt/local-path-provisioner"]
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
"nodePathMap":[
|
||||
{
|
||||
"node":"DEFAULT_PATH_FOR_NON_LISTED_NODES",
|
||||
"paths":["/opt/local-path-provisioner"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user