From 48f603067056d82c9c2fc5369872e5ed6572510d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 13 Apr 2023 10:25:07 +0200 Subject: [PATCH 01/13] deps: update ghcr.io/podtato-head/right-arm docker tag to v0.2.8 (#1219) Signed-off-by: Renovate Bot Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .../assets/podtatohead-deployment-evaluation/manifest.yaml | 2 +- test/integration/podtato-head-application/00-install.yaml | 2 +- test/integration/restartable-app/00-install.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/support/observability/assets/podtatohead-deployment-evaluation/manifest.yaml b/examples/support/observability/assets/podtatohead-deployment-evaluation/manifest.yaml index 511017fc32..d278de96e8 100644 --- a/examples/support/observability/assets/podtatohead-deployment-evaluation/manifest.yaml +++ b/examples/support/observability/assets/podtatohead-deployment-evaluation/manifest.yaml @@ -282,7 +282,7 @@ spec: terminationGracePeriodSeconds: 5 containers: - name: server - image: ghcr.io/podtato-head/right-arm:0.2.7 + image: ghcr.io/podtato-head/right-arm:0.2.8 imagePullPolicy: Always ports: - containerPort: 9000 diff --git a/test/integration/podtato-head-application/00-install.yaml b/test/integration/podtato-head-application/00-install.yaml index 0b611a9be6..379efac438 100644 --- a/test/integration/podtato-head-application/00-install.yaml +++ b/test/integration/podtato-head-application/00-install.yaml @@ -293,7 +293,7 @@ spec: terminationGracePeriodSeconds: 5 containers: - name: server - image: ghcr.io/podtato-head/right-arm:0.2.7 + image: ghcr.io/podtato-head/right-arm:0.2.8 imagePullPolicy: Always ports: - containerPort: 9000 diff --git a/test/integration/restartable-app/00-install.yaml b/test/integration/restartable-app/00-install.yaml index 69918212a5..dd16642799 100644 --- a/test/integration/restartable-app/00-install.yaml +++ b/test/integration/restartable-app/00-install.yaml @@ -286,7 +286,7 @@ spec: terminationGracePeriodSeconds: 5 containers: - name: server - image: ghcr.io/podtato-head/right-arm:0.2.7 + image: ghcr.io/podtato-head/right-arm:0.2.8 imagePullPolicy: Always ports: - containerPort: 9000 From dd15d4a0e0e4b4986d8c3d0860662bfa8ad1110e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 13 Apr 2023 10:25:25 +0200 Subject: [PATCH 02/13] deps: update ghcr.io/podtato-head/left-leg docker tag to v0.2.8 (#1218) Signed-off-by: Renovate Bot Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .../assets/podtatohead-deployment-evaluation/manifest.yaml | 2 +- test/integration/podtato-head-application/00-install.yaml | 2 +- test/integration/restartable-app/00-install.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/support/observability/assets/podtatohead-deployment-evaluation/manifest.yaml b/examples/support/observability/assets/podtatohead-deployment-evaluation/manifest.yaml index d278de96e8..37f6c7608f 100644 --- a/examples/support/observability/assets/podtatohead-deployment-evaluation/manifest.yaml +++ b/examples/support/observability/assets/podtatohead-deployment-evaluation/manifest.yaml @@ -135,7 +135,7 @@ spec: terminationGracePeriodSeconds: 5 containers: - name: server - image: ghcr.io/podtato-head/left-leg:0.2.7 + image: ghcr.io/podtato-head/left-leg:0.2.8 imagePullPolicy: Always ports: - containerPort: 9000 diff --git a/test/integration/podtato-head-application/00-install.yaml b/test/integration/podtato-head-application/00-install.yaml index 379efac438..05f18f84b0 100644 --- a/test/integration/podtato-head-application/00-install.yaml +++ b/test/integration/podtato-head-application/00-install.yaml @@ -152,7 +152,7 @@ spec: terminationGracePeriodSeconds: 5 containers: - name: server - image: ghcr.io/podtato-head/left-leg:0.2.7 + image: ghcr.io/podtato-head/left-leg:0.2.8 imagePullPolicy: Always ports: - containerPort: 9000 diff --git a/test/integration/restartable-app/00-install.yaml b/test/integration/restartable-app/00-install.yaml index dd16642799..7433f7a064 100644 --- a/test/integration/restartable-app/00-install.yaml +++ b/test/integration/restartable-app/00-install.yaml @@ -145,7 +145,7 @@ spec: terminationGracePeriodSeconds: 5 containers: - name: server - image: ghcr.io/podtato-head/left-leg:0.2.7 + image: ghcr.io/podtato-head/left-leg:0.2.8 imagePullPolicy: Always ports: - containerPort: 9000 From 3a4be7f3048672994c5b4943844a2aa42f8954b1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 13 Apr 2023 10:25:36 +0200 Subject: [PATCH 03/13] deps: update ghcr.io/podtato-head/right-leg docker tag to v0.2.8 (#1220) Signed-off-by: Renovate Bot Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .../assets/podtatohead-deployment-evaluation/manifest.yaml | 2 +- test/integration/podtato-head-application/00-install.yaml | 2 +- test/integration/restartable-app/00-install.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/support/observability/assets/podtatohead-deployment-evaluation/manifest.yaml b/examples/support/observability/assets/podtatohead-deployment-evaluation/manifest.yaml index 37f6c7608f..db95a1d716 100644 --- a/examples/support/observability/assets/podtatohead-deployment-evaluation/manifest.yaml +++ b/examples/support/observability/assets/podtatohead-deployment-evaluation/manifest.yaml @@ -233,7 +233,7 @@ spec: terminationGracePeriodSeconds: 5 containers: - name: server - image: ghcr.io/podtato-head/right-leg:0.2.7 + image: ghcr.io/podtato-head/right-leg:0.2.8 imagePullPolicy: Always ports: - containerPort: 9000 diff --git a/test/integration/podtato-head-application/00-install.yaml b/test/integration/podtato-head-application/00-install.yaml index 05f18f84b0..4d8df98322 100644 --- a/test/integration/podtato-head-application/00-install.yaml +++ b/test/integration/podtato-head-application/00-install.yaml @@ -246,7 +246,7 @@ spec: terminationGracePeriodSeconds: 5 containers: - name: server - image: ghcr.io/podtato-head/right-leg:0.2.7 + image: ghcr.io/podtato-head/right-leg:0.2.8 imagePullPolicy: Always ports: - containerPort: 9000 diff --git a/test/integration/restartable-app/00-install.yaml b/test/integration/restartable-app/00-install.yaml index 7433f7a064..3fc592060e 100644 --- a/test/integration/restartable-app/00-install.yaml +++ b/test/integration/restartable-app/00-install.yaml @@ -239,7 +239,7 @@ spec: terminationGracePeriodSeconds: 5 containers: - name: server - image: ghcr.io/podtato-head/right-leg:0.2.7 + image: ghcr.io/podtato-head/right-leg:0.2.8 imagePullPolicy: Always ports: - containerPort: 9000 From 549e76d698eeccada0aae74c1c267b8c98f6b727 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 13 Apr 2023 10:25:45 +0200 Subject: [PATCH 04/13] deps: update ghcr.io/podtato-head/left-arm docker tag to v0.2.8 (#1217) Signed-off-by: Renovate Bot Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .../assets/podtatohead-deployment-evaluation/manifest.yaml | 2 +- test/integration/podtato-head-application/00-install.yaml | 2 +- test/integration/restartable-app/00-install.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/support/observability/assets/podtatohead-deployment-evaluation/manifest.yaml b/examples/support/observability/assets/podtatohead-deployment-evaluation/manifest.yaml index db95a1d716..d4a51c4ae7 100644 --- a/examples/support/observability/assets/podtatohead-deployment-evaluation/manifest.yaml +++ b/examples/support/observability/assets/podtatohead-deployment-evaluation/manifest.yaml @@ -184,7 +184,7 @@ spec: terminationGracePeriodSeconds: 5 containers: - name: server - image: ghcr.io/podtato-head/left-arm:0.2.7 + image: ghcr.io/podtato-head/left-arm:0.2.8 imagePullPolicy: Always ports: - containerPort: 9000 diff --git a/test/integration/podtato-head-application/00-install.yaml b/test/integration/podtato-head-application/00-install.yaml index 4d8df98322..3282ad348d 100644 --- a/test/integration/podtato-head-application/00-install.yaml +++ b/test/integration/podtato-head-application/00-install.yaml @@ -199,7 +199,7 @@ spec: terminationGracePeriodSeconds: 5 containers: - name: server - image: ghcr.io/podtato-head/left-arm:0.2.7 + image: ghcr.io/podtato-head/left-arm:0.2.8 imagePullPolicy: Always ports: - containerPort: 9000 diff --git a/test/integration/restartable-app/00-install.yaml b/test/integration/restartable-app/00-install.yaml index 3fc592060e..40ba6a75d3 100644 --- a/test/integration/restartable-app/00-install.yaml +++ b/test/integration/restartable-app/00-install.yaml @@ -192,7 +192,7 @@ spec: terminationGracePeriodSeconds: 5 containers: - name: server - image: ghcr.io/podtato-head/left-arm:0.2.7 + image: ghcr.io/podtato-head/left-arm:0.2.8 imagePullPolicy: Always ports: - containerPort: 9000 From 87b170f4ac7a31812d235e1587d92789b9448da5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 13 Apr 2023 10:35:34 +0200 Subject: [PATCH 05/13] deps: update github.com/keptn/lifecycle-toolkit/metrics-operator digest to dd15d4a (#1182) Signed-off-by: Renovate Bot Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- operator/go.mod | 3 +-- operator/go.sum | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/operator/go.mod b/operator/go.mod index 43a884c51c..7b0564573a 100644 --- a/operator/go.mod +++ b/operator/go.mod @@ -5,10 +5,9 @@ go 1.19 require ( github.com/argoproj/argo-rollouts v1.4.1 github.com/go-logr/logr v1.2.4 - github.com/hashicorp/go-version v1.6.0 github.com/imdario/mergo v0.3.15 github.com/kelseyhightower/envconfig v1.4.0 - github.com/keptn/lifecycle-toolkit/metrics-operator v0.0.0-20230403122034-b32d753af54e + github.com/keptn/lifecycle-toolkit/metrics-operator v0.0.0-20230413082525-dd15d4a0e0e4 github.com/magiconair/properties v1.8.7 github.com/onsi/ginkgo/v2 v2.9.2 github.com/onsi/gomega v1.27.6 diff --git a/operator/go.sum b/operator/go.sum index ec162ab9a3..b846128827 100644 --- a/operator/go.sum +++ b/operator/go.sum @@ -190,8 +190,6 @@ github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8 github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 h1:BZHcxBETFHIdVyhyEfOvn/RdU/QGdLI4y34qQGjGWO0= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -207,8 +205,8 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1 github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= -github.com/keptn/lifecycle-toolkit/metrics-operator v0.0.0-20230403122034-b32d753af54e h1:+E9k6QaibUyodRs5Lr55Hx5AFL+Lg7egrLBuXdYaV60= -github.com/keptn/lifecycle-toolkit/metrics-operator v0.0.0-20230403122034-b32d753af54e/go.mod h1:8rQ1flqblBWy43k4xJnoaMUA7e50zP95QIab3z6NCw4= +github.com/keptn/lifecycle-toolkit/metrics-operator v0.0.0-20230413082525-dd15d4a0e0e4 h1:LI+iOb7v1zIAtHQum79CbV+4HB1PCAim+TuCCRRsW7o= +github.com/keptn/lifecycle-toolkit/metrics-operator v0.0.0-20230413082525-dd15d4a0e0e4/go.mod h1:8rQ1flqblBWy43k4xJnoaMUA7e50zP95QIab3z6NCw4= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= From a47fe1d10d433a121381d0fdd2a9def087f14046 Mon Sep 17 00:00:00 2001 From: Giovanni Liva Date: Thu, 13 Apr 2023 12:05:47 +0200 Subject: [PATCH 06/13] fix: fix kubecon examples (#1225) --- examples/Makefile | 10 ++++-- examples/support/observability/Makefile | 32 ++++++++--------- .../observability/config/otel-collector.yaml | 36 +++++++++---------- 3 files changed, 41 insertions(+), 37 deletions(-) diff --git a/examples/Makefile b/examples/Makefile index 62ca06c7b0..80186a9b6d 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -5,7 +5,7 @@ PODTATO_NAMESPACE ?= podtato-kubectl GRAFANA_PORT_FORWARD ?= 3000 .PHONY: install -install: install-observability install-argo +install: install-observability @echo "-----------------------------------" @echo "Create Namespace and install Keptn-lifecycle-toolkit" @echo "-----------------------------------" @@ -46,14 +46,18 @@ deploy-version-3: kubectl create namespace "$(PODTATO_NAMESPACE)" --dry-run=client -o yaml | kubectl apply -f - kubectl apply -k sample-app/version-3 -.PHONY: undeploy-podtatohead -undeploy-podtatohead: +.PHONY: cleanup +cleanup: kubectl delete ns "$(PODTATO_NAMESPACE)" --ignore-not-found=true @echo "######################" @echo "PodTatoHead undeployed" @echo "######################" +.PHONY: undeploy-podtatohead +undeploy-podtatohead: cleanup + + .PHONY: uninstall-observability uninstall-observability: undeploy-podtatohead make -C support/observability uninstall diff --git a/examples/support/observability/Makefile b/examples/support/observability/Makefile index 17e78dd9ce..fe94c7df7d 100644 --- a/examples/support/observability/Makefile +++ b/examples/support/observability/Makefile @@ -19,8 +19,8 @@ install: install-cert-manager @echo "Configure Prometheus" @echo "------------------" kubectl create namespace monitoring --dry-run=client -o yaml | kubectl apply -f - -# kubectl apply --server-side -f config/prometheus/setup -# kubectl wait --for=condition=Established --all CustomResourceDefinition --namespace=monitoring + kubectl apply --server-side -f config/prometheus/setup + kubectl wait --for=condition=Established --all CustomResourceDefinition --namespace=monitoring @echo "" @echo "-------------------------------" @@ -35,23 +35,23 @@ install: install-cert-manager kubectl wait --for=condition=available deployment/jaeger -n "$(TOOLKIT_NAMESPACE)" --timeout=120s kubectl wait --for=condition=available deployment/otel-collector -n "$(TOOLKIT_NAMESPACE)" --timeout=120s -# @echo "" -# @echo "------------------" -# @echo "Install Prometheus" -# @echo "------------------" -# kubectl apply -f config/prometheus/ -# kubectl wait --for=condition=available deployment/prometheus-operator -n monitoring --timeout=120s -# kubectl wait --for=condition=available deployment/prometheus-adapter -n monitoring --timeout=120s -# kubectl wait --for=condition=available deployment/kube-state-metrics -n monitoring --timeout=120s -# kubectl wait --for=condition=available deployment/grafana -n monitoring --timeout=120s - @echo "" @echo "------------------" - @echo "Install Prometheus Mockserver" + @echo "Install Prometheus" @echo "------------------" - kubectl apply -n "$(TOOLKIT_NAMESPACE)" -f config/prometheus-mock/mockserver-config.yaml - helm repo add mockserver "https://www.mock-server.com" - helm upgrade --install -n "$(TOOLKIT_NAMESPACE)" --version 5.13.0 mockserver mockserver/mockserver --set service.type=ClusterIP --wait + kubectl apply -f config/prometheus/ + kubectl wait --for=condition=available deployment/prometheus-operator -n monitoring --timeout=120s + kubectl wait --for=condition=available deployment/prometheus-adapter -n monitoring --timeout=120s + kubectl wait --for=condition=available deployment/kube-state-metrics -n monitoring --timeout=120s + kubectl wait --for=condition=available deployment/grafana -n monitoring --timeout=120s + + # @echo "" + # @echo "------------------" + # @echo "Install Prometheus Mockserver" + # @echo "------------------" + # kubectl apply -n "$(TOOLKIT_NAMESPACE)" -f config/prometheus-mock/mockserver-config.yaml + # helm repo add mockserver "https://www.mock-server.com" + # helm upgrade --install -n "$(TOOLKIT_NAMESPACE)" --version 5.13.0 mockserver mockserver/mockserver --set service.type=ClusterIP --wait @echo "" diff --git a/examples/support/observability/config/otel-collector.yaml b/examples/support/observability/config/otel-collector.yaml index 9473fa4ec4..7c8056f354 100644 --- a/examples/support/observability/config/otel-collector.yaml +++ b/examples/support/observability/config/otel-collector.yaml @@ -134,21 +134,21 @@ spec: path: otel-collector-config.yaml name: otel-collector-config-vol --- -# apiVersion: monitoring.coreos.com/v1 -# kind: ServiceMonitor -# metadata: -# labels: -# serviceapp: otel-collector -# name: otel-collector -# namespace: keptn-lifecycle-toolkit-system -# spec: -# endpoints: -# - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token -# interval: 30s -# port: metrics -# namespaceSelector: -# matchNames: -# - keptn-lifecycle-toolkit-system -# selector: -# matchLabels: -# app: opentelemetry +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + labels: + serviceapp: otel-collector + name: otel-collector + namespace: keptn-lifecycle-toolkit-system +spec: + endpoints: + - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token + interval: 30s + port: metrics + namespaceSelector: + matchNames: + - keptn-lifecycle-toolkit-system + selector: + matchLabels: + app: opentelemetry From 5fb61ba00c57bfa4d062d137e2d89781b9d274ea Mon Sep 17 00:00:00 2001 From: Giovanni Liva Date: Thu, 13 Apr 2023 12:32:09 +0200 Subject: [PATCH 07/13] fix: fix kubecon examples (#1226) --- examples/sample-app/base/provider.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/sample-app/base/provider.yaml b/examples/sample-app/base/provider.yaml index 46a1a16751..3fc0408e05 100644 --- a/examples/sample-app/base/provider.yaml +++ b/examples/sample-app/base/provider.yaml @@ -4,4 +4,4 @@ metadata: name: prometheus namespace: podtato-kubectl spec: - targetServer: "http://mockserver.keptn-lifecycle-toolkit-system.svc.cluster.local:1080" + targetServer: "http://prometheus-k8s.monitoring.svc.cluster.local:9090" From acf5f91b2bc600d0008e64ffe602da8147134330 Mon Sep 17 00:00:00 2001 From: Simon Schrottner Date: Thu, 13 Apr 2023 14:04:57 +0200 Subject: [PATCH 08/13] docs: change linting CLI and add custom rules (#1031) Signed-off-by: Simon Schrottner Signed-off-by: Simon Schrottner Co-authored-by: RealAnna <89971034+RealAnna@users.noreply.github.com> --- .gitignore | 4 + .markdownlint-cli2.yaml | 20 ++++ .markdownlint.yaml | 8 -- .markdownlintignore | 1 - CONTRIBUTING.md | 3 +- README.md | 52 +++++---- dashboards/grafana/README.md | 9 +- docs/.gitignore | 4 - docs/CONTRIBUTING.md | 19 ++-- docs/Makefile | 12 +-- docs/content/en/_index.md | 4 +- .../contribute/general/technologies/_index.md | 3 +- .../en/docs/concepts/metrics/_index.md | 18 ++-- .../overview/klc-cert-manager/_index.md | 3 +- docs/content/en/docs/concepts/tasks/_index.md | 9 +- .../en/docs/concepts/workloads/_index.md | 9 +- docs/content/en/docs/getting-started.md | 5 +- docs/content/en/docs/install/_index.md | 2 +- docs/content/en/docs/install/install.md | 2 +- docs/content/en/docs/install/upgrade.md | 2 +- .../content/en/docs/snippets/tasks/install.md | 2 +- .../en/docs/tasks/add-app-awareness/index.md | 15 ++- .../restart-application-deployment/_index.md | 3 +- .../en/docs/tasks/write-tasks/_index.md | 6 +- docs/rules/admonition.js | 93 ++++++++++++++++ docs/rules/max-one-sentence-per-line.js | 100 ++++++++++++++++++ examples/sample-app/README.md | 6 +- examples/support/argo/README.md | 15 ++- examples/support/metrics/README.md | 18 ++-- examples/support/observability/README.md | 15 ++- klt-cert-manager/README.md | 3 +- metrics-operator/README.md | 3 +- operator/README.md | 3 +- operator/test/component/DEVELOPER.md | 22 ++-- operator/test/e2e/DEVELOPER.md | 19 ++-- scheduler/README.md | 3 +- scheduler/test/e2e/DEVELOPER.md | 19 ++-- 37 files changed, 416 insertions(+), 118 deletions(-) create mode 100644 .markdownlint-cli2.yaml delete mode 100644 .markdownlint.yaml delete mode 100644 .markdownlintignore delete mode 100644 docs/.gitignore create mode 100644 docs/rules/admonition.js create mode 100644 docs/rules/max-one-sentence-per-line.js diff --git a/.gitignore b/.gitignore index 8527bf7538..358d7e46f2 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,10 @@ manifests/ ## Kubebuilder **/kubebuilder /docs/tmp/ +/docs/.hugo_build.lock +/docs/resources/_gen +/docs/public +node_modules # Helm readme generator project readme-generator-for-helm/ diff --git a/.markdownlint-cli2.yaml b/.markdownlint-cli2.yaml new file mode 100644 index 0000000000..aebeb7bef5 --- /dev/null +++ b/.markdownlint-cli2.yaml @@ -0,0 +1,20 @@ +config: + line-length: + line_length: 120 + tables: false + code_blocks: false + no-inline-html: + allowed_elements: + - details + - summary + github-admonition: true + max-one-sentence-per-line: true + +customRules: + - "./docs/rules/admonition.js" + - "./docs/rules/max-one-sentence-per-line.js" + +ignores: + - "CHANGELOG.md" + - "node_modules" + - "docs/tmp" diff --git a/.markdownlint.yaml b/.markdownlint.yaml deleted file mode 100644 index d003dab4fa..0000000000 --- a/.markdownlint.yaml +++ /dev/null @@ -1,8 +0,0 @@ -line-length: - line_length: 120 - tables: false - code_blocks: false -no-inline-html: - allowed_elements: - - details - - summary diff --git a/.markdownlintignore b/.markdownlintignore deleted file mode 100644 index 1b763b1bae..0000000000 --- a/.markdownlintignore +++ /dev/null @@ -1 +0,0 @@ -CHANGELOG.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 70fa6ab874..fbbed064fa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -174,7 +174,8 @@ git push --set-upstream origin feature/123/foo > Note: All PRs must include a commit message with a description of the changes made! -Make sure you **sign off your commits**. To do this automatically check [this](https://github.com/keptn/lifecycle-toolkit/blob/main/CONTRIBUTING.md#auto-signoff-commit-messages). +Make sure you **sign off your commits**. +To do this automatically check [this](https://github.com/keptn/lifecycle-toolkit/blob/main/CONTRIBUTING.md#auto-signoff-commit-messages). Finally, go to GitHub and create a Pull Request. There should be a PR template already prepared for you. If not, you will find it at `.github/pull_request_template.md`. diff --git a/README.md b/README.md index 99fd6c95ef..30e0d0a5bb 100644 --- a/README.md +++ b/README.md @@ -65,14 +65,16 @@ kubectl apply -f https://github.com/keptn/lifecycle-toolkit/releases/download/v0 The Lifecycle Toolkit uses the OpenTelemetry collector to provide a vendor-agnostic implementation of how to receive, -process and export telemetry data. To install it, follow +process and export telemetry data. +To install it, follow their [installation instructions](https://opentelemetry.io/docs/collector/getting-started/). We provide some information about this in our [observability example](./examples/support/observability/). The Lifecycle Toolkit includes a Mutating Webhook which requires TLS certificates to be mounted as a volume in its pod. The certificate creation is handled automatically -by [klt-cert-manager](https://github.com/keptn/lifecycle-toolkit/blob/main/klt-cert-manager/README.md). Versions 0.5.0 +by [klt-cert-manager](https://github.com/keptn/lifecycle-toolkit/blob/main/klt-cert-manager/README.md). +Versions 0.6.0 and earlier have a hard dependency on the [cert-manager](https://cert-manager.io). See [installation guideline](https://github.com/keptn/lifecycle-toolkit/blob/main/docs/content/en/docs/snippets/tasks/install.md) for more info. @@ -117,7 +119,8 @@ app.kubernetes.io/name: myAwesomeWorkload app.kubernetes.io/version: myAwesomeWorkloadVersion ``` -In general, the Keptn Annotations/Labels take precedence over the Kubernetes recommended labels. If there is no version +In general, the Keptn Annotations/Labels take precedence over the Kubernetes recommended labels. +If there is no version annotation/label and there is only one container in the pod, the Lifecycle Toolkit will take the image tag as version ( if it is not "latest"). @@ -130,12 +133,16 @@ keptn.sh/post-deployment-tasks: slack-notification,performance-test The value of these annotations are Keptn [CRDs](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) -called [KeptnTaskDefinition](#keptntaskdefinition)s. These CRDs contains re-usable "functions" that can -executed before and after the deployment. In this example, before the deployment starts, a check for open problems in +called [KeptnTaskDefinition](#keptntaskdefinition)s. +These CRDs contains re-usable "functions" that can +executed before and after the deployment. +In this example, before the deployment starts, a check for open problems in your infrastructure -is performed. If everything is fine, the deployment continues and afterward, a slack notification is sent with the +is performed. +If everything is fine, the deployment continues and afterward, a slack notification is sent with the result of -the deployment and a pipeline to run performance tests is invoked. Otherwise, the deployment is kept in a pending state +the deployment and a pipeline to run performance tests is invoked. +Otherwise, the deployment is kept in a pending state until the infrastructure is capable to accept deployments again. @@ -208,7 +215,8 @@ When the webhook receives a request for a new pod, it will look for the workload keptn.sh/workload: "some-workload-name" ``` -The mutation consists in changing the scheduler used for the deployment with the Keptn Scheduler. Webhook then creates a +The mutation consists in changing the scheduler used for the deployment with the Keptn Scheduler. +Webhook then creates a workload and app resource per annotated resource. You can also specify a custom app definition with the annotation: @@ -246,12 +254,14 @@ scheduled. ### Scheduler -After the Webhook mutation, the Keptn-Scheduler will handle the annotated resources. The scheduling flow follows the +After the Webhook mutation, the Keptn-Scheduler will handle the annotated resources. +The scheduling flow follows the default scheduler behavior, since it implements a scheduler plugin based on the [scheduling framework]( https://kubernetes.io/docs/concepts/scheduling-eviction/scheduling-framework/). For each pod, at the very end of the scheduling cycle, the plugin verifies whether the pre deployment checks have -terminated, by retrieving the current status of the WorkloadInstance. Only if that is successful, the pod is bound to a +terminated, by retrieving the current status of the WorkloadInstance. +Only if that is successful, the pod is bound to a node. ### KeptnApp @@ -287,17 +297,20 @@ new execution of app level checks. A Workload contains information about which tasks should be performed during the `preDeployment` as well as the `postDeployment` -phase of a deployment. In its state it keeps track of the currently active `Workload Instances`, which are responsible +phase of a deployment. +In its state it keeps track of the currently active `Workload Instances`, which are responsible for doing those checks for a particular instance of a Deployment/StatefulSet/ReplicaSet (e.g. a Deployment of a certain version). ### KeptnWorkloadInstance -A Workload Instance is responsible for executing the pre- and post deployment checks of a workload. In its state, it +A Workload Instance is responsible for executing the pre- and post deployment checks of a workload. +In its state, it keeps track of the current status of all checks, as well as the overall state of the Pre Deployment phase, which can be used by the scheduler to tell that a pod can be allowed to be placed on a node. Workload Instances have a reference to the respective Deployment/StatefulSet/ReplicaSet, to check if it has reached the -desired state. If it detects that the referenced object has reached +desired state. +If it detects that the referenced object has reached its desired state (e.g. all pods of a deployment are up and running), it will be able to tell that a `PostDeploymentCheck` can be triggered. @@ -332,7 +345,8 @@ spec: In the code section, it is possible to define a full-fletched Deno script. A further example, is available [here](./examples/taskonly-hello-keptn/inline/taskdefinition.yaml). -To runtime can also fetch the script on the fly from a remote webserver. For this, the CRD should look like the +To runtime can also fetch the script on the fly from a remote webserver. +For this, the CRD should look like the following: ```yaml @@ -423,7 +437,7 @@ spec: key: prometheusLoginCredentials ``` -> **Note:** +> **Note** The KeptnMetricsProvider is a new resource in KLT 0.7.0. The [migration documentation](./docs/content/en/docs/tasks/migrate-keptnevaluationprovider/_index.md) provides information about how to upgrade from 0.6.0 and earlier versions to 0.7.0. @@ -452,11 +466,13 @@ spec: To use `KeptnMetric` as part of your evaluation, you must set the `.spec.objectives[i].keptnMetricRef.name` and `.spec.objectives[i].keptnMetricRef.namespace` of `KeptnEvaluationDefiniton` resource to the same value that is stored in `.metadata.name` and `metadata.namespace` -of the `KeptnMetric` resource. Specifying the `.spec.objectives[i].keptnMetricRef.namespace` is optional. +of the `KeptnMetric` resource. +Specifying the `.spec.objectives[i].keptnMetricRef.namespace` is optional. If it's not specified, KLT searches for the `KeptnMetric` resource in the namespace where `KeptnEvaluationDefinition` -resource is stored. If the `KeptnMetric` resource cannot be found there, it searches in the default KLT namespace (`keptn-lifecycle-toolkit-system`). +resource is stored. +If the `KeptnMetric` resource cannot be found there, it searches in the default KLT namespace (`keptn-lifecycle-toolkit-system`). -> **Note:** +> **Note** Please be aware that, if the `.spec.objectives[i].keptnMetricRef.namespace` of `KeptnEvaluationDefinition` resource is specified and the `KeptnMetric` resource does not exist in this namespace, the evaluation fails. diff --git a/dashboards/grafana/README.md b/dashboards/grafana/README.md index c4d304491b..5cf384a1f2 100644 --- a/dashboards/grafana/README.md +++ b/dashboards/grafana/README.md @@ -4,8 +4,10 @@ This folder contains the Grafana dashboards for the Keptn Lifecycle Toolkit. ## Installing the dashboards -It is assumed, that there is a Grafana Instance available. In our provided examples, the dashboards are automatically -provisioned. If you want to install the dashboards manually, you can use the following steps: +It is assumed, that there is a Grafana Instance available. +In our provided examples, the dashboards are automatically +provisioned. +If you want to install the dashboards manually, you can use the following steps: ```shell # This defaults to http://localhost:3000, but can be changed by setting the GRAFANA_SCHEME, GRAFANA_URL and GRAFANA_PORT environment variable @@ -15,7 +17,8 @@ make install ## Changing the dashboards -The dashboards can be changed in the Grafana UI. To export dashboards, export them using the share button and replace +The dashboards can be changed in the Grafana UI. +To export dashboards, export them using the share button and replace them in this folder. ## Exporting the dashboards for the Examples diff --git a/docs/.gitignore b/docs/.gitignore deleted file mode 100644 index 624ab06be3..0000000000 --- a/docs/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -.hugo_build.lock -resources/_gen -public -node_modules diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 3de55be06c..05519a2a35 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -82,7 +82,7 @@ To set up a local Docsy build: make build ``` - > **Note:** + > **Note** To utilize the `Makefile`, you must have GNU **make** available on your local machine. Versions are available for all the usual Operating Systems. @@ -102,7 +102,7 @@ Note that Hugo updates the rendered documentation each time you write the file. `http://localhost:1314/docs-dev/` - > **Note:** + > **Note** By default, Hugo serves the local docs on port 1313. We have modified that port for the lifecycle-toolkit docs to avoid conflicts with the keptn.github.io docs, which use @@ -243,7 +243,8 @@ it is generally better to work on files in your local clone. 1. When you have completed the writing you want to do, close all files in your branch and run `git status` to confirm that it correctly reflects the files you have modified, added, and deleted. -1. Add and commit your changes. Here, we commit all modified files but you can specify individual files to the +1. Add and commit your changes. + Here, we commit all modified files but you can specify individual files to the `git add` command. The `git commit -s` command commits the files and signs that you are contributing this intellectual property to the Keptn project. @@ -303,7 +304,8 @@ Add "WIP" (Work in Progress) or "Draft" to the title if the PR is not yet ready You may want to record the PR number somewhere for future reference although you can always find the PR in the GitHub lists of open and closed PRs. * GitHub automatically populates the "Reviewers" block. - * If this PR is not ready for review, click the "Still in progress? Convert to draft" string under the list of + * If this PR is not ready for review, click the "Still in progress? + Convert to draft" string under the list of reviewers. People can still review the content but can not merge the PR until you remove the "Draft" status. * The block of the PR that reports on checks will include the following item: @@ -314,9 +316,11 @@ Add "WIP" (Work in Progress) or "Draft" to the title if the PR is not yet ready ``` * When the PR is ready to be reviewed, approved, and merged, click the "Ready to review" button to remove the "Draft" - status. Then, if you added "WIP" or "Draft" to the PR title, remove it now. + status. + Then, if you added "WIP" or "Draft" to the PR title, remove it now. -1. Your PR should be reviewed within a few days. Watch for any comments that may be added by reviewers and implement or +1. Your PR should be reviewed within a few days. + Watch for any comments that may be added by reviewers and implement or respond to the recommended changes as soon as possible. * If a reviewer makes a GitHub suggestion and you agree with the change, just click "Accept this change" to create a @@ -341,7 +345,8 @@ Add "WIP" (Work in Progress) or "Draft" to the title if the PR is not yet ready ### Developer Certification of Origin (DCO) -Licensing is very important to open source projects. It helps ensure the software continues to be available under the +Licensing is very important to open source projects. +It helps ensure the software continues to be available under the terms that the author desired. Keptn uses [Apache License 2.0](https://github.com/keptn/lifecycle-toolkit/blob/main/LICENSE) to strike a balance diff --git a/docs/Makefile b/docs/Makefile index 500f04f68d..a762e8cf11 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -35,14 +35,14 @@ lint: lint-fix # # - .markdownlintignore holds the configuration for files to be ignored # - .markdownlint.yaml contains the rules for markdownfiles -# -# renovate: datasource=docker depName=ghcr.io/igorshubovych/markdownlint-cli -MDL_DOCKER_VERSION := v0.33.0 -MDL_CMD := docker run -v $(ROOT_DIR)../:/workdir --rm ghcr.io/igorshubovych/markdownlint-cli:$(MDL_DOCKER_VERSION) "**/*.md" +# renovate: datasource=docker depName=davidanson/markdownlint-cli2-rules +MDL_DOCKER_VERSION := v0.6.0 # TODO: remove next line on version increase from v0.6.0 +MDL_DOCKER_VERSION := next +MDL_CMD := docker run -v $(ROOT_DIR)../:/workdir --rm .PHONY: markdownlint markdownlint-fix markdownlint: - $(MDL_CMD) + $(MDL_CMD) davidanson/markdownlint-cli2-rules:${MDL_DOCKER_VERSION} "**/*.md" markdownlint-fix: - $(MDL_CMD) --fix + $(MDL_CMD) --entrypoint="markdownlint-cli2-fix" davidanson/markdownlint-cli2-rules:${MDL_DOCKER_VERSION} "**/*.md" diff --git a/docs/content/en/_index.md b/docs/content/en/_index.md index 5394b1e07b..545d71e370 100644 --- a/docs/content/en/_index.md +++ b/docs/content/en/_index.md @@ -26,7 +26,7 @@ cascade: --- - + {{< blocks/cover title="Welcome to the Keptn Lifecycle Toolkit Documentation" image_anchor="top" height="half" color="primary" >}}
}}"> @@ -48,11 +48,13 @@ git add See Keptn [in Action](https://youtube.com/playlist?list=PL6i801Rjt9DbikPPILz38U1TLMrEjppzZ) {{% /blocks/feature %}} + {{% blocks/feature icon="fab fa-github" title="Contributions welcome!" url="https://github.com/keptn/lifecycle-toolkit" %}} We do a [Pull Request](https://github.com/keptn/lifecycle-toolkit/pulls) contributions workflow on **GitHub**. New users are always welcome! {{% /blocks/feature %}} + {{% blocks/feature icon="fab fa-twitter" title="Follow us on Twitter!" url="https://twitter.com/keptnProject" %}} For announcement of latest features etc. {{% /blocks/feature %}} diff --git a/docs/content/en/contribute/general/technologies/_index.md b/docs/content/en/contribute/general/technologies/_index.md index c74b97253c..bf02cd943d 100644 --- a/docs/content/en/contribute/general/technologies/_index.md +++ b/docs/content/en/contribute/general/technologies/_index.md @@ -30,7 +30,8 @@ please submit an issue. * **Isitobservable** * [ ] Keptn has tight integrations with Observability tools and therefore knowing how to _Observe a System_ is important. * [ ] [Isitobservable website](https://isitobservable.io/) - * [ ] [Is it Observable? with Henrik Rexed](https://www.youtube.com/watch?v=aMwk2qo0v40) + * [ ] [Is it Observable? + with Henrik Rexed](https://www.youtube.com/watch?v=aMwk2qo0v40) ### Understanding SLO, SLA, SLIs diff --git a/docs/content/en/docs/concepts/metrics/_index.md b/docs/content/en/docs/concepts/metrics/_index.md index 017436f6da..d3a1f1c521 100644 --- a/docs/content/en/docs/concepts/metrics/_index.md +++ b/docs/content/en/docs/concepts/metrics/_index.md @@ -9,8 +9,10 @@ hidechildren: true # this flag hides all sub-pages in the sidebar-multicard.html ### Keptn Metric -A `KeptnMetric` is a CRD representing a metric. The metric will be collected from the provider specified in the -specs.provider.name field. The query is a string in the provider-specific query language, used to obtain a metric. +A `KeptnMetric` is a CRD representing a metric. +The metric will be collected from the provider specified in the +specs.provider.name field. +The query is a string in the provider-specific query language, used to obtain a metric. Providing the metrics as CRD into a K8s cluster will facilitate the reusability of this data across multiple components. Furthermore, this allows using multiple observability platforms for different metrics. @@ -67,9 +69,12 @@ spec: targetServer: "" ```` -Keptn metrics can be exposed as OTel metrics via port `9999` of the KLT metrics-operator. To expose them, the env -variable `EXPOSE_KEPTN_METRICS` in the metrics-operator manifest needs to be set to `true`. The default value of this variable -is `true`. To access the metrics, use the following command: +Keptn metrics can be exposed as OTel metrics via port `9999` of the KLT metrics-operator. +To expose them, the env +variable `EXPOSE_KEPTN_METRICS` in the metrics-operator manifest needs to be set to `true`. +The default value of this variable +is `true`. +To access the metrics, use the following command: ```shell kubectl port-forward deployment/metrics-operator 9999 -n keptn-lifecycle-toolkit-system @@ -144,7 +149,8 @@ $ kubectl get --raw "/apis/custom.metrics.k8s.io/v1beta2/namespaces/podtato-kube } ``` -You can also filter based on matching labels. So to e.g. retrieve all metrics that are labelled with `app=frontend`, you +You can also filter based on matching labels. +So to e.g. retrieve all metrics that are labelled with `app=frontend`, you can use the following command: ```shell diff --git a/docs/content/en/docs/concepts/overview/klc-cert-manager/_index.md b/docs/content/en/docs/concepts/overview/klc-cert-manager/_index.md index b76c12d29a..b935a31f16 100644 --- a/docs/content/en/docs/concepts/overview/klc-cert-manager/_index.md +++ b/docs/content/en/docs/concepts/overview/klc-cert-manager/_index.md @@ -21,4 +21,5 @@ The Lifecycle Toolkit operator waits for a valid certificate to be ready. The certificate is mounted on an empty dir volume in the operator. When a certificate is left over from an older version, the webhook or the operator may generate errors because of an -invalid certificate. To solve this, delete the certificate and restart the operator. +invalid certificate. +To solve this, delete the certificate and restart the operator. diff --git a/docs/content/en/docs/concepts/tasks/_index.md b/docs/content/en/docs/concepts/tasks/_index.md index f7236be9a9..b9635e657d 100644 --- a/docs/content/en/docs/concepts/tasks/_index.md +++ b/docs/content/en/docs/concepts/tasks/_index.md @@ -56,7 +56,8 @@ spec: console.log("Hello, " + name + " new"); ``` -The runtime can also fetch the script on the fly from a remote webserver. For this, the CRD should look like the +The runtime can also fetch the script on the fly from a remote webserver. +For this, the CRD should look like the following: ```yaml @@ -95,7 +96,8 @@ spec: ## Context -A context environment variable is available via `Deno.env.get("CONTEXT")`. It can be used like this: +A context environment variable is available via `Deno.env.get("CONTEXT")`. +It can be used like this: ```javascript let context = Deno.env.get("CONTEXT"); @@ -119,7 +121,8 @@ The Lifecycle Toolkit passes the values defined inside the `map` field as a JSON At the moment, multi-level maps are not supported. The JSON object can be read through the environment variable `DATA` using `Deno.env.get("DATA");`. K8s secrets can also be passed to the function using the `secureParameters` field. -Currently only one secret can be passed. The secret must have a `key` called `SECURE_DATA`. +Currently only one secret can be passed. +The secret must have a `key` called `SECURE_DATA`. It can be accessed via the environment variable `Deno.env.get("SECURE_DATA")`. For example: diff --git a/docs/content/en/docs/concepts/workloads/_index.md b/docs/content/en/docs/concepts/workloads/_index.md index 78b1cb837c..541be40c1a 100644 --- a/docs/content/en/docs/concepts/workloads/_index.md +++ b/docs/content/en/docs/concepts/workloads/_index.md @@ -9,16 +9,19 @@ hidechildren: true # this flag hides all sub-pages in the sidebar-multicard.html A Workload contains information about which tasks should be performed during the `preDeployment` as well as the `postDeployment` -phase of a deployment. In its state it keeps track of the currently active `Workload Instances`, which are responsible +phase of a deployment. +In its state it keeps track of the currently active `Workload Instances`, which are responsible for doing those checks for a particular instance of a Deployment/StatefulSet/ReplicaSet (e.g. a Deployment of a certain version). ### Keptn Workload Instance -A Workload Instance is responsible for executing the pre- and post deployment checks of a workload. In its state, it +A Workload Instance is responsible for executing the pre- and post deployment checks of a workload. +In its state, it keeps track of the current status of all checks, as well as the overall state of the Pre Deployment phase, which can be used by the scheduler to tell that a pod can be allowed to be placed on a node. Workload Instances have a reference to the respective Deployment/StatefulSet/ReplicaSet, to check if it has reached the -desired state. If it detects that the referenced object has reached +desired state. +If it detects that the referenced object has reached its desired state (e.g. all pods of a deployment are up and running), it will be able to tell that a `PostDeploymentCheck` can be triggered. diff --git a/docs/content/en/docs/getting-started.md b/docs/content/en/docs/getting-started.md index 74b4fa5236..2d76d1e7a4 100644 --- a/docs/content/en/docs/getting-started.md +++ b/docs/content/en/docs/getting-started.md @@ -88,7 +88,7 @@ make install-observability make restart-lifecycle-toolkit ``` -> **Note:** +> **Note** To export traces to the OpenTelemetry Collector, you need a [KeptnConfig Resource](https://github.com/keptn/lifecycle-toolkit/blob/main/examples/support/keptn/keptnconfig.yaml) in the namespace where KLT is installed. @@ -222,5 +222,6 @@ and that the trace is also updated. You should also see in the Grafana Dashboards that the deployment was successful. -Congratulations! You have successfully deployed an application +Congratulations! +You have successfully deployed an application using the Keptn Lifecycle Toolkit! diff --git a/docs/content/en/docs/install/_index.md b/docs/content/en/docs/install/_index.md index c52a48f9f1..786b2a2372 100644 --- a/docs/content/en/docs/install/_index.md +++ b/docs/content/en/docs/install/_index.md @@ -7,7 +7,7 @@ weight: 15 hidechildren: false # this flag hides all sub-pages in the sidebar-multicard.html --- -**Note** This section is under development. +> **Note** This section is under development. All material presented here has been reviewed for accuracy but the content is not yet complete. diff --git a/docs/content/en/docs/install/install.md b/docs/content/en/docs/install/install.md index e62dc153b1..6d148d7cb1 100644 --- a/docs/content/en/docs/install/install.md +++ b/docs/content/en/docs/install/install.md @@ -85,7 +85,7 @@ because the Helm Charts allow you to customize your configuration. Versions 0.6.0 and earlier can only be installed using manifests. -**Note:** When installing Version 0.6.0, +> **Note** When installing Version 0.6.0, you must first install the `cert-manager` with the following command sequence: ```shell diff --git a/docs/content/en/docs/install/upgrade.md b/docs/content/en/docs/install/upgrade.md index 0401fbdc59..2fcbbb4034 100644 --- a/docs/content/en/docs/install/upgrade.md +++ b/docs/content/en/docs/install/upgrade.md @@ -22,7 +22,7 @@ Use the `--set` flag or download and edit the `values.yaml` file to modify the configuration as discused on the [Install the Lifecycle Toolkit](../install/) page. -**Warning:** +> **Warning** If you installed your Lifecycle Toolkit instance from the Manifest, additional steps are required to use the Helm Chart to upgrade. Contact us on Slack for assistance. diff --git a/docs/content/en/docs/snippets/tasks/install.md b/docs/content/en/docs/snippets/tasks/install.md index 71df96dcd6..67879395fd 100644 --- a/docs/content/en/docs/snippets/tasks/install.md +++ b/docs/content/en/docs/snippets/tasks/install.md @@ -37,7 +37,7 @@ available [here](https://helm.sh/docs/helm/helm_get_values/)). The full list of available flags can be found in the [helm-charts](https://github.com/keptn/lifecycle-toolkit/blob/main/helm/chart/README.md). -> **Note:** +> **Note** Installation of the Lifecycle Toolkit version 0.6.0 and lower is not supported via helm charts.
diff --git a/docs/content/en/docs/tasks/add-app-awareness/index.md b/docs/content/en/docs/tasks/add-app-awareness/index.md index 2534e3f67b..3a15b269be 100644 --- a/docs/content/en/docs/tasks/add-app-awareness/index.md +++ b/docs/content/en/docs/tasks/add-app-awareness/index.md @@ -1,6 +1,7 @@ # Add Application Awareness -In the previous step, we installed the demo application without any application awareness. This means that the Lifecycle +In the previous step, we installed the demo application without any application awareness. +This means that the Lifecycle Toolkit assumed that every workload is a single-service application at the moment and created the Application resources for you. @@ -101,8 +102,10 @@ kubectl apply -f ./my-deployment/. ## Watch Application behavior -Now, your application gets deployed in an application aware way. This means that pre-deployment tasks and evaluations -would be executed if you would have any. The same would happen for post-deployment tasks and evaluations after the last +Now, your application gets deployed in an application aware way. +This means that pre-deployment tasks and evaluations +would be executed if you would have any. +The same would happen for post-deployment tasks and evaluations after the last workload has been deployed successfully. Now that you defined your application, you could watch the state of the whole application using: @@ -112,8 +115,10 @@ kubectl get keptnappversions -n podtato-kubectl` ``` You should see that the application is in a progressing state as long as the workloads (`kubectl get kwi`) are -progressing. After the last application has been deployed, and post-deployment tasks and evaluations are finished (there +progressing. +After the last application has been deployed, and post-deployment tasks and evaluations are finished (there are none at this point), the state should switch to completed. -Now, we have deployed an application and are able to get the total state of the application state. Metrics and traces +Now, we have deployed an application and are able to get the total state of the application state. +Metrics and traces get exported and now we're ready to dive deeper in the world of Pre- and Post-Deployment Tasks. diff --git a/docs/content/en/docs/tasks/restart-application-deployment/_index.md b/docs/content/en/docs/tasks/restart-application-deployment/_index.md index 2f005fe091..35799cb52f 100644 --- a/docs/content/en/docs/tasks/restart-application-deployment/_index.md +++ b/docs/content/en/docs/tasks/restart-application-deployment/_index.md @@ -15,7 +15,8 @@ This could happen because of, e.g., a misconfigured target value of a `KeptnEval checked in a pre deployment check. To retry a `KeptnApp` deployment without incrementing the version of the `KeptnApp`, we introduced the concept of ** -revisions** for a `KeptnAppVersion`. This means that +revisions** for a `KeptnAppVersion`. +This means that whenever the spec of a `KeptnApp` changes, even though the version stays the same, the KLT Operator will create a new revision of the `KeptnAppVersion` referring to the `KeptnApp`. diff --git a/docs/content/en/docs/tasks/write-tasks/_index.md b/docs/content/en/docs/tasks/write-tasks/_index.md index 5480c12ce1..88bed96f31 100644 --- a/docs/content/en/docs/tasks/write-tasks/_index.md +++ b/docs/content/en/docs/tasks/write-tasks/_index.md @@ -10,7 +10,8 @@ hidechildren: true # this flag hides all sub-pages in the sidebar-multicard.html ## Keptn Task Definition A `KeptnTaskDefinition` is a CRD used to define tasks that can be run by the Keptn Lifecycle Toolkit -as part of pre- and post-deployment phases of a deployment. The task definition is a [Deno](https://deno.land/) script. +as part of pre- and post-deployment phases of a deployment. +The task definition is a [Deno](https://deno.land/) script. In the future, we also intend to support other runtimes, especially running a container image directly. A task definition can be configured in three different ways: @@ -35,7 +36,8 @@ spec: In the code section, it is possible to define a full-fletched Deno script. -The runtime can also fetch the script on the fly from a remote webserver. For this, the CRD should look like the +The runtime can also fetch the script on the fly from a remote webserver. +For this, the CRD should look like the following: ```yaml diff --git a/docs/rules/admonition.js b/docs/rules/admonition.js new file mode 100644 index 0000000000..2778fc6498 --- /dev/null +++ b/docs/rules/admonition.js @@ -0,0 +1,93 @@ +// @ts-check + +"use strict"; + +module.exports = { + "names": [ "github-admonition" ], + "description": "asdfg", + "information": new URL( + "https://github.com/aepfli/markdownlint-rule-max-one-sentence-per-line" + ), + "tags": [ "admonition" ], + "function": (params, onError) => { + const admonitions = params.config.admonitions || [ "Note", "Warning" ]; + const admonitionStart = params.config.start || "> **"; + const admonitionEnd = params.config.end ||"**"; + + const atBeginningRegex = + new RegExp("^([\\n\\t ]*)(.*)(" + + admonitions.join("|") + + ")(:?\\*\\*)", "im"); + + const atBeginning = + (relevantToken) => { + const check = atBeginningRegex.exec(relevantToken.line); + if (check && (check[2] !== "> **" || + !admonitions.includes(check[3]) || + check[4] !== "**")) { + const lengthForReplacement = + check[2].length + check[3].length + check[4].length; + const position = check[1].length + 1; + onError({ + "lineNumber": relevantToken.lineNumber, + "detail": relevantToken.line.substr(0, 10), + "fixInfo": { + "lineNumber": relevantToken.lineNumber, + "editColumn": position, + "deleteCount": lengthForReplacement, + // eslint-disable-next-line max-len + "insertText": admonitionStart + check[3].charAt(0).toUpperCase() + check[3].slice(1).toLowerCase() + admonitionEnd + } + }); + } + }; + + const wholeLineRegex = + new RegExp("^([\\n\\t ]*)(.*)(" + + admonitions.join("|") + + "):?(.*)(\\*\\*)", "im"); + + const wholeLine = + (relevantToken) => { + const check = wholeLineRegex + .exec(relevantToken.line); + if (check && (check[2] !== "> **" || + !admonitions.includes(check[3]) || + check[5] !== "**")) { + const position = check[1] ? check[1].length + 1 : 1; + + const lengthForReplacement = relevantToken.line.length - position + 1; + const replacement = admonitionStart + + check[3].charAt(0).toUpperCase() + check[3].slice(1).toLowerCase() + + admonitionEnd + + check[4]; + + onError({ + "lineNumber": relevantToken.lineNumber, + "detail": relevantToken.line.substr(0, 10), + "fixInfo": { + "lineNumber": relevantToken.lineNumber, + "editColumn": position, + "deleteCount": lengthForReplacement, + + "insertText": replacement + } + }); + } + }; + + const relevantTokens = []; + for (let i = 0; i < params.tokens.length; i++) { + const token = params.tokens[i]; + if (token.type === "paragraph_open" && + params.tokens[i + 1].type === "inline") { + relevantTokens.push(params.tokens[i + 1]); + } + } + + for (const relevantToken of relevantTokens) { + atBeginning(relevantToken); + wholeLine(relevantToken); + } + } +}; diff --git a/docs/rules/max-one-sentence-per-line.js b/docs/rules/max-one-sentence-per-line.js new file mode 100644 index 0000000000..acd1a9ac12 --- /dev/null +++ b/docs/rules/max-one-sentence-per-line.js @@ -0,0 +1,100 @@ +// @ts-check + +"use strict"; + +const indentFor = (string, indentation) => { + // eslint-disable-next-line max-len + const regex = new RegExp("^(?(" + indentation + ")*)(?- |> |>|\\* |\\d+\\. )?"); + const match = regex.exec(string); + if (!match) { + return ""; + } + let indentSize = 0; + if (match.groups.indents) { + indentSize = match.groups.indents.length / indentation.length; + } + if (match.groups.adds) { + if (match.groups.adds.includes(">")) { + return indentation.repeat(indentSize) + match.groups.adds; + } + indentSize++; + } + return indentation.repeat(indentSize); +}; + +const isAfterIgnoredWord = (ignoredWords, line, i) => { + for (const ignoredWord of ignoredWords) { + const lastWordInLine = line.substring(i - ignoredWord.length, i); + if (ignoredWord === lastWordInLine.toLowerCase()) { + return true; + } + } + + return false; +}; + +module.exports = { + "names": [ "max-one-sentence-per-line" ], + "description": "Max 1 sentence should be on a line", + "information": new URL( + "https://github.com/aepfli/markdownlint-rule-max-one-sentence-per-line" + ), + "tags": [ "sentences" ], + "function": (params, onError) => { + + const ignoredWords = params.config.ignored_words || + [ "ie", "i.e", "eg", "e.g", "etc", "ex" ]; + const lineEndings = params.config.line_endings || [ ".", "?", "!" ]; + const sentenceStartRegex = params.config.sentence_start || + "^\\s+(\\w|[*_'\"])"; + const contextSize = Number(params.config.context_length || 14); + const indentation = params.config.indentation || " "; + + const sentenceStart = new RegExp(sentenceStartRegex); + + const relevantTokens = []; + for (let i = 0; i < params.tokens.length; i++) { + const token = params.tokens[i]; + if (token.type === "paragraph_open" && + params.tokens[i + 1].type === "inline") { + relevantTokens.push(params.tokens[i + 1]); + } + } + + for (const relevantToken of relevantTokens) { + + for (const token of relevantToken.children) { + const lineNumber = token.lineNumber; + if (token.type === "text") { + const content = token.content; + for (let i = 0; i < content.length - 2; i += 1) { + + if (lineEndings.includes(content[i])) { + const sentence = sentenceStart.exec(content.substr(i + 1)); + if ( + sentence !== null && + !isAfterIgnoredWord(ignoredWords, content, i) + ) { + const spaces = sentence[1]; + const pointInLine = token.line.indexOf(content) + i; + onError({ + "lineNumber": lineNumber, + "detail": null, + // eslint-disable-next-line max-len + "context": content.substr(Math.max(0, i - (contextSize / 2)), contextSize), + "range": [ pointInLine, spaces.length ], "fixInfo": { + "lineNumber": lineNumber, + "editColumn": pointInLine + 2, + "deleteCount": spaces.length, + // eslint-disable-next-line max-len + "insertText": "\n" + indentFor(relevantToken.line, indentation) + } + }); + } + } + } + } + } + } + } +}; diff --git a/examples/sample-app/README.md b/examples/sample-app/README.md index 3bd9144ea9..e814855f02 100644 --- a/examples/sample-app/README.md +++ b/examples/sample-app/README.md @@ -10,7 +10,8 @@ This section describes how to **prepare and enable** post-deployment tasks to se ### Create Slack Webhook -In the first step, create an incoming slack webhook. Necessary information is available in the [slack api page](https://api.slack.com/messaging/webhooks). +In the first step, create an incoming slack webhook. +Necessary information is available in the [slack api page](https://api.slack.com/messaging/webhooks). Once you create the webhook, you will get a URL similar to below example. `https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX` @@ -55,7 +56,8 @@ Now watch the progress on the cluster ```kubectl get keptnworkloadinstances``` ```kubectl get keptnappversions``` -You could also open up a browser and watch the progress in Jaeger. You can find the Context ID in the "TraceId" Field of +You could also open up a browser and watch the progress in Jaeger. +You can find the Context ID in the "TraceId" Field of the KeptnAppVersion The deployment should fail because of too few cpu resources diff --git a/examples/support/argo/README.md b/examples/support/argo/README.md index 3c04a435bd..5560b18cd7 100644 --- a/examples/support/argo/README.md +++ b/examples/support/argo/README.md @@ -11,14 +11,17 @@ Controller and [ArgoCD](https://argo-cd.readthedocs.io/en/stable/). * Then you can port-forward the ArgoUI using: `make port-forward-argocd` * Alternatively, you can access Argo using the CLI, configure it using `make argo-configure-cli` * Deploy the PodTatoHead Demo Application: `make argo-install-podtatohead` -* Watch the progress on your ArgoUI: `http://localhost:8080`. Use the `admin` user and the password +* Watch the progress on your ArgoUI: `http://localhost:8080`. + Use the `admin` user and the password from `make argo-get-password`. ## Prerequisites This tutorial assumes, that you already installed the Keptn Lifecycle Controller ( -see ). The installation instructions can be -found [here](https://github.com/keptn/lifecycle-toolkit#deploy-the-latest-release). Furthermore, you have to install +see ). +The installation instructions can be +found [here](https://github.com/keptn/lifecycle-toolkit#deploy-the-latest-release). +Furthermore, you have to install ArgoCD, as in the following their [installation instructions](https://argo-cd.readthedocs.io/en/stable/getting_started/) . @@ -60,7 +63,8 @@ apply [this manifest](https://raw.githubusercontent.com/keptn/lifecycle-toolkit/ kubectl apply -f https://raw.githubusercontent.com/keptn-sandbox/lifecycle-toolkit-examples/main/support/argo/config/app.yaml ``` -You will see that the application will be deployed using ArgoCD. You can watch the progress on the ArgoCD UI and should +You will see that the application will be deployed using ArgoCD. +You can watch the progress on the ArgoCD UI and should see the following: ![img.png](assets/argo-screen.png) @@ -82,7 +86,8 @@ In the meanwhile you can watch the progress of the deployment using: * See in which phase your application deployment is at the moment -After some time all resources should be in a succeeded state. In the Argo-UI you will see that the application is in +After some time all resources should be in a succeeded state. +In the Argo-UI you will see that the application is in sync. diff --git a/examples/support/metrics/README.md b/examples/support/metrics/README.md index 0d858ff0dc..7b4be1839f 100644 --- a/examples/support/metrics/README.md +++ b/examples/support/metrics/README.md @@ -1,7 +1,8 @@ # AutoScaling with HPA and KeptnMetrics This example shows how `KeptnMetrics` can be used as a reference for a `HorizontalPodAutoscaler` to decide when to -scale workloads up or down. To demonstrate this, the following steps will be covered in this example: +scale workloads up or down. +To demonstrate this, the following steps will be covered in this example: 1. Deploy a sample application 2. Create a `KeptnMetric` to monitor the throttled CPU of all pods serving our application @@ -17,7 +18,8 @@ make 1-deploy-app ``` This will create a namespace called `podtato-metrics`, and a deployment called `podtato-head-entry` that is -accessible via a `ClusterIP` service. After executing the command, you should see one +accessible via a `ClusterIP` service. +After executing the command, you should see one pod running the application we just created: ```shell @@ -53,8 +55,10 @@ cpu-throttling prometheus avg(rate(container_cpu_cfs_throttled_seconds_total ## Generating Load Now that we have our application up and running, and can retrieve the `KeptnMetric` value, -it is time to generate some load. To do so, we will create a `Job` that regularly -sends a request to our application. The Job can be created using the following command: +it is time to generate some load. +To do so, we will create a `Job` that regularly +sends a request to our application. +The Job can be created using the following command: ```shell make 3-generate-load @@ -72,7 +76,8 @@ cpu-throttling prometheus avg(rate(container_cpu_cfs_throttled_seconds_total Now, to meet the demand of our application, we will deploy a `HorizontalPodAutoscaler` that will observe the value of the `cpu-throttling` metric, and scale the demo application up or down, based on the target -we have specified for our metric. In our case, we want to ensure that the value of our metric stays +we have specified for our metric. +In our case, we want to ensure that the value of our metric stays below `0.05`, and we are willing to scale up to 10 replicas of our demo application: ```yaml @@ -109,7 +114,8 @@ make 4-deploy-hpa ``` Once the HPA has been deployed, we should immediately see it scaling up the replica count of our application, -since the metric value was already above our target. You can also verify this by inspecting the current +since the metric value was already above our target. +You can also verify this by inspecting the current state of the `podtato-metrics-hpa` autoscaler: ```shell diff --git a/examples/support/observability/README.md b/examples/support/observability/README.md index 9c3369f88b..ec6e9579c1 100644 --- a/examples/support/observability/README.md +++ b/examples/support/observability/README.md @@ -15,7 +15,8 @@ The application deployed uses an example of pre-Deployment Evaluation based on p ## Prerequisites This tutorial assumes, that you already installed the Keptn Lifecycle Controller ( -see ). The installation instructions can be +see ). +The installation instructions can be found [here](https://github.com/keptn/lifecycle-toolkit#deploy-the-latest-release). As well, you have both Jaeger and the Prometheus Operator installed in your Cluster. Also, please ensure that the Prometheus Operator has the required permissions to watch resources of @@ -90,14 +91,16 @@ To showcase pre-Evaluation checks we created a new version of podtato-head app i assets/podtetohead-deployment-evaluation. You can run ``make deploy-podtatohead`` to check pre-Evaluations of prometheus metrics both at app and workload instance level. -Once an example has been deployed, you can view the generated traces in Jaeger. To do so, please create a port-forward +Once an example has been deployed, you can view the generated traces in Jaeger. +To do so, please create a port-forward for the `jaeger-query` service: ```shell kubectl port-forward -n keptn-lifecycle-toolkit-system svc/jaeger-query 16686 ``` -Afterwards, you can view the Jaeger UI in the browser at [localhost:16686](http://localhost:16686). There you should see +Afterwards, you can view the Jaeger UI in the browser at [localhost:16686](http://localhost:16686). +There you should see the traces generated by the lifecycle controller, which should look like this: ### Traces overview @@ -116,7 +119,8 @@ Prometheus Operator tutorial). kubectl -n monitoring port-forward svc/prometheus-k8s 9090 ``` -Afterwards, you can view the Prometheus UI in the browser at [localhost:9090](http://localhost:9090). There, in +Afterwards, you can view the Prometheus UI in the browser at [localhost:9090](http://localhost:9090). +There, in the [Targets](http://localhost:9090/targets?search=) section, you should see an entry for the otel-collector: ![Screenshot of a target in Prometheus](./assets/prometheus_targets.png) @@ -128,7 +132,8 @@ the `keptn` prefix): ![Screenshot of the auto-complete menu in a Prometheus query](./assets/metrics.png) To view the exported metrics in Grafana, we have provided dashboards which have been automatically installed with this -example. To display them, please first create a port-forward for the `grafana` service in the `monitoring` namespace: +example. +To display them, please first create a port-forward for the `grafana` service in the `monitoring` namespace: ```shell make port-forward-grafana diff --git a/klt-cert-manager/README.md b/klt-cert-manager/README.md index 8dce7c1d30..071ddb370e 100644 --- a/klt-cert-manager/README.md +++ b/klt-cert-manager/README.md @@ -12,7 +12,8 @@ operator deployment changes. ## Getting Started -You’ll need a Kubernetes cluster to run against. You can use [KIND](https://sigs.k8s.io/kind) to get a local cluster for +You’ll need a Kubernetes cluster to run against. +You can use [KIND](https://sigs.k8s.io/kind) to get a local cluster for testing, or run against a remote cluster. > **Note** diff --git a/metrics-operator/README.md b/metrics-operator/README.md index 1e17674453..66aaf5ba42 100644 --- a/metrics-operator/README.md +++ b/metrics-operator/README.md @@ -8,7 +8,8 @@ ## Getting Started -You’ll need a Kubernetes cluster to run against. You can use [KIND](https://sigs.k8s.io/kind) to get a local cluster +You’ll need a Kubernetes cluster to run against. +You can use [KIND](https://sigs.k8s.io/kind) to get a local cluster for testing, or run against a remote cluster. > **Note** diff --git a/operator/README.md b/operator/README.md index a8718448c4..261097eec0 100644 --- a/operator/README.md +++ b/operator/README.md @@ -8,7 +8,8 @@ ## Getting Started -You’ll need a Kubernetes cluster to run against. You can use [KIND](https://sigs.k8s.io/kind) to get a local cluster for +You’ll need a Kubernetes cluster to run against. +You can use [KIND](https://sigs.k8s.io/kind) to get a local cluster for testing, or run against a remote cluster. > **Note** diff --git a/operator/test/component/DEVELOPER.md b/operator/test/component/DEVELOPER.md index 726a0344bb..17d20e4cbd 100644 --- a/operator/test/component/DEVELOPER.md +++ b/operator/test/component/DEVELOPER.md @@ -86,27 +86,35 @@ var _ = Describe("KeptnAppController", func() { You can append ```[Feature:Performance]``` to any spec you would like to execute during performance test with ```make performance-test``` the file -"load_test.go" contains examples of such tests, including a simple reporter. The report "MetricForLoadTestSuite" is +"load_test.go" contains examples of such tests, including a simple reporter. +The report "MetricForLoadTestSuite" is generated for every run of the load test. ## Contributing Tips -1. Keep in mind to clean up after each test since the environment is shared. E.g. if you plan assertions on events or +1. Keep in mind to clean up after each test since the environment is shared. + E.g. if you plan assertions on events or spans, make sure your specs are either ordered or assigned to their own controller 2. Namespaces do not get cleaned up by EnvTest, so do not make assertion based on the idea that the namespace has been deleted, and make sure to use `ignoreAlreadyExists(err error)` when creating a new one -3. EnvTest is a lightweight control plane only meant for testing purposes. This means it does not contain inbuilt +3. EnvTest is a lightweight control plane only meant for testing purposes. + This means it does not contain inbuilt Kubernetes controllers like deployment controllers, ReplicaSet controllers, etc. You cannot assert/verify for pods being created or not for created deployment. 4. You should generally try to use Gomega’s Eventually to make asynchronous assertions, especially in the case of Get and Update calls to API Server. 5. Use ginkgo --until-it-fails to identify flaky tests. -6. Avoid general utility packages. Packages called "util" are suspect. Instead, derive a name that describes your - desired function. For example, the utility functions dealing with waiting for operations are in the wait package and - include functionality like Poll. The full name is wait.Poll. +6. Avoid general utility packages. + Packages called "util" are suspect. + Instead, derive a name that describes your + desired function. + For example, the utility functions dealing with waiting for operations are in the wait package and + include functionality like Poll. + The full name is wait.Poll. 7. All filenames should be lowercase. 8. Go source files and directories use underscores, not dashes. -9. Package directories should generally avoid using separators as much as possible. When package names are multiple +9. Package directories should generally avoid using separators as much as possible. + When package names are multiple words, they usually should be in nested subdirectories. 10. Document directories and filenames should use dashes rather than underscores. 11. Examples should also illustrate best practices for configuration and using diff --git a/operator/test/e2e/DEVELOPER.md b/operator/test/e2e/DEVELOPER.md index 7a7d160d32..65952c9267 100644 --- a/operator/test/e2e/DEVELOPER.md +++ b/operator/test/e2e/DEVELOPER.md @@ -32,22 +32,29 @@ If annotated for keptn, a new Pod should be assigned to keptn scheduler | passed You can append ```[Feature:Performance]``` to any spec you would like to execute during performance test with ```make performance-test``` the file -"load_test.go" contains examples of such tests, including a simple reporter. The report "MetricForLoadTestSuite" is +"load_test.go" contains examples of such tests, including a simple reporter. +The report "MetricForLoadTestSuite" is generated for every run of the load test. ## Contributing Tips -1. Keep in mind to clean up after each test since the environment is shared. E.g. if you plan assertions on events or +1. Keep in mind to clean up after each test since the environment is shared. + E.g. if you plan assertions on events or spans, make sure your specs are either ordered or assigned to their own controller 2. You should generally try to use Gomega’s Eventually to make asynchronous assertions, especially in the case of Get and Update calls to API Server. 3. Use ginkgo --until-it-fails to identify flaky tests. -4. Avoid general utility packages. Packages called "util" are suspect. Instead, derive a name that describes your - desired function. For example, the utility functions dealing with waiting for operations are in the wait package and - include functionality like Poll. The full name is wait.Poll. +4. Avoid general utility packages. + Packages called "util" are suspect. + Instead, derive a name that describes your + desired function. + For example, the utility functions dealing with waiting for operations are in the wait package and + include functionality like Poll. + The full name is wait.Poll. 5. All filenames should be lowercase. 6. Go source files and directories use underscores, not dashes. -7. Package directories should generally avoid using separators as much as possible. When package names are multiple +7. Package directories should generally avoid using separators as much as possible. + When package names are multiple words, they usually should be in nested subdirectories. 8. Document directories and filenames should use dashes rather than underscores. 9. Examples should also illustrate best practices for configuration and using diff --git a/scheduler/README.md b/scheduler/README.md index 560353b8e9..60bde85202 100644 --- a/scheduler/README.md +++ b/scheduler/README.md @@ -8,7 +8,8 @@ ## Getting Started -You’ll need a Kubernetes cluster v0.24.0 or higher to run against. You can use [KIND](https://sigs.k8s.io/kind) to get a +You’ll need a Kubernetes cluster v0.24.0 or higher to run against. +You can use [KIND](https://sigs.k8s.io/kind) to get a local cluster for testing, or run against a remote cluster. > **Note** diff --git a/scheduler/test/e2e/DEVELOPER.md b/scheduler/test/e2e/DEVELOPER.md index c79e66c262..32d005455e 100644 --- a/scheduler/test/e2e/DEVELOPER.md +++ b/scheduler/test/e2e/DEVELOPER.md @@ -1,6 +1,7 @@ # E2E tests -This test suite can run tests to verify the scheduler. The tests rely on a real cluster with an already installed +This test suite can run tests to verify the scheduler. +The tests rely on a real cluster with an already installed keptn-scheduler ## Running on kind cluster @@ -24,17 +25,23 @@ After the run a ```report.E2E-scheduler``` file will be generated with the resul ## Contributing Tips -1. Keep in mind to clean up after each test since the environment is shared. E.g. if you plan assertions on events or +1. Keep in mind to clean up after each test since the environment is shared. + E.g. if you plan assertions on events or spans, make sure your specs are either ordered or assigned to their own controller 2. You should generally try to use Gomega’s Eventually to make asynchronous assertions, especially in the case of Get and Update calls to API Server. 3. Use ginkgo --until-it-fails to identify flaky tests. -4. Avoid general utility packages. Packages called "util" are suspect. Instead, derive a name that describes your - desired function. For example, the utility functions dealing with waiting for operations are in the wait package and - include functionality like Poll. The full name is wait.Poll. +4. Avoid general utility packages. + Packages called "util" are suspect. + Instead, derive a name that describes your + desired function. + For example, the utility functions dealing with waiting for operations are in the wait package and + include functionality like Poll. + The full name is wait.Poll. 5. All filenames should be lowercase. 6. Go source files and directories use underscores, not dashes. -7. Package directories should generally avoid using separators as much as possible. When package names are multiple +7. Package directories should generally avoid using separators as much as possible. + When package names are multiple words, they usually should be in nested subdirectories. 8. Document directories and filenames should use dashes rather than underscores. 9. Examples should also illustrate best practices for configuration and using From 24b26741b7403523cb90e3c096d0697e8ffdc720 Mon Sep 17 00:00:00 2001 From: RealAnna <89971034+RealAnna@users.noreply.github.com> Date: Thu, 13 Apr 2023 14:20:08 +0200 Subject: [PATCH 09/13] test: refactor kuttl test using env var (#1214) Signed-off-by: realanna --- .yamllint | 2 +- Makefile | 2 +- .../expose-keptn-metric/00-assert.yaml | 9 --------- .../expose-keptn-metric/00-teststep.yaml | 11 +++++++++++ .../expose-keptn-metric/01-assert.yaml | 9 --------- .../expose-keptn-metric/01-teststep.yaml | 12 ++++++++++++ .../expose-keptn-metric/02-teststep.yaml | 4 ---- .../{01-install.yaml => job-existing-metric.yaml} | 15 +++++++++------ .../{00-install.yaml => job-no-metric.yaml} | 9 +++++---- 9 files changed, 39 insertions(+), 34 deletions(-) delete mode 100644 test/integration/expose-keptn-metric/00-assert.yaml create mode 100644 test/integration/expose-keptn-metric/00-teststep.yaml delete mode 100644 test/integration/expose-keptn-metric/01-assert.yaml create mode 100644 test/integration/expose-keptn-metric/01-teststep.yaml delete mode 100644 test/integration/expose-keptn-metric/02-teststep.yaml rename test/integration/expose-keptn-metric/{01-install.yaml => job-existing-metric.yaml} (74%) rename test/integration/expose-keptn-metric/{00-install.yaml => job-no-metric.yaml} (75%) diff --git a/.yamllint b/.yamllint index ef4a1972ed..ddb236d18e 100644 --- a/.yamllint +++ b/.yamllint @@ -37,7 +37,7 @@ rules: key-duplicates: enable key-ordering: disable line-length: - max: 150 + max: 155 new-line-at-end-of-file: enable new-lines: enable octal-values: enable diff --git a/Makefile b/Makefile index 54c9e1247b..c6b08e8fd1 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ $(HELMIFY): $(LOCALBIN) test -s $(LOCALBIN)/helmify || GOBIN=$(LOCALBIN) go install github.com/keptn/helmify/cmd/helmify@b1da2bb756ec4328bac7645da037a6fb4e6f30cf .PHONY: integration-test #these tests should run on a real cluster! -integration-test: +integration-test: # to run a single test by name use --test eg. --test=expose-keptn-metric kubectl kuttl test --start-kind=false ./test/integration/ --config=kuttl-test.yaml .PHONY: integration-test-local #these tests should run on a real cluster! diff --git a/test/integration/expose-keptn-metric/00-assert.yaml b/test/integration/expose-keptn-metric/00-assert.yaml deleted file mode 100644 index b614812c6c..0000000000 --- a/test/integration/expose-keptn-metric/00-assert.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: test -status: - conditions: - - type: Complete - status: 'True' - succeeded: 1 diff --git a/test/integration/expose-keptn-metric/00-teststep.yaml b/test/integration/expose-keptn-metric/00-teststep.yaml new file mode 100644 index 0000000000..5cccc5605b --- /dev/null +++ b/test/integration/expose-keptn-metric/00-teststep.yaml @@ -0,0 +1,11 @@ +apiVersion: kuttl.dev/v1 +kind: TestStep +commands: # generating job and metric based on namespace to avoid interference between runs + - script: | + export NAME=$( echo $NAMESPACE | tr -d -) + echo "installing first job" + envsubst < job-no-metric.yaml | kubectl apply -f - + - script: | + export NAME=$( echo $NAMESPACE | tr -d -) + echo "asserting first job" + kubectl wait --for=condition=complete job $NAME-job1 -n $NAMESPACE diff --git a/test/integration/expose-keptn-metric/01-assert.yaml b/test/integration/expose-keptn-metric/01-assert.yaml deleted file mode 100644 index 5e9ba728cd..0000000000 --- a/test/integration/expose-keptn-metric/01-assert.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: test2 -status: - conditions: - - type: Complete - status: 'True' - succeeded: 1 diff --git a/test/integration/expose-keptn-metric/01-teststep.yaml b/test/integration/expose-keptn-metric/01-teststep.yaml new file mode 100644 index 0000000000..7e115c93ec --- /dev/null +++ b/test/integration/expose-keptn-metric/01-teststep.yaml @@ -0,0 +1,12 @@ +apiVersion: kuttl.dev/v1 +kind: TestStep +commands: + - script: | # generating job and metric based on namespace to avoid interference between runs + export NAME=$( echo $NAMESPACE | tr -d -) + echo "installing second job" + envsubst < job-existing-metric.yaml | kubectl apply -f - + + - script: | # generating job assertion file + export NAME=$( echo $NAMESPACE | tr -d -) + echo "asserting second job" + kubectl wait --for=condition=complete job $NAME-job2 -n $NAMESPACE diff --git a/test/integration/expose-keptn-metric/02-teststep.yaml b/test/integration/expose-keptn-metric/02-teststep.yaml deleted file mode 100644 index 7db3009193..0000000000 --- a/test/integration/expose-keptn-metric/02-teststep.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: kuttl.dev/v1 -kind: TestStep -commands: - - script: kubectl delete keptnmetric.metrics.keptn.sh/keptnmetric-sample -n keptn-lifecycle-toolkit-system diff --git a/test/integration/expose-keptn-metric/01-install.yaml b/test/integration/expose-keptn-metric/job-existing-metric.yaml similarity index 74% rename from test/integration/expose-keptn-metric/01-install.yaml rename to test/integration/expose-keptn-metric/job-existing-metric.yaml index a0a6695eb5..fadc409bb9 100644 --- a/test/integration/expose-keptn-metric/01-install.yaml +++ b/test/integration/expose-keptn-metric/job-existing-metric.yaml @@ -1,8 +1,8 @@ apiVersion: metrics.keptn.sh/v1alpha2 kind: KeptnMetric metadata: - name: keptnmetric-sample - namespace: keptn-lifecycle-toolkit-system + name: $NAME + namespace: $NAMESPACE spec: provider: name: "provider" @@ -12,7 +12,8 @@ spec: apiVersion: batch/v1 kind: Job metadata: - name: test2 + name: $NAME-job2 + namespace: $NAMESPACE spec: backoffLimit: 5 template: @@ -25,7 +26,8 @@ spec: - -ec - | curl -s metrics-operator-service.keptn-lifecycle-toolkit-system.svc.cluster.local:9999/metrics > ~/out.txt - if grep -Fxq "# HELP keptnmetric_sample keptnmetric-sample" ~/out.txt + echo ~/out.txt + if grep -Fxq "# HELP $NAME $NAME" ~/out.txt then exit 0 fi @@ -37,8 +39,9 @@ spec: - /bin/sh - -ec - | - curl -s metrics-operator-service.keptn-lifecycle-toolkit-system.svc.cluster.local:9999/api/v1/metrics/keptn-lifecycle-toolkit-system/keptnmetric-sample > ~/out.txt - if grep -F "keptnmetric-sample" ~/out.txt + curl -s metrics-operator-service.keptn-lifecycle-toolkit-system.svc.cluster.local:9999/api/v1/metrics/$NAMESPACE/$NAME > ~/out.txt + echo ~/out.txt + if grep -F "$NAME" ~/out.txt then exit 0 fi diff --git a/test/integration/expose-keptn-metric/00-install.yaml b/test/integration/expose-keptn-metric/job-no-metric.yaml similarity index 75% rename from test/integration/expose-keptn-metric/00-install.yaml rename to test/integration/expose-keptn-metric/job-no-metric.yaml index 58cbd947d8..4dd12ce3fd 100644 --- a/test/integration/expose-keptn-metric/00-install.yaml +++ b/test/integration/expose-keptn-metric/job-no-metric.yaml @@ -1,7 +1,8 @@ apiVersion: batch/v1 kind: Job metadata: - name: test + name: $NAME-job1 + namespace: $NAMESPACE spec: backoffLimit: 0 template: @@ -14,7 +15,7 @@ spec: - -ec - | curl -s metrics-operator-service.keptn-lifecycle-toolkit-system.svc.cluster.local:9999/metrics > ~/out.txt - if grep -Fxq "# HELP keptnmetric_sample keptnmetric-sample" ~/out.txt + if grep -Fxq "# HELP $NAME $NAME" ~/out.txt then exit 1 fi @@ -24,8 +25,8 @@ spec: - /bin/sh - -ec - | - curl -s metrics-operator-service.keptn-lifecycle-toolkit-system.svc.cluster.local:9999/api/v1/metrics//keptnmetric-sample > ~/out.txt - if grep -F "keptnmetric-sample" ~/out.txt + curl -s metrics-operator-service.keptn-lifecycle-toolkit-system.svc.cluster.local:9999/api/v1/metrics/$NAMESPACE/$NAME > ~/out.txt + if grep -F "$NAME" ~/out.txt then exit 1 fi From 4c96e98a3f6c6775f453fb78992d6edc03d58cb2 Mon Sep 17 00:00:00 2001 From: Rakshit Gondwal <98955085+rakshitgondwal@users.noreply.github.com> Date: Mon, 17 Apr 2023 12:09:40 +0530 Subject: [PATCH 10/13] ci: fix set-date pipeline bug (#1208) --- .github/workflows/set-date.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/set-date.yml b/.github/workflows/set-date.yml index 8f33629fae..9abf7c0e8f 100644 --- a/.github/workflows/set-date.yml +++ b/.github/workflows/set-date.yml @@ -38,10 +38,10 @@ jobs: } }' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV - echo 'START_DATE_FIELD_ID='\ - $(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Start Date") | .id' project_data.json) >> $GITHUB_ENV - echo 'END_DATE_FIELD_ID='\ - $(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "End Date") | .id' project_data.json) >> $GITHUB_ENV + echo 'START_DATE_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Start Date") | .id' project_data.json) \ + >> $GITHUB_ENV + echo 'END_DATE_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "End Date") | .id' project_data.json) \ + >> $GITHUB_ENV - name: Get date run: echo "DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV From 99ef2235648e1fa97d9ae30c7df4551dbb7bcf94 Mon Sep 17 00:00:00 2001 From: Simon Schrottner Date: Mon, 17 Apr 2023 11:17:24 +0200 Subject: [PATCH 11/13] fix: adapt mapping for community files (#1215) Signed-off-by: Simon Schrottner --- docs/config/_default/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/config/_default/config.yaml b/docs/config/_default/config.yaml index d3669f9531..0e62170922 100644 --- a/docs/config/_default/config.yaml +++ b/docs/config/_default/config.yaml @@ -22,7 +22,7 @@ module: ignoreConfig: false mounts: - source: ./ - target: ./content/en/community + target: ./content/community excludeFiles: - "mentorship" - source: "README.md" From 80d0045daccc292cad745aebbc2feba0c1e55cbd Mon Sep 17 00:00:00 2001 From: Rakshit Gondwal <98955085+rakshitgondwal@users.noreply.github.com> Date: Mon, 17 Apr 2023 18:04:57 +0530 Subject: [PATCH 12/13] docs: add metrics-operator architecture (#1151) Signed-off-by: Rakshit Gondwal Co-authored-by: Meg McRoberts --- .../architecture/components/_index.md | 33 ------------ .../components/lifecycle-operator/_index.md | 27 ++++++++++ .../components/metrics-operator/_index.md | 54 +++++++++++++++++++ .../components/scheduler/_index.md | 16 ++++++ 4 files changed, 97 insertions(+), 33 deletions(-) create mode 100644 docs/content/en/docs/concepts/architecture/components/lifecycle-operator/_index.md create mode 100644 docs/content/en/docs/concepts/architecture/components/metrics-operator/_index.md create mode 100644 docs/content/en/docs/concepts/architecture/components/scheduler/_index.md diff --git a/docs/content/en/docs/concepts/architecture/components/_index.md b/docs/content/en/docs/concepts/architecture/components/_index.md index b8e961dfb5..dcb3f14462 100644 --- a/docs/content/en/docs/concepts/architecture/components/_index.md +++ b/docs/content/en/docs/concepts/architecture/components/_index.md @@ -28,36 +28,3 @@ style Scheduler fill:#d8e6f4,stroke:#fff,stroke-width:px,color:#006bb8 style Lifecycle-Operator fill:#d8e6f4,stroke:#fff,stroke-width:px,color:#006bb8 style Metrics-Operator fill:#d8e6f4,stroke:#fff,stroke-width:px,color:#006bb8 ``` - -**Keptn's Lifecycle Operator** is -a Kubernetes [operator](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/) -that automates the deployment and management -of the Keptn Lifecycle Controller components in a Kubernetes cluster. -The Keptn Lifecycle Operator contains several controllers for **Keptn CRDs** -and a **Mutating Webhook**. - -Here's a brief overview: - -**Keptn CRDs:** Keptn Lifecycle Operator contains -several controllers that manage and reconcile different types of Keptn CRDs -such as the Project Controller, Service Controller, and Stage Controller. - -**Mutating Webhook:** automatically injects Keptn labels -and annotations into Kubernetes resources, -such as deployments and services. -These labels and annotations are used to enable Keptn's automation -and monitoring capabilities. - -**Keptn's Lifecycle Metrics Operator** -collects, processes, and analyzes metrics data from a variety of sources. -Once collected, this data, can be used to generate a variety of reports -and dashboards that provide insights into the health and performance of the application and infrastructure. - -**Keptn's Lifecycle Scheduler** replaces the -[Kubernetes scheduler](https://kubernetes.io/docs/concepts/scheduling-eviction/kube-scheduler/) -to allow users to schedule events and tasks to occur -at specific times during the application lifecycle. -The Lifecycle Scheduler can trigger events such as -deployment, testing, and remediation at specific times or intervals. -The Keptn Scheduler guarantees that Pods are initiated only after -the Pre-Deployment checks are completed. diff --git a/docs/content/en/docs/concepts/architecture/components/lifecycle-operator/_index.md b/docs/content/en/docs/concepts/architecture/components/lifecycle-operator/_index.md new file mode 100644 index 0000000000..e064671db5 --- /dev/null +++ b/docs/content/en/docs/concepts/architecture/components/lifecycle-operator/_index.md @@ -0,0 +1,27 @@ +--- +title: Keptn Lifecycle Operator +linktitle: Lifecycle Operator +description: Basic understanding of Keptn's Lifecycle Operator +weight: 80 +cascade: +--- + + +**Keptn's Lifecycle Operator** is +a Kubernetes [operator](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/) +that automates the deployment and management +of the Keptn Lifecycle Controller components in a Kubernetes cluster. +The Keptn Lifecycle Operator contains several controllers for **Keptn CRDs** +and a **Mutating Webhook**. + +Here's a brief overview: + +**Keptn CRDs:** Keptn Lifecycle Operator contains +several controllers that manage and reconcile different types of Keptn CRDs +such as the Project Controller, Service Controller, and Stage Controller. + +**Mutating Webhook:** automatically injects Keptn labels +and annotations into Kubernetes resources, +such as deployments and services. +These labels and annotations are used to enable Keptn's automation +and monitoring capabilities. diff --git a/docs/content/en/docs/concepts/architecture/components/metrics-operator/_index.md b/docs/content/en/docs/concepts/architecture/components/metrics-operator/_index.md new file mode 100644 index 0000000000..48752c79f0 --- /dev/null +++ b/docs/content/en/docs/concepts/architecture/components/metrics-operator/_index.md @@ -0,0 +1,54 @@ +--- +title: Keptn Metrics Operator +linktitle: Metrics Operator +description: Basic understanding of Keptn's Metrics Operator +weight: 80 +cascade: +--- + + +The Keptn Metrics Operator collects, processes, and analyzes metrics data from a variety of sources. +Once collected, this data, can be used to generate a variety of reports and dashboards +that provide insights into the health and performance of the application and infrastructure. + +While Kubernetes does have two metrics servers, they have limitations. +The custom and external APIs only allow you to use a single observability platform. +The Keptn Metrics Operator solves this problem by providing a single entry point for +all your metrics data, regardless of its source. +Furthermore, due to the integration with the Kubernetes custom metrics API, these metrics are also +compatible with the Kubernetes HorizontalPodAutoscaler (HPA) which enables the horizontal scaling of workloads +based on metrics collected from multiple observability platforms such as Prometheus, Dynatrace or Datadog. + +The Metrics Operator consists of the following components: + +* Metrics Controller +* Metrics Adapter + +```mermaid +graph TD; + Metrics-Operator-->Metrics-Adapter; + Metrics-Operator-->Metrics-Controller +style Metrics-Operator fill:#006bb8,stroke:#fff,stroke-width:px,color:#fff +style Metrics-Adapter fill:#d8e6f4,stroke:#fff,stroke-width:px,color:#006bb8 +style Metrics-Controller fill:#d8e6f4,stroke:#fff,stroke-width:px,color:#006bb8 +``` + +**Metrics adapter** is used to expose custom metrics from an application to external monitoring and alerting tools. +The adapter exposes custom metrics on a specific endpoint where external monitoring and alerting tools can scrape them. +It is an important component of the metrics operator as it allows for the collection and exposure of custom metrics, +which can be used to gain insight into the behavior and performance of applications running on a Kubenetes cluster. + +**Metrics controller** is used to fetch metrics from a SLI provider. +The controller reconciles a [`KeptnMetric`](../../../../yaml-crd-ref/metric.md) CR and +updates its status with the metric value provided by the selected SLI provider. +The steps in which the controller fetches metrics are given below: + +* It first fetches the `KeptnMetric` object to reconcile. +* If the object is not found, it returns and lets Kubernetes handle deleting all associated resources. +* If the object is found, the code checks that if the metric has been updated within the configured +interval which is defined in the `Spec.FetchIntervalSeconds`. +If not, then it skips reconciling and requeues the request for later. +* If the metric should be reconciled, it fetches the provider defined in the `Spec.Provider.Name` field. +* If the provider is not found, it returns and requeues the request for later. +* If the provider is found, it loads the provider and evaluates the query defined in the `Spec.Query` field. +* If the evaluation is succesful, it stores the fetched value in the status of the `KeptnMetric` object. diff --git a/docs/content/en/docs/concepts/architecture/components/scheduler/_index.md b/docs/content/en/docs/concepts/architecture/components/scheduler/_index.md new file mode 100644 index 0000000000..52a3b0a3a1 --- /dev/null +++ b/docs/content/en/docs/concepts/architecture/components/scheduler/_index.md @@ -0,0 +1,16 @@ +--- +title: Keptn Lifecycle Scheduler +linktitle: Scheduler +description: Basic understanding of Keptn's Lifecycle Scheduler +weight: 80 +cascade: +--- + +**Keptn's Lifecycle Scheduler** replaces the +[Kubernetes scheduler](https://kubernetes.io/docs/concepts/scheduling-eviction/kube-scheduler/) +to allow users to schedule events and tasks to occur +at specific times during the application lifecycle. +The Lifecycle Scheduler can trigger events such as +deployment, testing, and remediation at specific times or intervals. +The Keptn Scheduler guarantees that Pods are initiated only after +the Pre-Deployment checks are completed. From c9b1a42df8a8da1e158fd7a0c1d2a92726b7ca08 Mon Sep 17 00:00:00 2001 From: prateek singh <89681447+prateek041@users.noreply.github.com> Date: Tue, 18 Apr 2023 13:03:13 +0530 Subject: [PATCH 13/13] docs: fix typo in the getting started docs (#1204) Co-authored-by: Meg McRoberts --- docs/content/en/docs/getting-started.md | 2 +- docs/content/en/docs/snippets/tasks/install.md | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/content/en/docs/getting-started.md b/docs/content/en/docs/getting-started.md index 2d76d1e7a4..2eacac03f1 100644 --- a/docs/content/en/docs/getting-started.md +++ b/docs/content/en/docs/getting-started.md @@ -149,7 +149,7 @@ kubectl describe keptnworkloadinstances podtato-head-podtato-head-entry -n podta ``` > **Note** -The event stream of the object contains more detailed informatio +The event stream of the object contains more detailed information
Watch application state diff --git a/docs/content/en/docs/snippets/tasks/install.md b/docs/content/en/docs/snippets/tasks/install.md index 67879395fd..9872a7e721 100644 --- a/docs/content/en/docs/snippets/tasks/install.md +++ b/docs/content/en/docs/snippets/tasks/install.md @@ -2,8 +2,7 @@ ## Install version 0.7.0 and above -In version 0.7.0 and later, you can install the Lifecycle Toolkit using helm charts, -or manifests. +In version 0.7.0 and later, you can install the Lifecycle Toolkit using either helm charts or manifests. For installing the Lifecycle Toolkit via Helm chart: