diff --git a/k8s/M6-rocky-cluster-role.yaml b/k8s/M6-rocky-cluster-role.yaml index a2ab2f47..7297de15 100644 --- a/k8s/M6-rocky-cluster-role.yaml +++ b/k8s/M6-rocky-cluster-role.yaml @@ -8,3 +8,31 @@ rules: - apiGroups: ["", extensions, apps] resources: [deployments, replicasets, pods, services, ingresses, statefulsets] verbs: [get, list, watch, create, update, patch, delete] # You can also use [*] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: rocky-pv-access +rules: +- apiGroups: [""] + resources: [persistentvolumes] + verbs: [get, list, watch, create, patch] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + toolkit.fluxcd.io/tenant: rocky + name: rocky-reconciler2 +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: rocky-pv-access +subjects: +- apiGroup: rbac.authorization.k8s.io + kind: User + name: gotk:rocky-test:reconciler +- kind: ServiceAccount + name: rocky + namespace: rocky-test + \ No newline at end of file diff --git a/slides/images/M6-flux-config-dependencies.png b/slides/images/M6-flux-config-dependencies.png new file mode 100644 index 00000000..3c213946 Binary files /dev/null and b/slides/images/M6-flux-config-dependencies.png differ diff --git a/slides/images/M6-github-add-token.jpg b/slides/images/M6-github-add-token.jpg index 3980f186..fc5e405a 100644 Binary files a/slides/images/M6-github-add-token.jpg and b/slides/images/M6-github-add-token.jpg differ diff --git a/slides/images/M6-github-teams.png b/slides/images/M6-github-teams.png index 26b616e3..e8ab0de9 100644 Binary files a/slides/images/M6-github-teams.png and b/slides/images/M6-github-teams.png differ diff --git a/slides/images/M6-persistentvolumes.png b/slides/images/M6-persistentvolumes.png new file mode 100644 index 00000000..04577157 Binary files /dev/null and b/slides/images/M6-persistentvolumes.png differ diff --git a/slides/k8s/M6-R01-flux_configure-ROCKY-deployment.md b/slides/k8s/M6-R01-flux_configure-ROCKY-deployment.md index 17eb0f7f..c2dd4245 100644 --- a/slides/k8s/M6-R01-flux_configure-ROCKY-deployment.md +++ b/slides/k8s/M6-R01-flux_configure-ROCKY-deployment.md @@ -1,12 +1,13 @@ # R01- Configuring **_🎸ROCKY_** deployment with Flux The **_⚙️OPS_** team manages 2 distinct envs: _**⚗️TEST**_ et _**🚜PROD**_ + Thanks to _Kustomize_ 1. it creates a **_base_** common config 2. this common config is overwritten with a _**⚗️TEST**_ _tenant_-specific configuration 3. the same applies with a _**🚜PROD**_-specific configuration -> 💡 This seems complex, but no worries: Flux's CLI handles the essentials. +> 💡 This seems complex, but no worries: Flux's CLI handles most of it. --- @@ -30,33 +31,33 @@ k8s@shpod:~/fleet-config-using-flux-XXXXX$ \ --- +class: extra-details + ### 📂 ./tenants/base/rocky/rbac.yaml Let's see our file… -3 resources are created: +3 resources are created: `Namespace`, `ServiceAccount`, and `ClusterRoleBinding` -- `Namespace`, -- a `ServiceAccount` and -- a `ClusterRoleBinding` +`Flux` **impersonates** as this `ServiceAccount` when it applies any resources found in this _tenant_-dedicated source(s) -`Flux` impersonates as this `ServiceAccount` when it applies any resources found in this tenant-dedicated source(s) -By default, the `ServiceAccount` is bound to a `ClusterRole` named `cluster-admin` +- By default, the `ServiceAccount` is bound to the `cluster-admin` `ClusterRole` +- The team maintaining the sourced `Github` repository is almighty at cluster scope -It means that, any team that maintain the sourced `Github` repository is able to apply Kubernetes resources as `cluster-admin` -A not that much isolated tenant! 😕 +A not that much isolated _tenant_! 😕 -That's why the **_⚙️OPS_** team forces a binding to a specific `ClusterRole` -Let's create this ClusterRole permissions! +That's why the **_⚙️OPS_** team enforces specific `ClusterRoles` with restricted permissions + +Let's create these permissions! --- ## _namespace_ isolation for **_🎸ROCKY_** - .lab[ -- Here is a `ClusterRole` with permissions restricted to the dedicated `Namespace` +- Here are the restricted permissions to use in the `rocky-test` `Namespace` + ```bash k8s@shpod:~/fleet-config-using-flux-XXXXX$ \ cp ~/container.training/k8s/M6-rocky-cluster-role.yaml ./tenants/base/rocky/ @@ -64,6 +65,9 @@ k8s@shpod:~/fleet-config-using-flux-XXXXX$ \ ] +> 💡 Note that some resources are managed at cluster scope (like `PersistentVolumes`). +> We need specific permissions, then… + --- ## Creating `Github` source in Flux for **_🎸ROCKY_** app repository @@ -73,24 +77,41 @@ A specific _branch_ of the `Github` repository is monitored by the `Flux` source .lab[ - ⚠️ you may change the **repository URL** to the one of your own clone + ```bash k8s@shpod:~/fleet-config-using-flux-XXXXX$ flux create source git rocky-app \ --namespace=rocky-test \ --url=https://github.com/Musk8teers/container.training-spring-music/ \ --branch=rocky --export > ./tenants/base/rocky/sync.yaml -k8s@shpod:~/fleet-config-using-flux-XXXXX$ flux create kustomization rocky \ - --namespace=rocky-test \ - --service-account=rocky \ - --source=GitRepository/rocky-app \ - --path="./k8s/" --export >> ./tenants/base/rocky/sync.yaml -k8s@shpod:~/fleet-config-using-flux-XXXXX$ cd ./tenants/base/rocky/ && \ - kustomize create --autodetect && cd - ``` ] --- +## Creating `kustomization` in Flux for **_🎸ROCKY_** app repository + +.lab[ + +```bash +k8s@shpod:~/fleet-config-using-flux-XXXXX$ flux create kustomization rocky \ + --namespace=rocky-test \ + --service-account=rocky \ + --source=GitRepository/rocky-app \ + --path="./k8s/" --export >> ./tenants/base/rocky/sync.yaml + +k8s@shpod:~/fleet-config-using-flux-XXXXX$ \ + cd ./tenants/base/rocky/ && \ + kustomize create --autodetect && \ + cd - +``` + +] + +--- + +class: extra-details + ### 📂 Flux config files Let's review our `Flux` configuration files @@ -109,13 +130,13 @@ k8s@shpod:~/fleet-config-using-flux-XXXXX$ \ ## Adding a kustomize patch for _**⚗️TEST**_ cluster deployment -Remember! -The `Flux` tenant-dedicated configuration is looking for this file `.tenants/test/rocky/kustomization.yaml` -It has been configured here: `clusters/CLOUDY/tenants.yaml` +💡 Remember the DRY strategy! -All the files we just created are located in `.tenants/base/rocky` (remember the DRY strategy) +- The `Flux` tenant-dedicated configuration is looking for this file: `.tenants/test/rocky/kustomization.yaml` +- It has been configured here: `clusters/CLOUDY/tenants.yaml` -So we have to create a specific kustomization in the right location +- All the files we just created are located in `.tenants/base/rocky` +- So we have to create a specific kustomization in the right location ```bash k8s@shpod:~/fleet-config-using-flux-XXXXX$ \ @@ -129,7 +150,7 @@ k8s@shpod:~/fleet-config-using-flux-XXXXX$ \ ### Synchronizing Flux config with its Github repo Locally, our `Flux` config repo is ready -The ops team has to push it to `Github` +The **_⚙️OPS_** team has to push it to `Github` for `Flux` controllers to watch and catch it! .lab[ @@ -173,7 +194,7 @@ rocky-test gitrepository/rocky-app rocky@sha1:ffe9f3fe False class: extra-details -### Flux resources for ROCKY tenant 2/2 +### Flux resources for ROCKY _tenant_ 2/2 .lab[ @@ -216,14 +237,14 @@ We have to fix the mutation by applying the change without having to patch the r class: extra-details -## And then it's deployed +## And then it's deployed 1/2 You should see the following resources in the `rocky-test` namespace .lab[ ```bash -k8s@shpod-578d64468-tp7r2 ~/$ k get all -n rocky-test +k8s@shpod-578d64468-tp7r2 ~/$ k get pods,svc,deployments -n rocky-test NAME READY STATUS RESTARTS AGE pod/db-0 1/1 Running 0 47s pod/web-6c677bf97f-c7pkv 0/1 Running 1 (22s ago) 47s @@ -235,31 +256,141 @@ service/web ClusterIP 10.32.2.202 80/TCP 48s NAME READY UP-TO-DATE AVAILABLE AGE deployment.apps/web 0/2 2 0 47s - -NAME DESIRED CURRENT READY AGE -replicaset.apps/web-6c677bf97f 2 2 0 47s - -NAME READY AGE -statefulset.apps/db 1/1 47s ``` ] --- +class: extra-details + +## And then it's deployed 2/2 + +You should see the following resources in the `rocky-test` namespace + +.lab[ + +```bash +k8s@shpod-578d64468-tp7r2 ~/$ k get statefulsets,pvc,pv -n rocky-test +NAME READY AGE +statefulset.apps/db 1/1 47s + +NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS VOLUMEATTRIBUTESCLASS AGE +persistentvolumeclaim/postgresql-data-db-0 Bound pvc-c1963a2b-4fc9-4c74-9c5a-b0870b23e59a 1Gi RWO sbs-default 47s + +NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS VOLUMEATTRIBUTESCLASS REASON AGE +persistentvolume/postgresql-data 1Gi RWO,RWX Retain Available 47s +persistentvolume/pvc-150fcef5-ebba-458e-951f-68a7e214c635 1G RWO Delete Bound shpod/shpod sbs-default 4h46m +persistentvolume/pvc-c1963a2b-4fc9-4c74-9c5a-b0870b23e59a 1Gi RWO Delete Bound rocky-test/postgresql-data-db-0 sbs-default 47s +``` + +] + +--- + +class: extra-details + +### PersistentVolumes are using a default `StorageClass` + +💡 This managed cluster comes with custom `StorageClasses` leveraging on Cloud _IaaS_ capabilities (i.e. block devices) + +![Flux configuration waterfall](images/M6-persistentvolumes.png) + +- a default `StorageClass` is applied if none is specified (like here) +- for **_🏭PROD_** purpose, ops team might enforce a more performant `StorageClass` +- on a bare-metal cluster, **_🏭PROD_** team has to configure and provide `StorageClasses` on its own + +--- + +class: pic + +![Flux configuration waterfall](images/M6-flux-config-dependencies.png) + +--- + + ## Upgrading ROCKY app The Git source named `rocky-app` is pointing at -- a Github repository named [https://github.com/Musk8teers/container.training-spring-music/] +- a Github repository named [Musk8teers/container.training-spring-music](https://github.com/Musk8teers/container.training-spring-music/) - on its branch named `rocky` This branch deploy the v1.0.0 of the _Web_ app: `spec.template.spec.containers.image: ghcr.io/musk8teers/container.training-spring-music:1.0.0` -What happens if we upgrade this branch to deploy `v1.0.1` of the _Web_ app? +What happens if the **_🎸ROCKY_** team upgrades its branch to deploy `v1.0.1` of the _Web_ app? --- -## tenant **_🏭PROD_** +## _tenant_ **_🏭PROD_** -**_🏭PROD_** tenant is still waiting for its `Flux` configuration, but don't bother for it right now. +💡 **_🏭PROD_** _tenant_ is still waiting for its `Flux` configuration, but don't bother for it right now. + +--- + +### 🗺️ Where are we in our scenario? + +
+%%{init:
+    {
+      "theme": "default",
+      "gitGraph": {
+        "mainBranchName": "OPS",
+        "mainBranchOrder": 0
+      }
+    }
+}%%
+gitGraph
+    commit id:"0" tag:"start"
+    branch ROCKY order:3
+    branch MOVY order:4
+    branch YouRHere order:5
+
+    checkout OPS
+    commit id:'Flux install on CLOUDY cluster' tag:'T01'
+    branch TEST-env order:1
+    commit id:'FLUX install on TEST' tag:'T02' type: HIGHLIGHT
+
+    checkout OPS
+    commit id:'ROCKY config.' tag:'T03'
+    commit id:'namespace isolation by RBAC'
+    checkout TEST-env
+    merge OPS id:'ROCKY tenant creation' tag:'T04'
+
+    checkout OPS
+    commit id:'ROCKY deploy. config.' tag:'R01'
+
+    checkout TEST-env
+    merge OPS id:'FLUX ready to deploy ROCKY' type: HIGHLIGHT tag:'R02'
+
+    checkout ROCKY
+    commit id:'ROCKY' tag:'v1.0.0'
+
+    checkout TEST-env
+    merge ROCKY tag:'ROCKY v1.0.0'
+
+    checkout YouRHere
+    commit id:'x'
+    checkout OPS
+    merge YouRHere id:'YOU ARE HERE'
+
+    checkout OPS
+    commit id:'ROCKY patch for ingress config.' tag:'R03'
+    checkout TEST-env
+    merge OPS id:'ingress config. for ROCKY app'
+
+    checkout OPS
+    commit id:'Ingress-controller config.' tag:'T05'
+    checkout TEST-env
+    merge OPS id:'Ingress-controller install' type: HIGHLIGHT tag:'T06'
+
+    checkout ROCKY
+    commit id:'blue color' tag:'v1.0.1'
+    checkout TEST-env
+    merge ROCKY tag:'ROCKY v1.0.1'
+
+    checkout ROCKY
+    commit id:'pink color' tag:'v1.0.2'
+    checkout TEST-env
+    merge ROCKY tag:'ROCKY v1.0.2'
+
diff --git a/slides/k8s/M6-START-a-company-scenario.md b/slides/k8s/M6-START-a-company-scenario.md index c9936e62..d95cafb5 100644 --- a/slides/k8s/M6-START-a-company-scenario.md +++ b/slides/k8s/M6-START-a-company-scenario.md @@ -250,87 +250,97 @@ The **_⚙️OPS_** team aims to provide clusters offering the following feature gitGraph commit id:"0" tag:"start" branch ROCKY order:3 - branch CLASSY order:4 + branch MOVY order:4 checkout OPS commit id:'Flux install on CLOUDY cluster' tag:'T01' - branch CLOUDY-cluster_TEST-env order:1 + branch TEST-env order:1 commit id:'FLUX install on TEST' tag:'T02' type: HIGHLIGHT checkout OPS commit id:'ROCKY config.' tag:'T03' - checkout CLOUDY-cluster_TEST-env + commit id:'namespace isolation by RBAC' + checkout TEST-env merge OPS id:'ROCKY tenant creation' tag:'T04' checkout OPS commit id:'ROCKY deploy. config.' tag:'R01' - checkout CLOUDY-cluster_TEST-env + checkout TEST-env merge OPS id:'FLUX ready to deploy ROCKY' type: HIGHLIGHT tag:'R02' checkout ROCKY - commit id:'ROCKY' tag:'v1.0' + commit id:'ROCKY' tag:'v1.0.0' - checkout CLOUDY-cluster_TEST-env - merge ROCKY tag:'ROCKY v1.0' - - checkout CLASSY - commit id:'CLASSY' tag:'v1.0' - - checkout CLASSY - commit id:'CLASSY HELM chart' tag:'C01' + checkout TEST-env + merge ROCKY tag:'ROCKY v1.0.0' checkout OPS - commit id:'FLUX config for CLASSY deployment' tag:'C02' - checkout CLOUDY-cluster_TEST-env - merge OPS id:'FLUX ready to deploy CLASSY' type: HIGHLIGHT tag:'C03' + commit id:'ROCKY patch for ingress config.' tag:'R03' + checkout TEST-env + merge OPS id:'ingress config. for ROCKY app' + + checkout OPS + commit id:'Ingress-controller config.' tag:'T05' + checkout TEST-env + merge OPS id:'Ingress-controller install' type: HIGHLIGHT tag:'T06' - checkout CLOUDY-cluster_TEST-env - merge CLASSY tag:'CLASSY v1.0' - checkout ROCKY - commit id:'new color' tag:'v1.1' - checkout CLOUDY-cluster_TEST-env - merge ROCKY tag:'ROCKY v1.1' + commit id:'blue color' tag:'v1.0.1' + checkout TEST-env + merge ROCKY tag:'ROCKY v1.0.1' - checkout CLOUDY-cluster_TEST-env - commit id:'wrong namespace' type: REVERSE + checkout ROCKY + commit id:'pink color' tag:'v1.0.2' + checkout TEST-env + merge ROCKY tag:'ROCKY v1.0.2' + + checkout MOVY + commit id:'MOVY' tag:'v1.0.3' + checkout TEST-env + merge MOVY tag:'MOVY v1.0.3' type: REVERSE + + checkout MOVY + commit id:'MOVY HELM chart' tag:'C01' checkout OPS - commit id:'namespace isolation' - checkout CLOUDY-cluster_TEST-env - merge OPS type: HIGHLIGHT + commit id:'FLUX config for MOVY deployment' tag:'C02' + checkout TEST-env + merge OPS id:'FLUX ready to deploy MOVY' type: HIGHLIGHT tag:'C03' + checkout TEST-env + merge MOVY tag:'MOVY v1.0' + checkout ROCKY commit id:'fix namespace' tag:'v1.1.1' - checkout CLOUDY-cluster_TEST-env + checkout TEST-env merge ROCKY tag:'ROCKY v1.1.1' checkout ROCKY commit id:'add a field' tag:'v1.2' - checkout CLOUDY-cluster_TEST-env + checkout TEST-env merge ROCKY tag:'ROCKY v1.2' checkout OPS commit id:'Kyverno install' commit id:'Kyverno rules' - checkout CLOUDY-cluster_TEST-env + checkout TEST-env merge OPS type: HIGHLIGHT checkout OPS commit id:'Network policies' - checkout CLOUDY-cluster_TEST-env + checkout TEST-env merge OPS type: HIGHLIGHT checkout OPS - branch PROD-cluster order:2 + branch PROD-env order:2 commit id:'FLUX install on PROD' commit id:'PROD cluster configuration' checkout OPS commit id:'Add OpenEBS' - checkout CLOUDY-cluster_TEST-env + checkout TEST-env merge OPS id:'patch dedicated to PROD' type: REVERSE - checkout PROD-cluster + checkout PROD-env merge OPS type: HIGHLIGHT diff --git a/slides/k8s/M6-T02-flux-install.md b/slides/k8s/M6-T02-flux-install.md index 9b09084b..1d106b8b 100644 --- a/slides/k8s/M6-T02-flux-install.md +++ b/slides/k8s/M6-T02-flux-install.md @@ -294,7 +294,7 @@ flux-system kustomization/flux-system main@sha1:d48291a8 False - ensuring proper access and permissions 2. It locally generates `YAML` files for desired `Flux` resources so that we just need to `git push` them - - tenants + - _tenants_ - sources - … @@ -353,3 +353,53 @@ Please, refer to the [`Kustomize` chapter in the High Five M3 module](./3.yml.ht For more info about how Kubernetes resource natures are identified by their `Group / Version / Kind` triplet… … please, refer to the [`Kubernetes API` chapter in the High Five M5 module](./5.yml.html#toc-the-kubernetes-api) + +--- + +### 🗺️ Where are we in our scenario? + +
+%%{init:
+    {
+      "theme": "default",
+      "gitGraph": {
+        "mainBranchName": "OPS",
+        "mainBranchOrder": 0
+      }
+    }
+}%%
+gitGraph
+    commit id:"0" tag:"start"
+    branch ROCKY order:3
+    branch MOVY order:4
+    branch YouRHere order:5
+
+    checkout OPS
+    commit id:'Flux install on CLOUDY cluster' tag:'T01'
+    branch TEST-env order:1
+    commit id:'FLUX install on TEST' tag:'T02' type: HIGHLIGHT
+
+    checkout YouRHere
+    commit id:'x'
+    checkout OPS
+    merge YouRHere id:'YOU ARE HERE'
+
+
+    checkout OPS
+    commit id:'ROCKY config.' tag:'T03'
+    commit id:'namespace isolation by RBAC'
+    checkout TEST-env
+    merge OPS id:'ROCKY tenant creation' tag:'T04'
+
+    checkout OPS
+    commit id:'ROCKY deploy. config.' tag:'R01'
+
+    checkout TEST-env
+    merge OPS id:'FLUX ready to deploy ROCKY' type: HIGHLIGHT tag:'R02'
+
+    checkout ROCKY
+    commit id:'ROCKY' tag:'v1.0.0'
+
+    checkout TEST-env
+    merge ROCKY tag:'ROCKY v1.0.0'
+
diff --git a/slides/k8s/M6-T03-installing-tenants.md b/slides/k8s/M6-T03-installing-tenants.md index a7264ccc..80223ea1 100644 --- a/slides/k8s/M6-T03-installing-tenants.md +++ b/slides/k8s/M6-T03-installing-tenants.md @@ -5,7 +5,7 @@ The **_⚙️OPS_** team uses `Flux` with a _GitOps_ code base to: - configure the clusters - deploy tools and components to extend the clusters capabilites -- configure _GitOps_ workflow for dev teams in **dedicated and isolated tenants** +- configure _GitOps_ workflow for dev teams in **dedicated and isolated _tenants_** The **_🎸ROCKY_** team uses `Flux` to deploy every new release of its app, by detecting every new `git push` events happening in its app `Github` repository @@ -14,15 +14,15 @@ The **_🎬MOVY_** team uses `Flux` to deploy every new release of its app, pack --- -## Creating tenants with Flux +## Creating _tenants_ with Flux While basic `Flux` behavior is to use a single configuration directory applied by a cluster-wide role… … it can also enable _multi-tenant_ configuration by: -- creating dedicated directories for each tenant in its configuration code base -- and using a dedicated `ServiceAccount` with limited permissions to operate in each tenant +- creating dedicated directories for each _tenant_ in its configuration code base +- and using a dedicated `ServiceAccount` with limited permissions to operate in each _tenant_ -Several tenants are created +Several _tenants_ are created - per env - for **_⚗️TEST_** - and **_🏭PROD_** @@ -50,7 +50,7 @@ First, we have to **locally** clone your `Flux` configuration `Github` repositor ### The command line 1/2 -Creating the **_⚗️TEST_** tenant +Creating the **_⚗️TEST_** _tenant_ .lab[ @@ -72,7 +72,7 @@ k8s@shpod:~/fleet-config-using-flux-XXXXX$ \ ### The command line 2/2 -Then we create the **_🏭PROD_** tenant +Then we create the **_🏭PROD_** _tenant_ .lab[ @@ -143,3 +143,52 @@ What the **_⚙️OPS_** team has to do: What the **_🎸ROCKY_** team has to do: - 👨‍💻 Create the `kustomization.yaml` file in the **_🎸ROCKY_** app source code repository on `Github` + +--- + +### 🗺️ Where are we in our scenario? + +
+%%{init:
+    {
+      "theme": "default",
+      "gitGraph": {
+        "mainBranchName": "OPS",
+        "mainBranchOrder": 0
+      }
+    }
+}%%
+gitGraph
+    commit id:"0" tag:"start"
+    branch ROCKY order:3
+    branch MOVY order:4
+    branch YouRHere order:5
+
+    checkout OPS
+    commit id:'Flux install on CLOUDY cluster' tag:'T01'
+    branch TEST-env order:1
+    commit id:'FLUX install on TEST' tag:'T02' type: HIGHLIGHT
+
+    checkout OPS
+    commit id:'ROCKY config.' tag:'T03'
+    commit id:'namespace isolation by RBAC'
+    checkout TEST-env
+    merge OPS id:'ROCKY tenant creation' tag:'T04'
+
+    checkout YouRHere
+    commit id:'x'
+    checkout OPS
+    merge YouRHere id:'YOU ARE HERE'
+
+    checkout OPS
+    commit id:'ROCKY deploy. config.' tag:'R01'
+
+    checkout TEST-env
+    merge OPS id:'FLUX ready to deploy ROCKY' type: HIGHLIGHT tag:'R02'
+
+    checkout ROCKY
+    commit id:'ROCKY' tag:'v1.0.0'
+
+    checkout TEST-env
+    merge ROCKY tag:'ROCKY v1.0.0'
+
diff --git a/slides/k8s/M6-mermaid.md b/slides/k8s/M6-mermaid.md new file mode 100644 index 00000000..3a5e783c --- /dev/null +++ b/slides/k8s/M6-mermaid.md @@ -0,0 +1,111 @@ +%%{init: + { + "theme": "default", + "gitGraph": { + "mainBranchName": "OPS", + "mainBranchOrder": 0 + } + } +}%% +gitGraph + commit id:"0" tag:"start" + branch ROCKY order:3 + branch MOVY order:4 + branch YouRHere order:5 + + checkout YouRHere + commit id:'x' + checkout OPS + merge YouRHere id:'YOU ARE HERE' + + checkout OPS + commit id:'Flux install on CLOUDY cluster' tag:'T01' + branch TEST-env order:1 + commit id:'FLUX install on TEST' tag:'T02' type: HIGHLIGHT + + checkout OPS + commit id:'ROCKY config.' tag:'T03' + commit id:'namespace isolation by RBAC' + checkout TEST-env + merge OPS id:'ROCKY tenant creation' tag:'T04' + + checkout OPS + commit id:'ROCKY deploy. config.' tag:'R01' + + checkout TEST-env + merge OPS id:'FLUX ready to deploy ROCKY' type: HIGHLIGHT tag:'R02' + + checkout ROCKY + commit id:'ROCKY' tag:'v1.0.0' + + checkout TEST-env + merge ROCKY tag:'ROCKY v1.0.0' + + checkout OPS + commit id:'ROCKY patch for ingress config.' tag:'R03' + checkout TEST-env + merge OPS id:'ingress config. for ROCKY app' + + checkout OPS + commit id:'Ingress-controller config.' tag:'T05' + checkout TEST-env + merge OPS id:'Ingress-controller install' type: HIGHLIGHT tag:'T06' + + checkout ROCKY + commit id:'blue color' tag:'v1.0.1' + checkout TEST-env + merge ROCKY tag:'ROCKY v1.0.1' + + checkout ROCKY + commit id:'pink color' tag:'v1.0.2' + checkout TEST-env + merge ROCKY tag:'ROCKY v1.0.2' + + checkout MOVY + commit id:'MOVY' tag:'v1.0.3' + checkout TEST-env + merge MOVY tag:'MOVY v1.0.3' type: REVERSE + + checkout MOVY + commit id:'MOVY HELM chart' tag:'C01' + + checkout OPS + commit id:'FLUX config for MOVY deployment' tag:'C02' + checkout TEST-env + merge OPS id:'FLUX ready to deploy MOVY' type: HIGHLIGHT tag:'C03' + + checkout TEST-env + merge MOVY tag:'MOVY v1.0' + + checkout ROCKY + commit id:'fix namespace' tag:'v1.1.1' + checkout TEST-env + merge ROCKY tag:'ROCKY v1.1.1' + + checkout ROCKY + commit id:'add a field' tag:'v1.2' + checkout TEST-env + merge ROCKY tag:'ROCKY v1.2' + + checkout OPS + commit id:'Kyverno install' + commit id:'Kyverno rules' + checkout TEST-env + merge OPS type: HIGHLIGHT + + checkout OPS + commit id:'Network policies' + checkout TEST-env + merge OPS type: HIGHLIGHT + + checkout OPS + branch PROD-env order:2 + commit id:'FLUX install on PROD' + commit id:'PROD cluster configuration' + + checkout OPS + commit id:'Add OpenEBS' + checkout TEST-env + merge OPS id:'patch dedicated to PROD' type: REVERSE + checkout PROD-env + merge OPS type: HIGHLIGHT