Simon Kaiser 3 роки тому
джерело
коміт
84ba4dd6ae

+ 6
- 1
README.md Переглянути файл

@@ -20,7 +20,6 @@ kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/
20 20
 ```
21 21
 helm install -n argocd argo-cd argo/argo-cd --create-namespace
22 22
 // Currently not unused: kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj-labs/applicationset/v0.3.0/manifests/install.yaml
23
-kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
24 23
 ```
25 24
 
26 25
 ### Cluster
@@ -28,6 +27,12 @@ kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.pas
28 27
 kubectl apply -f application-cluster-kaisers-info.yaml
29 28
 ```
30 29
 MISSING: argo cli call to sync applications
30
+kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
31
+argocd login argo-cd.kaisers.info --grpc-web
32
+ODER
33
+argocd login SERVER-IP --grpc-web
34
+argocd app sync cluster-kaisers-info
35
+
31 36
 ```
32 37
 kubectl apply -f gitops-kaisers-info/templates/argocd-kaisers-info-secrets-sealed.yaml 
33 38
 ```

+ 51
- 0
application-wiki-kaisers-info.yaml Переглянути файл

@@ -0,0 +1,51 @@
1
+apiVersion: argoproj.io/v1alpha1
2
+kind: AppProject
3
+metadata:
4
+  name: wiki-kaisers-info
5
+  namespace: argocd
6
+  # Finalizer that ensures that project is not deleted until it is not referenced by any application
7
+  finalizers:
8
+    - resources-finalizer.argocd.argoproj.io
9
+spec:
10
+  description: Wiki.js for kaisers.info
11
+  clusterResourceWhitelist:
12
+  - group: '*'
13
+    kind: '*'
14
+  destinations:
15
+  - name: '*'
16
+    namespace: '*'
17
+    server: '*'
18
+  namespaceResourceWhitelist:
19
+  - group: '*'
20
+    kind: '*'
21
+  sourceRepos:
22
+  - '*'
23
+---
24
+apiVersion: v1
25
+kind: Secret
26
+metadata:
27
+  name: repo-k8s-kaisers-info
28
+  namespace: argocd
29
+  labels:
30
+    argocd.argoproj.io/secret-type: repository
31
+stringData:
32
+  url: https://git.kaisers.info/simonkaiser/k8s-kaisers-info
33
+---
34
+apiVersion: argoproj.io/v1alpha1
35
+kind: Application
36
+metadata:
37
+  name: wiki-kaisers-info
38
+  namespace: argocd
39
+spec:
40
+  destination:
41
+    name: in-cluster
42
+    namespace: argocd
43
+  project: wiki-kaisers-info
44
+  source:
45
+    repoURL: https://git.kaisers.info/simonkaiser/k8s-kaisers-info
46
+    path: wiki-kaisers-info
47
+    targetRevision: master
48
+  syncPolicy:
49
+    automated:
50
+      prune: true
51
+      selfHeal: true

+ 23
- 0
wiki-kaisers-info/Chart.yaml Переглянути файл

@@ -0,0 +1,23 @@
1
+apiVersion: v2
2
+name: wiki-kaisers-info
3
+description: Applications
4
+
5
+# A chart can be either an 'application' or a 'library' chart.
6
+#
7
+# Application charts are a collection of templates that can be packaged into versioned archives
8
+# to be deployed.
9
+#
10
+# Library charts provide useful utilities or functions for the chart developer. They're included as
11
+# a dependency of application charts to inject those utilities and functions into the rendering
12
+# pipeline. Library charts do not define any templates and therefore cannot be deployed.
13
+type: application
14
+
15
+# This is the chart version. This version number should be incremented each time you make changes
16
+# to the chart and its templates, including the app version.
17
+# Versions are expected to follow Semantic Versioning (https://semver.org/)
18
+version: 0.1.0
19
+
20
+# This is the version number of the application being deployed. This version number should be
21
+# incremented each time you make changes to the application. Versions are not expected to
22
+# follow Semantic Versioning. They should reflect the version the application is using.
23
+appVersion: "0.1.0"

+ 6
- 0
wiki-kaisers-info/templates/namespaces.yaml Переглянути файл

@@ -0,0 +1,6 @@
1
+apiVersion: v1
2
+kind: Namespace
3
+metadata:
4
+  name: wikijs
5
+  annotations:
6
+    argocd.argoproj.io/sync-wave: "-1"

+ 38
- 0
wiki-kaisers-info/templates/wikijs.yaml Переглянути файл

@@ -0,0 +1,38 @@
1
+apiVersion: argoproj.io/v1alpha1
2
+kind: Application
3
+metadata:
4
+  name: wordpress
5
+  namespace: {{ .Values.spec.namespace }}
6
+  finalizers:
7
+  - resources-finalizer.argocd.argoproj.io
8
+spec:
9
+  destination:
10
+    namespace: wordpress
11
+    name: {{ .Values.spec.destination.name }}
12
+  project: {{ .Values.spec.project }}
13
+  syncPolicy:
14
+    automated:
15
+      prune: true
16
+      selfHeal: true
17
+  source:
18
+    chart: wiki
19
+    repoURL: https://charts.js.wiki
20
+    targetRevision: 14.3.1
21
+    helm:
22
+      releaseName: wiki
23
+      values: |
24
+        ingress:
25
+          enabled: true
26
+          className: ""
27
+          annotations: {}
28
+            cert-manager.io/cluster-issuer: "letsencrypt-prod"
29
+          hosts:
30
+            - host: wiki.kaisers.info
31
+              paths:
32
+                - path: "/"
33
+                  pathType: Prefix
34
+
35
+          tls:
36
+            - secretName: "wikijs-kaisers-info-tls"
37
+              hosts:
38
+                - "wiki.kaisers.info"

+ 13
- 0
wiki-kaisers-info/values.yaml Переглянути файл

@@ -0,0 +1,13 @@
1
+spec:
2
+  destination:
3
+    name: in-cluster
4
+  source:
5
+    path: wiki-kaisers-info
6
+    repoURL: https://git.kaisers.info/simonkaiser/k8s-kaisers-info.git
7
+    targetRevision: master
8
+  project: wiki-kaisers-info
9
+  namespace: argocd
10
+  syncPolicy:
11
+    automated:
12
+      prune: true
13
+      selfHeal: true