Pārlūkot izejas kodu

Longhorn to cluster

Simon Kaiser 3 gadus atpakaļ
vecāks
revīzija
d25f378d69

+ 18
- 17
README.md Parādīt failu

@@ -10,35 +10,24 @@ All services deployed for kaisers.info as GitOps-capable k8s deployment
10 10
 curl -sfL https://get.k3s.io | sh -s - server --disable local-storage
11 11
 ```
12 12
 
13
-### Cert-Manager CRDs
13
+### CRDs
14 14
 ```
15 15
 // version must fit cert-manager in gitops-kaisers-info
16 16
 kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.8.0/cert-manager.yaml
17 17
 ```
18 18
 
19
-### ArgoCD
20 19
 ```
21
-helm install -n argocd argo-cd argo/argo-cd --create-namespace
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
20
+kubectl apply -k https://github.com/argoproj/argo-cd/manifests/crds\?ref\=stable
24 21
 ```
25 22
 
26 23
 ### Cluster
27 24
 ```
25
+kubectl create namespace argocd
28 26
 kubectl apply -f application-cluster-kaisers-info.yaml
29 27
 ```
30 28
 
31
-### Longhorn
32
-```
33
-kubectl apply -f application-longhorn-kaisers-info.yaml
34
-```
35
-### GitOps
36
-```
37
-kubectl apply -f application-gitops-kaisers-info.yaml
38
-```
39
-
40
-### Sealed-Secrets
41
-#### Own Certificates
29
+#### Sealed-Secrets
30
+##### Own Certificates
42 31
 https://github.com/bitnami-labs/sealed-secrets/blob/main/docs/bring-your-own-certificates.md
43 32
 
44 33
 ```
@@ -53,7 +42,7 @@ kubectl -n "$NAMESPACE" label secret "$SECRETNAME" sealedsecrets.bitnami.com/sea
53 42
 kubectl -n "$NAMESPACE" delete pod -l name=app.kubernetes.io/name=sealed-secrets 
54 43
 ```
55 44
 
56
-#### Sealing a secret
45
+##### Sealing a secret
57 46
 ```
58 47
 
59 48
 echo -n "PASSWORD" \
@@ -63,6 +52,18 @@ echo -n "PASSWORD" \
63 52
 kubectl apply -f sealed-secret.yaml
64 53
 ```
65 54
 
55
+### GitOps
56
+```
57
+kubectl apply -f application-gitops-kaisers-info.yaml
58
+```
59
+
60
+### ArgoCD
61
+```
62
+helm install -n argocd argo-cd argo/argo-cd --create-namespace
63
+// Currently not unused: kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj-labs/applicationset/v0.3.0/manifests/install.yaml
64
+kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
65
+```
66
+
66 67
 ## Services
67 68
 ### Services
68 69
 kubectl apply -f application-services-kaisers-info.yaml

+ 0
- 51
application-longhorn-kaisers-info.yaml Parādīt failu

@@ -1,51 +0,0 @@
1
-apiVersion: argoproj.io/v1alpha1
2
-kind: AppProject
3
-metadata:
4
-  name: longhorn-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: Longhorn distributed block storage 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: longhorn-kaisers-info
38
-  namespace: argocd
39
-spec:
40
-  destination:
41
-    name: in-cluster
42
-    namespace: argocd
43
-  project: longhorn-kaisers-info
44
-  source:
45
-    repoURL: https://git.kaisers.info/simonkaiser/k8s-kaisers-info
46
-    path: longhorn-kaisers-info
47
-    targetRevision: master
48
-  syncPolicy:
49
-    automated:
50
-      prune: true
51
-      selfHeal: true

+ 0
- 51
application-services-kaisers-info.yaml Parādīt failu

@@ -1,51 +0,0 @@
1
-apiVersion: argoproj.io/v1alpha1
2
-kind: AppProject
3
-metadata:
4
-  name: services-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: Services 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: services-kaisers-info
38
-  namespace: argocd
39
-spec:
40
-  destination:
41
-    name: in-cluster
42
-    namespace: argocd
43
-  project: services-kaisers-info
44
-  source:
45
-    repoURL: https://git.kaisers.info/simonkaiser/k8s-kaisers-info
46
-    path: services-kaisers-info
47
-    targetRevision: master
48
-  syncPolicy:
49
-    automated:
50
-      prune: true
51
-      selfHeal: true

+ 28
- 0
appproj-longhorn-kaisers-info.yaml Parādīt failu

@@ -0,0 +1,28 @@
1
+apiVersion: argoproj.io/v1alpha1
2
+kind: AppProject
3
+metadata:
4
+  annotations:
5
+    kubectl.kubernetes.io/last-applied-configuration: |
6
+      {"apiVersion":"argoproj.io/v1alpha1","kind":"AppProject","metadata":{"annotations":{},"finalizers":["resources-finalizer.argocd.argoproj.io"],"name":"longhorn-kaisers-info","namespace":"argocd"},"spec":{"clusterResourceWhitelist":[{"group":"*","kind":"*"}],"description":"Longhorn distributed block storage for kaisers.info","destinations":[{"name":"*","namespace":"*","server":"*"}],"namespaceResourceWhitelist":[{"group":"*","kind":"*"}],"sourceRepos":["*"]}}
7
+  creationTimestamp: "2022-06-22T17:08:07Z"
8
+  deletionGracePeriodSeconds: 0
9
+  deletionTimestamp: "2022-06-22T18:45:41Z"
10
+  generation: 2
11
+  name: longhorn-kaisers-info
12
+  namespace: argocd
13
+  resourceVersion: "9612"
14
+  uid: ae57d5a0-4258-4f7d-a193-acf84010b9ee
15
+spec:
16
+  clusterResourceWhitelist:
17
+  - group: '*'
18
+    kind: '*'
19
+  description: Longhorn distributed block storage for kaisers.info
20
+  destinations:
21
+  - name: '*'
22
+    namespace: '*'
23
+    server: '*'
24
+  namespaceResourceWhitelist:
25
+  - group: '*'
26
+    kind: '*'
27
+  sourceRepos:
28
+  - '*'

longhorn-kaisers-info/templates/longhorn.yaml → cluster-kaisers-info/templates/longhorn.yaml Parādīt failu


+ 7
- 0
cluster-kaisers-info/templates/namespaces.yaml Parādīt failu

@@ -9,5 +9,12 @@ apiVersion: v1
9 9
 kind: Namespace
10 10
 metadata:
11 11
   name: "sealed-secrets"
12
+  annotations:
13
+    argocd.argoproj.io/sync-wave: "-1"
14
+---
15
+apiVersion: v1
16
+kind: Namespace
17
+metadata:
18
+  name: "longhorn-system"
12 19
   annotations:
13 20
     argocd.argoproj.io/sync-wave: "-1"

+ 0
- 23
longhorn-kaisers-info/Chart.yaml Parādīt failu

@@ -1,23 +0,0 @@
1
-apiVersion: v2
2
-name: longhorn-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"

+ 0
- 6
longhorn-kaisers-info/templates/namespaces.yaml Parādīt failu

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

+ 0
- 13
longhorn-kaisers-info/values.yaml Parādīt failu

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