initial import
This commit is contained in:
parent
86e5f73886
commit
21f6d2d05a
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
\#*#
|
||||||
|
*~
|
9
argo1/Chart.lock
Normal file
9
argo1/Chart.lock
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
dependencies:
|
||||||
|
- name: argo-cd
|
||||||
|
repository: https://argoproj.github.io/argo-helm
|
||||||
|
version: 5.29.1
|
||||||
|
- name: argocd-apps
|
||||||
|
repository: https://argoproj.github.io/argo-helm
|
||||||
|
version: 0.0.9
|
||||||
|
digest: sha256:61b3270da67eb8bc6986a8cda0b41b3319dbb07df1295d0ca8cfb5cd31ccc837
|
||||||
|
generated: "2023-04-22T13:16:58.406086-05:00"
|
20
argo1/Chart.yaml
Normal file
20
argo1/Chart.yaml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
apiVersion: v2
|
||||||
|
name: argo1
|
||||||
|
description: A Helm chart for your management ArgoCD of your management ArgoCD
|
||||||
|
|
||||||
|
type: application
|
||||||
|
version: 0.1.0
|
||||||
|
appVersion: &argoVersion 5.29.1
|
||||||
|
|
||||||
|
argoRepo: &argoRepo "https://argoproj.github.io/argo-helm"
|
||||||
|
argoChart: &argoChart argo-cd
|
||||||
|
dependencies:
|
||||||
|
- name: *argoChart
|
||||||
|
version: *argoVersion
|
||||||
|
repository: *argoRepo
|
||||||
|
#- name: argo-cd
|
||||||
|
# version: "5.29.1"
|
||||||
|
# repository: "https://argoproj.github.io/argo-helm"
|
||||||
|
#- name: argocd-apps
|
||||||
|
# version: 0.0.9
|
||||||
|
# repository: "https://argoproj.github.io/argo-helm"
|
0
argo1/README.md
Normal file
0
argo1/README.md
Normal file
1
argo1/argo1
Submodule
1
argo1/argo1
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit b6fe7dcf5c3104cec26db52bde711a4537d58bb8
|
26
argo1/argo1-bad.yaml
Normal file
26
argo1/argo1-bad.yaml
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: argo1
|
||||||
|
namespace: argocd
|
||||||
|
spec:
|
||||||
|
destination:
|
||||||
|
name: in-cluster
|
||||||
|
namespace: argocd
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
path: .
|
||||||
|
repoURL: https://git.strudelline.net/infra/repo1
|
||||||
|
targetRevision: HEAD
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
selfHeal: true
|
||||||
|
retry:
|
||||||
|
backoff:
|
||||||
|
duration: 5s
|
||||||
|
factor: 2
|
||||||
|
maxDuration: 3m0s
|
||||||
|
limit: 10
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
25
argo1/argo2-good.yaml
Normal file
25
argo1/argo2-good.yaml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: argo2
|
||||||
|
namespace: argocd
|
||||||
|
spec:
|
||||||
|
destination:
|
||||||
|
namespace: argocd
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
path: .
|
||||||
|
repoURL: https://git.strudelline.net/infra/argo1
|
||||||
|
targetRevision: main
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
selfHeal: true
|
||||||
|
retry:
|
||||||
|
backoff:
|
||||||
|
duration: 5s
|
||||||
|
factor: 2
|
||||||
|
maxDuration: 3m0s
|
||||||
|
limit: 10
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
19
argo1/blah.yaml
Normal file
19
argo1/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
argo1/charts/argo-cd-5.29.1.tgz
Normal file
BIN
argo1/charts/argo-cd-5.29.1.tgz
Normal file
Binary file not shown.
BIN
argo1/charts/argocd-apps-0.0.9.tgz
Normal file
BIN
argo1/charts/argocd-apps-0.0.9.tgz
Normal file
Binary file not shown.
20
argo1/deploy.sh
Normal file
20
argo1/deploy.sh
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
|
TARGETNS="argocd"
|
||||||
|
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 $TARGETNS
|
||||||
|
helm upgrade -i --create-namespace -n $TARGETNS argo1 argo/argo-cd -f values.yaml
|
||||||
|
kubectl wait -n $TARGETNS 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"
|
21
argo1/infra.yaml
Normal file
21
argo1/infra.yaml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: local-git-argo1
|
||||||
|
namespace: argocd
|
||||||
|
labels:
|
||||||
|
argocd.argoproj.io/secret-type: repository
|
||||||
|
stringData:
|
||||||
|
type: git
|
||||||
|
url: git@github.com/jamesandariese/argo1
|
||||||
|
project: default
|
||||||
|
sshPrivateKey: |
|
||||||
|
-----BEGIN OPENSSH PRIVATE KEY-----
|
||||||
|
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
|
||||||
|
QyNTUxOQAAACCzR5/gYPwL+YJw+N6Tip03tLH3257Ysc3TJqfymV7PpwAAALAezw3sHs8N
|
||||||
|
7AAAAAtzc2gtZWQyNTUxOQAAACCzR5/gYPwL+YJw+N6Tip03tLH3257Ysc3TJqfymV7Ppw
|
||||||
|
AAAEBohw71h5SaZ6zd3c7MSUUNlWoI40LK+D8wxk1BcCeUybNHn+Bg/Av5gnD43pOKnTe0
|
||||||
|
sffbntixzdMmp/KZXs+nAAAAKGphbWVzQEphbWVzcy1NQlAuY2FzY2FkZS5zdHJ1ZGVsbG
|
||||||
|
luZS5uZXQBAgMEBQ==
|
||||||
|
-----END OPENSSH PRIVATE KEY-----
|
15
argo1/install-crds.sh
Normal file
15
argo1/install-crds.sh
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
|
(
|
||||||
|
set -e
|
||||||
|
eval "$(yq -o json . Chart.yaml | jq -r '.dependencies[0] | @sh "CHART=\(.name)\nVERSION=\(.version)\nREPO=\(.repository)"')"
|
||||||
|
helm template argocd-crds "$CHART" --repo "$REPO" --version "$VERSION" | yq 'select(.kind == "CustomResourceDefinition")' | kubectl apply -f -
|
||||||
|
)
|
||||||
|
|
||||||
|
RC=$?
|
||||||
|
if [ $RC -ne 0 ];then
|
||||||
|
1>&2 echo "exiting due to error"
|
||||||
|
exit $RC
|
||||||
|
fi
|
62
argo1/poop/_helpers.tpl
Normal file
62
argo1/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
argo1/poop/argocd.yaml
Normal file
18
argo1/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
|
8
argo1/poop/sshkey
Normal file
8
argo1/poop/sshkey
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
-----BEGIN OPENSSH PRIVATE KEY-----
|
||||||
|
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
|
||||||
|
QyNTUxOQAAACCzR5/gYPwL+YJw+N6Tip03tLH3257Ysc3TJqfymV7PpwAAALAezw3sHs8N
|
||||||
|
7AAAAAtzc2gtZWQyNTUxOQAAACCzR5/gYPwL+YJw+N6Tip03tLH3257Ysc3TJqfymV7Ppw
|
||||||
|
AAAEBohw71h5SaZ6zd3c7MSUUNlWoI40LK+D8wxk1BcCeUybNHn+Bg/Av5gnD43pOKnTe0
|
||||||
|
sffbntixzdMmp/KZXs+nAAAAKGphbWVzQEphbWVzcy1NQlAuY2FzY2FkZS5zdHJ1ZGVsbG
|
||||||
|
luZS5uZXQBAgMEBQ==
|
||||||
|
-----END OPENSSH PRIVATE KEY-----
|
1
argo1/poop/sshkey.pub
Normal file
1
argo1/poop/sshkey.pub
Normal file
|
@ -0,0 +1 @@
|
||||||
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILNHn+Bg/Av5gnD43pOKnTe0sffbntixzdMmp/KZXs+n james@Jamess-MBP.cascade.strudelline.net
|
15
argo1/secrets.yaml
Normal file
15
argo1/secrets.yaml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: local-git-creds
|
||||||
|
namespace: argocd
|
||||||
|
labels:
|
||||||
|
argocd.argoproj.io/secret-type: repo-creds
|
||||||
|
stringData:
|
||||||
|
type: git
|
||||||
|
url: https://git.strudelline.net/
|
||||||
|
password: JwCJznZZMJU4se
|
||||||
|
username: svc-argocd
|
||||||
|
project: default
|
||||||
|
|
18
argo1/templates.back/argocd.yaml
Normal file
18
argo1/templates.back/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: "{{ (index .Chart.Dependencies 0).Repository }}"
|
||||||
|
targetRevision: "{{ (index .Chart.Dependencies 0).Version }}"
|
||||||
|
chart: "{{ (index .Chart.Dependencies 0).Name }}"
|
||||||
|
helm:
|
||||||
|
values: |
|
||||||
|
{{ (index .Values "argo-cd") | toYaml | nindent 12 }}
|
||||||
|
destination:
|
||||||
|
namespace: "{{ .Release.Namespace }}"
|
||||||
|
name: in-cluster
|
13
argo1/templates/self.yaml
Normal file
13
argo1/templates/self.yaml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
---
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: "{{ .Release.Name }}"
|
||||||
|
namespace: "{{ .Release.Namespace }}"
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
{{ .Values.bootstrap.source | toYaml | nindent 4 }}
|
||||||
|
destination:
|
||||||
|
namespace: "{{ .Release.Namespace }}"
|
||||||
|
name: in-cluster
|
57
argo1/values.yaml
Normal file
57
argo1/values.yaml
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
bootstrap:
|
||||||
|
source:
|
||||||
|
repoURL: "git@github.com/jamesandariese/argo1"
|
||||||
|
targetRevision: "main"
|
||||||
|
path: .
|
||||||
|
|
||||||
|
argo-cd:
|
||||||
|
crds:
|
||||||
|
install: false
|
||||||
|
|
||||||
|
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
|
||||||
|
#argocd-apps:
|
||||||
|
# applications:
|
||||||
|
# - name: argo1
|
||||||
|
# destination:
|
||||||
|
# name: in-cluster
|
||||||
|
# namespace: argocd
|
||||||
|
# source:
|
||||||
|
# path: .
|
||||||
|
# repoURL: 'https://git.strudelline.net/infra/argo1'
|
||||||
|
# targetRevision: main
|
||||||
|
# sources: []
|
||||||
|
# project: default
|
||||||
|
# syncPolicy:
|
||||||
|
# automated:
|
||||||
|
# prune: false
|
||||||
|
# selfHeal: true
|
||||||
|
# syncOptions:
|
||||||
|
# - CreateNamespace=true
|
||||||
|
# retry:
|
||||||
|
# limit: 10
|
||||||
|
# backoff:
|
||||||
|
# duration: 5s
|
||||||
|
# maxDuration: 3m0s
|
||||||
|
# factor: 2
|
||||||
|
|
19
argo1/x.yaml
Normal file
19
argo1/x.yaml
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
meta.helm.sh/release-name: argo1
|
||||||
|
meta.helm.sh/release-namespace: argocd
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
name: argo1
|
||||||
|
namespace: argocd
|
||||||
|
spec:
|
||||||
|
destination:
|
||||||
|
namespace: argocd
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
path: .
|
||||||
|
repoURL: https://git.strudelline.net/infra/repo1
|
||||||
|
targetRevision: HEAD
|
Loading…
Reference in New Issue
Block a user