diff --git a/charts/argo-cd/.helmignore b/charts/argo-cd/.helmignore new file mode 100644 index 00000000..f0c13194 --- /dev/null +++ b/charts/argo-cd/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml new file mode 100644 index 00000000..a6e2c5fa --- /dev/null +++ b/charts/argo-cd/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "0.11" +description: A Helm chart for Argo-CD +name: argo-cd +version: 0.1.0 diff --git a/charts/argo-cd/templates/NOTES.txt b/charts/argo-cd/templates/NOTES.txt new file mode 100644 index 00000000..e69de29b diff --git a/charts/argo-cd/templates/_helpers.tpl b/charts/argo-cd/templates/_helpers.tpl new file mode 100644 index 00000000..bd65c45c --- /dev/null +++ b/charts/argo-cd/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "argo-cd.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +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). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "argo-cd.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 -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "argo-cd.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/charts/argo-cd/templates/argocd-application-controller-deployment.yaml b/charts/argo-cd/templates/argocd-application-controller-deployment.yaml new file mode 100755 index 00000000..b66e74a9 --- /dev/null +++ b/charts/argo-cd/templates/argocd-application-controller-deployment.yaml @@ -0,0 +1,37 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "argo-cd.fullname" . }}-application-controller +spec: + selector: + matchLabels: + app: {{ include "argo-cd.name" . }}-application-controller + template: + metadata: + labels: + app: {{ include "argo-cd.name" . }}-application-controller + app.kubernetes.io/name: {{ include "argo-cd.name" . }}-application-controller + helm.sh/chart: {{ include "argo-cd.chart" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/part-of: {{ include "argo-cd.name" . }} + app.kubernetes.io/component: application-controller + spec: + containers: + - command: + - argocd-application-controller + - --status-processors + - "20" + - --operation-processors + - "10" + image: {{ .Values.applicationController.image.repository }}:{{ .Values.applicationController.image.tag }} + imagePullPolicy: {{ .Values.applicationController.image.pullPolicy }} + name: {{ include "argo-cd.name" . }}-application-controller + ports: + - containerPort: {{ .Values.applicationController.containerPort }} + readinessProbe: + tcpSocket: + port: {{ .Values.applicationController.containerPort }} + initialDelaySeconds: 5 + periodSeconds: 10 + serviceAccountName: {{ include "argo-cd.name" . }}-application-controller diff --git a/charts/argo-cd/templates/argocd-application-controller-role.yaml b/charts/argo-cd/templates/argocd-application-controller-role.yaml new file mode 100755 index 00000000..60bed254 --- /dev/null +++ b/charts/argo-cd/templates/argocd-application-controller-role.yaml @@ -0,0 +1,42 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ include "argo-cd.fullname" . }}-application-controller + labels: + app.kubernetes.io/name: {{ include "argo-cd.name" . }}-application-controller + helm.sh/chart: {{ include "argo-cd.chart" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/part-of: {{ include "argo-cd.name" . }} + app.kubernetes.io/component: application-controller +rules: +- apiGroups: + - "" + resources: + - secrets + - configmaps + verbs: + - get + - list + - watch +- apiGroups: + - argoproj.io + resources: + - applications + - appprojects + verbs: + - create + - get + - list + - watch + - update + - patch + - delete +- apiGroups: + - "" + resources: + - events + verbs: + - create + - list + diff --git a/charts/argo-cd/templates/argocd-application-controller-rolebinding.yaml b/charts/argo-cd/templates/argocd-application-controller-rolebinding.yaml new file mode 100755 index 00000000..77d51cc9 --- /dev/null +++ b/charts/argo-cd/templates/argocd-application-controller-rolebinding.yaml @@ -0,0 +1,18 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ include "argo-cd.fullname" . }}-application-controller + labels: + app.kubernetes.io/name: {{ include "argo-cd.name" . }}-application-controller + helm.sh/chart: {{ include "argo-cd.chart" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/part-of: {{ include "argo-cd.name" . }} + app.kubernetes.io/component: application-controller +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ include "argo-cd.fullname" . }}-application-controller +subjects: +- kind: ServiceAccount + name: {{ include "argo-cd.fullname" . }}-application-controller diff --git a/charts/argo-cd/templates/argocd-application-controller-sa.yaml b/charts/argo-cd/templates/argocd-application-controller-sa.yaml new file mode 100755 index 00000000..0e937f37 --- /dev/null +++ b/charts/argo-cd/templates/argocd-application-controller-sa.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "argo-cd.fullname" . }}-application-controller + labels: + app.kubernetes.io/name: {{ include "argo-cd.name" . }}-application-controller + helm.sh/chart: {{ include "argo-cd.chart" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/part-of: {{ include "argo-cd.name" . }} + app.kubernetes.io/component: application-controller diff --git a/charts/argo-cd/templates/argocd-application-controller-service.yaml b/charts/argo-cd/templates/argocd-application-controller-service.yaml new file mode 100755 index 00000000..d6c821d6 --- /dev/null +++ b/charts/argo-cd/templates/argocd-application-controller-service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "argo-cd.fullname" . }}-application-controller + labels: + app.kubernetes.io/name: {{ include "argo-cd.name" . }}-application-controller + helm.sh/chart: {{ include "argo-cd.chart" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/part-of: {{ include "argo-cd.name" . }} + app.kubernetes.io/component: application-controller +spec: + ports: + - port: {{ .Values.applicationController.servicePort }} + targetPort: {{ .Values.applicationController.containerPort }} + selector: + app: {{ include "argo-cd.name" . }}-application-controller diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml new file mode 100644 index 00000000..cfc230a3 --- /dev/null +++ b/charts/argo-cd/values.yaml @@ -0,0 +1,40 @@ +applicationController: + containerPort: 8083 + servicePort: 8083 + image: + repository: argoproj/argocd + tag: v0.11.0 + pullPolicy: Always + +server: + containerPort: 8080 + servicePort: 8080 + containerMetricsPort: 8082 + metricsPort: 8082 + image: + repository: argoproj/argocd + tag: v0.11.0 + pullPolicy: Always + uiInitImage: + repository: argoproj/argocd-ui + tag: v0.11.0 + pullPolicy: Always + +repoServer: + port: 8081 + image: + repository: argoproj/argocd + tag: v0.11.0 + pullPolicy: Always + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi