wip
This commit is contained in:
parent
61ecfd1244
commit
e31ed69364
6
Chart.lock
Normal file
6
Chart.lock
Normal file
|
@ -0,0 +1,6 @@
|
|||
dependencies:
|
||||
- name: argo-cd
|
||||
repository: https://argoproj.github.io/argo-helm
|
||||
version: 5.29.1
|
||||
digest: sha256:bc009287f8e46edcddb1d36d4e6865080d92e97b6572ae2fd4d553d5e41cd2a2
|
||||
generated: "2023-04-22T12:59:51.842278-05:00"
|
13
Chart.yaml
Normal file
13
Chart.yaml
Normal file
|
@ -0,0 +1,13 @@
|
|||
apiVersion: v2
|
||||
name: argo1
|
||||
description: A Helm chart for your management ArgoCD of your management ArgoCD
|
||||
|
||||
type: application
|
||||
version: 0.1.0
|
||||
appVersion: 0.1.0
|
||||
|
||||
dependencies:
|
||||
- name: argo-cd
|
||||
version: "5.29.1"
|
||||
repository: "https://argoproj.github.io/argo-helm"
|
||||
|
19
blah.yaml
Normal file
19
blah.yaml
Normal file
|
@ -0,0 +1,19 @@
|
|||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: concourse
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: 'https://concourse-charts.storage.googleapis.com/'
|
||||
targetRevision: 17.1.1
|
||||
helm:
|
||||
values: |-
|
||||
clusterName: Concourse
|
||||
secrets:
|
||||
create: true
|
||||
chart: concourse
|
||||
destination:
|
||||
namespace: concourse
|
||||
name: in-cluster
|
BIN
charts/argo-cd-5.29.1.tgz
Normal file
BIN
charts/argo-cd-5.29.1.tgz
Normal file
Binary file not shown.
20
deploy.sh
Normal file
20
deploy.sh
Normal file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
TARGETNS="$(yq -r .spec.destination.namespace application.yaml)"
|
||||
ORIGNS="$(kubectl config view --minify -o jsonpath='{..namespace}')"
|
||||
|
||||
(
|
||||
set -e
|
||||
jq -n --args '{"apiVersion":"v1","kind":"Namespace","metadata":{"name": $ARGS.positional[0]}}' "$TARGETNS" | kubectl apply -f -
|
||||
|
||||
[ x"$TARGETNS" != x"$ORIGNS" ] && kubectl config set-context --current --namespace argocd
|
||||
helm upgrade -i --create-namespace -n argocd argocd argo/argo-cd #-f values.yaml
|
||||
kubectl wait -n argocd deploy/argocd-server --for=condition=available
|
||||
kubectl apply -f application.yaml
|
||||
#
|
||||
argocd --core app sync argocd
|
||||
)
|
||||
|
||||
[ x"$TARGETNS" != x"$ORIGNS" ] && kubectl config set-context --current --namespace "$ORIGNS"
|
62
poop/_helpers.tpl
Normal file
62
poop/_helpers.tpl
Normal file
|
@ -0,0 +1,62 @@
|
|||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "argo1.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 "argo1.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 "argo1.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "argo1.labels" -}}
|
||||
helm.sh/chart: {{ include "argo1.chart" . }}
|
||||
{{ include "argo1.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "argo1.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "argo1.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "argo1.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "argo1.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
18
poop/argocd.yaml
Normal file
18
poop/argocd.yaml
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}"
|
||||
namespace: "{{ .Release.Namespace }}"
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: "{{ .Chart.dependencies[0].repository }}"
|
||||
targetRevision: "{{ .Chart.dependencies[0].version }}"
|
||||
chart: "{{ .Chart.dependencies[0].name }}"
|
||||
helm:
|
||||
values: |
|
||||
{{ .Values.argocd.values | nindent 12 }}
|
||||
destination:
|
||||
namespace: "{{ .Values.argocd.namespace }}"
|
||||
name: in-cluster
|
24
values.yaml
Normal file
24
values.yaml
Normal file
|
@ -0,0 +1,24 @@
|
|||
argo-cd:
|
||||
configs:
|
||||
params:
|
||||
"server.insecure": "true"
|
||||
|
||||
controller:
|
||||
replicas: 2
|
||||
|
||||
server:
|
||||
ingress:
|
||||
enabled: true
|
||||
hosts: &hhosts
|
||||
- argocd.strudelline.net
|
||||
tls:
|
||||
- hosts: *hhosts
|
||||
secretName: wildcard-tls
|
||||
ingressGrpc:
|
||||
enabled: true
|
||||
hosts: &ghosts
|
||||
- grpc-argocd.strudelline.net
|
||||
tls:
|
||||
- hosts: *ghosts
|
||||
secretName: wildcard-tls
|
||||
|
Loading…
Reference in New Issue
Block a user