diff --git a/examples/Makefile b/examples/Makefile index 1860cbe794..9b9e60ab44 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -1,5 +1,5 @@ -# renovate: datasource=github-tags depName=jaegertracing/jaeger -JAEGER_VERSION ?= v1.43.0 +# renovate: datasource=github-tags depName=jaegertracing/jaeger-operator +JAEGER_VERSION ?= v1.42.0 TOOLKIT_NAMESPACE ?= keptn-lifecycle-toolkit-system PODTATO_NAMESPACE ?= podtato-kubectl GRAFANA_PORT_FORWARD ?= 3000 @@ -11,7 +11,8 @@ install: install-observability install-argo @echo "-----------------------------------" helm repo add klt https://charts.lifecycle.keptn.sh helm repo update - helm upgrade --install keptn klt/klt -n keptn-lifecycle-toolkit-system --create-namespace --wait + helm upgrade --install keptn klt/klt -n $(TOOLKIT_NAMESPACE) --create-namespace --wait + kubectl apply -f support/keptn/keptnconfig.yaml -n $(TOOLKIT_NAMESPACE) .PHONY: install-observability install-observability: @@ -57,6 +58,18 @@ undeploy-podtatohead: uninstall-observability: undeploy-podtatohead make -C support/observability uninstall +.PHONY: uninstall-argo +uninstall-argo: undeploy-podtatohead + make -C support/argo uninstall + +.PHONY: uninstall +uninstall: uninstall-observability uninstall-argo + @echo "-----------------------------------" + @echo "Uninstall Keptn-lifecycle-toolkit" + @echo "-----------------------------------" + helm uninstall keptn -n $(TOOLKIT_NAMESPACE) + kubectl delete ns $(TOOLKIT_NAMESPACE) --ignore-not-found=true + .PHONY: port-forward-argocd port-forward-argocd: @echo "" diff --git a/examples/sample-app/Makefile b/examples/sample-app/Makefile index 06f6d970d2..4548a675d3 100644 --- a/examples/sample-app/Makefile +++ b/examples/sample-app/Makefile @@ -18,17 +18,14 @@ port-forward-grafana: .PHONY: deploy-version-1 deploy-version-1: - kubectl create namespace "$(PODTATO_NAMESPACE)" --dry-run=client -o yaml | kubectl apply -f - kubectl apply -k version-1 .PHONY: deploy-version-2 deploy-version-2: - kubectl create namespace "$(PODTATO_NAMESPACE)" --dry-run=client -o yaml | kubectl apply -f - kubectl apply -k version-2 .PHONY: deploy-version-3 deploy-version-3: - kubectl create namespace "$(PODTATO_NAMESPACE)" --dry-run=client -o yaml | kubectl apply -f - kubectl apply -k version-3 .PHONY: undeploy-podtatohead diff --git a/examples/sample-app/base/app-post-deploy.yaml b/examples/sample-app/base/app-post-deploy.yaml index 1c035b1de3..744a4e501d 100644 --- a/examples/sample-app/base/app-post-deploy.yaml +++ b/examples/sample-app/base/app-post-deploy.yaml @@ -1,4 +1,4 @@ -apiVersion: lifecycle.keptn.sh/v1alpha2 +apiVersion: lifecycle.keptn.sh/v1alpha3 kind: KeptnTaskDefinition metadata: name: post-deployment-notification diff --git a/examples/sample-app/base/app.yaml b/examples/sample-app/base/app.yaml index 5f67ce4669..91e1602a7c 100644 --- a/examples/sample-app/base/app.yaml +++ b/examples/sample-app/base/app.yaml @@ -1,4 +1,4 @@ -apiVersion: lifecycle.keptn.sh/v1alpha2 +apiVersion: lifecycle.keptn.sh/v1alpha3 kind: KeptnApp metadata: name: podtato-head @@ -7,15 +7,15 @@ spec: version: "1.0.0" workloads: - name: podtato-head-left-arm - version: 0.2.7 + version: 0.1.0 - name: podtato-head-left-leg - version: 0.2.7 - - name: podtato-head-entry - version: 0.2.7 + version: 0.1.0 + - name: podtato-head-frontend + version: 0.1.0 - name: podtato-head-right-arm version: 0.1.0 - name: podtato-head-right-leg - version: 0.2.7 + version: 0.1.0 - name: podtato-head-hat version: 0.1.0 diff --git a/examples/sample-app/base/kustomization.yaml b/examples/sample-app/base/kustomization.yaml index e03509f0d7..fe5d19b790 100644 --- a/examples/sample-app/base/kustomization.yaml +++ b/examples/sample-app/base/kustomization.yaml @@ -1,6 +1,9 @@ resources: + - https://github.com/podtato-head/podtato-head-app/releases/download/v0.3.1/manifest.yaml - app.yaml - - manifest.yaml - app-post-deploy.yaml - provider.yaml - metric.yaml + +patchesStrategicMerge: + - manifest.yaml \ No newline at end of file diff --git a/examples/sample-app/base/manifest.yaml b/examples/sample-app/base/manifest.yaml index fe5a6959ae..4317d2ab30 100644 --- a/examples/sample-app/base/manifest.yaml +++ b/examples/sample-app/base/manifest.yaml @@ -1,300 +1,140 @@ ---- apiVersion: v1 kind: Namespace metadata: name: podtato-kubectl annotations: keptn.sh/lifecycle-toolkit: "enabled" + --- apiVersion: apps/v1 kind: Deployment metadata: - name: podtato-head-entry + name: podtato-head-frontend namespace: podtato-kubectl - labels: - app: podtato-head spec: - selector: - matchLabels: - component: podtato-head-entry template: metadata: labels: - component: podtato-head-entry + app.kubernetes.io/name: podtato-head-frontend + app.kubernetes.io/part-of: podtato-head + app.kubernetes.io/version: 0.1.0 spec: - terminationGracePeriodSeconds: 5 - initContainers: - - name: init-myservice - image: busybox:1.36.0 - command: ['sh', '-c', 'sleep 30'] containers: - - name: server - image: ghcr.io/podtato-head/entry:0.2.7 - imagePullPolicy: Always - ports: - - containerPort: 9000 - env: - - name: PODTATO_PORT - value: "9000" ---- -apiVersion: v1 -kind: Service -metadata: - name: podtato-head-entry - namespace: podtato-kubectl - labels: - app: podtato-head -spec: - selector: - component: podtato-head-entry - ports: - - name: http - port: 9000 - protocol: TCP - nodePort: 30900 - targetPort: 9000 - type: NodePort - # change to NodePort if no LoadBalancer controller is available - # type: NodePort + - name: podtato-head-frontend + env: + - name: PODTATO_STARTUP_DELAY + value: "20s" + - name: PODTATO_VERSION + valueFrom: + fieldRef: + fieldPath: metadata.labels['app.kubernetes.io/version'] + --- apiVersion: apps/v1 kind: Deployment metadata: name: podtato-head-hat namespace: podtato-kubectl - labels: - app: podtato-head spec: - selector: - matchLabels: - component: podtato-head-hat template: metadata: labels: - component: podtato-head-hat - app.kubernetes.io/version: 0.1.0 - annotations: - app.kubernetes.io/part-of: podtato-head app.kubernetes.io/name: podtato-head-hat - keptn.sh/pre-deployment-tasks: check-entry-service + app.kubernetes.io/part-of: podtato-head + app.kubernetes.io/version: 0.1.0 spec: - terminationGracePeriodSeconds: 5 containers: - - name: server - image: ghcr.io/podtato-head/hat:0.2.7 - imagePullPolicy: Always - ports: - - containerPort: 9000 + - name: podtato-head-hat env: - - name: PODTATO_PORT - value: "9000" ---- -apiVersion: v1 -kind: Service -metadata: - name: podtato-head-hat - namespace: podtato-kubectl - labels: - app: podtato-head -spec: - selector: - component: podtato-head-hat - ports: - - name: http - port: 9001 - protocol: TCP - targetPort: 9000 - type: ClusterIP + - name: PODTATO_VERSION + valueFrom: + fieldRef: + fieldPath: metadata.labels['app.kubernetes.io/version'] + --- apiVersion: apps/v1 kind: Deployment metadata: name: podtato-head-left-leg namespace: podtato-kubectl - labels: - app: podtato-head spec: - selector: - matchLabels: - component: podtato-head-left-leg template: metadata: labels: - component: podtato-head-left-leg - annotations: - app.kubernetes.io/part-of: podtato-head app.kubernetes.io/name: podtato-head-left-leg - keptn.sh/pre-deployment-tasks: check-entry-service + app.kubernetes.io/part-of: podtato-head + app.kubernetes.io/version: 0.1.0 spec: - terminationGracePeriodSeconds: 5 containers: - - name: server - image: ghcr.io/podtato-head/left-leg:0.2.7 - imagePullPolicy: Always - ports: - - containerPort: 9000 + - name: podtato-head-left-leg env: - - name: PODTATO_PORT - value: "9000" ---- -apiVersion: v1 -kind: Service -metadata: - name: podtato-head-left-leg - namespace: podtato-kubectl - labels: - app: podtato-head -spec: - selector: - component: podtato-head-left-leg - ports: - - name: http - port: 9002 - protocol: TCP - targetPort: 9000 - type: ClusterIP + - name: PODTATO_VERSION + valueFrom: + fieldRef: + fieldPath: metadata.labels['app.kubernetes.io/version'] + --- apiVersion: apps/v1 kind: Deployment metadata: - name: podtato-head-left-arm + name: podtato-head-right-leg namespace: podtato-kubectl - labels: - app: podtato-head spec: - selector: - matchLabels: - component: podtato-head-left-arm template: metadata: labels: - component: podtato-head-left-arm + app.kubernetes.io/name: podtato-head-right-leg app.kubernetes.io/part-of: podtato-head - annotations: - app.kubernetes.io/name: podtato-head-left-arm - keptn.sh/pre-deployment-tasks: check-entry-service + app.kubernetes.io/version: 0.1.0 spec: - terminationGracePeriodSeconds: 5 containers: - - name: server - image: ghcr.io/podtato-head/left-arm:0.2.7 - imagePullPolicy: Always - ports: - - containerPort: 9000 + - name: podtato-head-right-leg env: - - name: PODTATO_PORT - value: "9000" ---- -apiVersion: v1 -kind: Service -metadata: - name: podtato-head-left-arm - namespace: podtato-kubectl - labels: - app: podtato-head -spec: - selector: - component: podtato-head-left-arm - ports: - - name: http - port: 9003 - protocol: TCP - targetPort: 9000 - type: ClusterIP + - name: PODTATO_VERSION + valueFrom: + fieldRef: + fieldPath: metadata.labels['app.kubernetes.io/version'] + --- apiVersion: apps/v1 kind: Deployment metadata: - name: podtato-head-right-leg + name: podtato-head-left-arm namespace: podtato-kubectl - labels: - app: podtato-head spec: - selector: - matchLabels: - component: podtato-head-right-leg template: metadata: labels: - component: podtato-head-right-leg - annotations: + app.kubernetes.io/name: podtato-head-left-arm app.kubernetes.io/part-of: podtato-head - app.kubernetes.io/name: podtato-head-right-leg - keptn.sh/pre-deployment-tasks: check-entry-service + app.kubernetes.io/version: 0.1.0 spec: - terminationGracePeriodSeconds: 5 containers: - - name: server - image: ghcr.io/podtato-head/right-leg:0.2.7 - imagePullPolicy: Always - ports: - - containerPort: 9000 + - name: podtato-head-left-arm env: - - name: PODTATO_PORT - value: "9000" ---- -apiVersion: v1 -kind: Service -metadata: - name: podtato-head-right-leg - namespace: podtato-kubectl - labels: - app: podtato-head -spec: - selector: - component: podtato-head-right-leg - ports: - - name: http - port: 9004 - protocol: TCP - targetPort: 9000 - type: ClusterIP + - name: PODTATO_VERSION + valueFrom: + fieldRef: + fieldPath: metadata.labels['app.kubernetes.io/version'] + --- apiVersion: apps/v1 kind: Deployment metadata: name: podtato-head-right-arm namespace: podtato-kubectl - labels: - app: podtato-head spec: - selector: - matchLabels: - component: podtato-head-right-arm template: metadata: labels: - component: podtato-head-right-arm - annotations: + app.kubernetes.io/name: podtato-head-right-arm app.kubernetes.io/part-of: podtato-head - keptn.sh/workload: podtato-head-right-arm - keptn.sh/version: 0.1.0 - keptn.sh/pre-deployment-tasks: check-entry-service + app.kubernetes.io/version: 0.1.0 spec: - terminationGracePeriodSeconds: 5 containers: - - name: server - image: ghcr.io/podtato-head/right-arm:0.2.7 - imagePullPolicy: Always - ports: - - containerPort: 9000 + - name: podtato-head-right-arm env: - - name: PODTATO_PORT - value: "9000" ---- -apiVersion: v1 -kind: Service -metadata: - name: podtato-head-right-arm - namespace: podtato-kubectl - labels: - app: podtato-head -spec: - selector: - component: podtato-head-right-arm - ports: - - name: http - port: 9005 - protocol: TCP - targetPort: 9000 - type: ClusterIP + - name: PODTATO_VERSION + valueFrom: + fieldRef: + fieldPath: metadata.labels['app.kubernetes.io/version'] \ No newline at end of file diff --git a/examples/sample-app/version-1/app-pre-deploy.yaml b/examples/sample-app/version-1/app-pre-deploy.yaml index 2b72547b44..6dd21ae0e9 100644 --- a/examples/sample-app/version-1/app-pre-deploy.yaml +++ b/examples/sample-app/version-1/app-pre-deploy.yaml @@ -1,7 +1,7 @@ -apiVersion: lifecycle.keptn.sh/v1alpha2 +apiVersion: lifecycle.keptn.sh/v1alpha3 kind: KeptnTaskDefinition metadata: - name: pre-deployment-check-entry + name: pre-deployment-check-frontend namespace: podtato-kubectl spec: function: @@ -9,4 +9,4 @@ spec: url: https://raw.githubusercontent.com/keptn-sandbox/lifecycle-controller/main/functions-runtime/samples/ts/http.ts parameters: map: - url: http://podtato-head-entry.podtato-kubectl.svc.cluster.local:9000 + url: http://podtato-head-frontend.podtato-kubectl.svc.cluster.local:8080 diff --git a/examples/sample-app/version-1/app.yaml b/examples/sample-app/version-1/app.yaml index 500b95e481..778d237921 100644 --- a/examples/sample-app/version-1/app.yaml +++ b/examples/sample-app/version-1/app.yaml @@ -1,22 +1,22 @@ -apiVersion: lifecycle.keptn.sh/v1alpha2 +apiVersion: lifecycle.keptn.sh/v1alpha3 kind: KeptnApp metadata: name: podtato-head namespace: podtato-kubectl spec: - version: "0.1.0" + version: "0.1.1" workloads: - name: podtato-head-left-arm - version: 0.2.7 + version: 0.1.1 - name: podtato-head-left-leg - version: 0.2.7 - - name: podtato-head-entry - version: 0.2.7 - - name: podtato-head-right-arm + version: 0.1.1 + - name: podtato-head-frontend version: 0.1.0 + - name: podtato-head-right-arm + version: 0.1.1 - name: podtato-head-right-leg - version: 0.2.7 + version: 0.1.1 - name: podtato-head-hat - version: 0.1.0 + version: 0.1.1 preDeploymentEvaluations: - app-pre-deploy-eval-1 diff --git a/examples/sample-app/version-1/manifest.yaml b/examples/sample-app/version-1/manifest.yaml index 587aad6896..b27289998d 100644 --- a/examples/sample-app/version-1/manifest.yaml +++ b/examples/sample-app/version-1/manifest.yaml @@ -1,15 +1,10 @@ --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: v1 +kind: Namespace metadata: - name: podtato-head-entry - namespace: podtato-kubectl -spec: - template: - metadata: - labels: - keptn.sh/app: podtato-head - keptn.sh/workload: podtato-head-entry + name: podtato-kubectl + annotations: + keptn.sh/lifecycle-toolkit: "enabled" --- apiVersion: apps/v1 @@ -21,11 +16,9 @@ spec: template: metadata: labels: - app.kubernetes.io/version: 0.1.0 - annotations: - app.kubernetes.io/part-of: podtato-head - app.kubernetes.io/name: podtato-head-hat - keptn.sh/pre-deployment-tasks: pre-deployment-check-entry + keptn.sh/pre-deployment-tasks: pre-deployment-check-frontend + app.kubernetes.io/version: 0.1.1 + --- apiVersion: apps/v1 kind: Deployment @@ -35,39 +28,36 @@ metadata: spec: template: metadata: - annotations: - app.kubernetes.io/part-of: podtato-head - app.kubernetes.io/name: podtato-head-left-leg - keptn.sh/pre-deployment-tasks: pre-deployment-check-entry + labels: + keptn.sh/pre-deployment-tasks: pre-deployment-check-frontend + app.kubernetes.io/version: 0.1.1 + --- apiVersion: apps/v1 kind: Deployment metadata: - name: podtato-head-left-arm + name: podtato-head-right-leg namespace: podtato-kubectl spec: template: metadata: labels: - app.kubernetes.io/part-of: podtato-head - annotations: - app.kubernetes.io/name: podtato-head-left-arm - keptn.sh/pre-deployment-tasks: pre-deployment-check-entry + keptn.sh/pre-deployment-tasks: pre-deployment-check-frontend + app.kubernetes.io/version: 0.1.1 + --- apiVersion: apps/v1 kind: Deployment metadata: - name: podtato-head-right-leg + name: podtato-head-left-arm namespace: podtato-kubectl spec: template: metadata: labels: - component: podtato-head-right-leg - annotations: - app.kubernetes.io/part-of: podtato-head - app.kubernetes.io/name: podtato-head-right-leg - keptn.sh/pre-deployment-tasks: pre-deployment-check-entry + keptn.sh/pre-deployment-tasks: pre-deployment-check-frontend + app.kubernetes.io/version: 0.1.1 + --- apiVersion: apps/v1 kind: Deployment @@ -77,8 +67,6 @@ metadata: spec: template: metadata: - annotations: - app.kubernetes.io/part-of: podtato-head - keptn.sh/workload: podtato-head-right-arm - keptn.sh/version: 0.1.0 - keptn.sh/pre-deployment-tasks: pre-deployment-check-entry \ No newline at end of file + labels: + keptn.sh/pre-deployment-tasks: pre-deployment-check-frontend + app.kubernetes.io/version: 0.1.1 \ No newline at end of file diff --git a/examples/sample-app/version-2/app-pre-deploy.yaml b/examples/sample-app/version-2/app-pre-deploy.yaml index 2b72547b44..6dd21ae0e9 100644 --- a/examples/sample-app/version-2/app-pre-deploy.yaml +++ b/examples/sample-app/version-2/app-pre-deploy.yaml @@ -1,7 +1,7 @@ -apiVersion: lifecycle.keptn.sh/v1alpha2 +apiVersion: lifecycle.keptn.sh/v1alpha3 kind: KeptnTaskDefinition metadata: - name: pre-deployment-check-entry + name: pre-deployment-check-frontend namespace: podtato-kubectl spec: function: @@ -9,4 +9,4 @@ spec: url: https://raw.githubusercontent.com/keptn-sandbox/lifecycle-controller/main/functions-runtime/samples/ts/http.ts parameters: map: - url: http://podtato-head-entry.podtato-kubectl.svc.cluster.local:9000 + url: http://podtato-head-frontend.podtato-kubectl.svc.cluster.local:8080 diff --git a/examples/sample-app/version-2/app.yaml b/examples/sample-app/version-2/app.yaml index db48bec5ec..96675d3cbd 100644 --- a/examples/sample-app/version-2/app.yaml +++ b/examples/sample-app/version-2/app.yaml @@ -1,22 +1,22 @@ -apiVersion: lifecycle.keptn.sh/v1alpha2 +apiVersion: lifecycle.keptn.sh/v1alpha3 kind: KeptnApp metadata: name: podtato-head namespace: podtato-kubectl spec: - version: "0.1.1" + version: "0.1.2" workloads: - name: podtato-head-left-arm - version: 0.2.7 + version: 0.1.1 - name: podtato-head-left-leg - version: 0.2.7 - - name: podtato-head-entry - version: 0.2.7 - - name: podtato-head-right-arm + version: 0.1.1 + - name: podtato-head-frontend version: 0.1.0 + - name: podtato-head-right-arm + version: 0.1.1 - name: podtato-head-right-leg - version: 0.2.7 + version: 0.1.1 - name: podtato-head-hat - version: 0.1.0 + version: 0.1.1 preDeploymentEvaluations: - app-pre-deploy-eval-2 diff --git a/examples/sample-app/version-2/manifest.yaml b/examples/sample-app/version-2/manifest.yaml index 587aad6896..b27289998d 100644 --- a/examples/sample-app/version-2/manifest.yaml +++ b/examples/sample-app/version-2/manifest.yaml @@ -1,15 +1,10 @@ --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: v1 +kind: Namespace metadata: - name: podtato-head-entry - namespace: podtato-kubectl -spec: - template: - metadata: - labels: - keptn.sh/app: podtato-head - keptn.sh/workload: podtato-head-entry + name: podtato-kubectl + annotations: + keptn.sh/lifecycle-toolkit: "enabled" --- apiVersion: apps/v1 @@ -21,11 +16,9 @@ spec: template: metadata: labels: - app.kubernetes.io/version: 0.1.0 - annotations: - app.kubernetes.io/part-of: podtato-head - app.kubernetes.io/name: podtato-head-hat - keptn.sh/pre-deployment-tasks: pre-deployment-check-entry + keptn.sh/pre-deployment-tasks: pre-deployment-check-frontend + app.kubernetes.io/version: 0.1.1 + --- apiVersion: apps/v1 kind: Deployment @@ -35,39 +28,36 @@ metadata: spec: template: metadata: - annotations: - app.kubernetes.io/part-of: podtato-head - app.kubernetes.io/name: podtato-head-left-leg - keptn.sh/pre-deployment-tasks: pre-deployment-check-entry + labels: + keptn.sh/pre-deployment-tasks: pre-deployment-check-frontend + app.kubernetes.io/version: 0.1.1 + --- apiVersion: apps/v1 kind: Deployment metadata: - name: podtato-head-left-arm + name: podtato-head-right-leg namespace: podtato-kubectl spec: template: metadata: labels: - app.kubernetes.io/part-of: podtato-head - annotations: - app.kubernetes.io/name: podtato-head-left-arm - keptn.sh/pre-deployment-tasks: pre-deployment-check-entry + keptn.sh/pre-deployment-tasks: pre-deployment-check-frontend + app.kubernetes.io/version: 0.1.1 + --- apiVersion: apps/v1 kind: Deployment metadata: - name: podtato-head-right-leg + name: podtato-head-left-arm namespace: podtato-kubectl spec: template: metadata: labels: - component: podtato-head-right-leg - annotations: - app.kubernetes.io/part-of: podtato-head - app.kubernetes.io/name: podtato-head-right-leg - keptn.sh/pre-deployment-tasks: pre-deployment-check-entry + keptn.sh/pre-deployment-tasks: pre-deployment-check-frontend + app.kubernetes.io/version: 0.1.1 + --- apiVersion: apps/v1 kind: Deployment @@ -77,8 +67,6 @@ metadata: spec: template: metadata: - annotations: - app.kubernetes.io/part-of: podtato-head - keptn.sh/workload: podtato-head-right-arm - keptn.sh/version: 0.1.0 - keptn.sh/pre-deployment-tasks: pre-deployment-check-entry \ No newline at end of file + labels: + keptn.sh/pre-deployment-tasks: pre-deployment-check-frontend + app.kubernetes.io/version: 0.1.1 \ No newline at end of file diff --git a/examples/sample-app/version-3/app-pre-deploy.yaml b/examples/sample-app/version-3/app-pre-deploy.yaml index 2b72547b44..6dd21ae0e9 100644 --- a/examples/sample-app/version-3/app-pre-deploy.yaml +++ b/examples/sample-app/version-3/app-pre-deploy.yaml @@ -1,7 +1,7 @@ -apiVersion: lifecycle.keptn.sh/v1alpha2 +apiVersion: lifecycle.keptn.sh/v1alpha3 kind: KeptnTaskDefinition metadata: - name: pre-deployment-check-entry + name: pre-deployment-check-frontend namespace: podtato-kubectl spec: function: @@ -9,4 +9,4 @@ spec: url: https://raw.githubusercontent.com/keptn-sandbox/lifecycle-controller/main/functions-runtime/samples/ts/http.ts parameters: map: - url: http://podtato-head-entry.podtato-kubectl.svc.cluster.local:9000 + url: http://podtato-head-frontend.podtato-kubectl.svc.cluster.local:8080 diff --git a/examples/sample-app/version-3/app.yaml b/examples/sample-app/version-3/app.yaml index 99cdac6037..6060d5590b 100644 --- a/examples/sample-app/version-3/app.yaml +++ b/examples/sample-app/version-3/app.yaml @@ -1,4 +1,4 @@ -apiVersion: lifecycle.keptn.sh/v1alpha2 +apiVersion: lifecycle.keptn.sh/v1alpha3 kind: KeptnApp metadata: name: podtato-head @@ -7,14 +7,14 @@ spec: version: "0.1.2" workloads: - name: podtato-head-left-arm - version: 0.2.7 + version: 0.1.1 - name: podtato-head-left-leg - version: 0.2.7 - - name: podtato-head-entry - version: 0.2.7 - - name: podtato-head-right-arm + version: 0.1.1 + - name: podtato-head-frontend version: 0.1.0 + - name: podtato-head-right-arm + version: 0.1.1 - name: podtato-head-right-leg - version: 0.2.7 - - name: podtato-head-hat version: 0.1.1 + - name: podtato-head-hat + version: 0.1.2 diff --git a/examples/sample-app/version-3/manifest.yaml b/examples/sample-app/version-3/manifest.yaml index 45c8c7f7b0..779daf06f8 100644 --- a/examples/sample-app/version-3/manifest.yaml +++ b/examples/sample-app/version-3/manifest.yaml @@ -1,15 +1,10 @@ --- -apiVersion: apps/v1 -kind: Deployment +apiVersion: v1 +kind: Namespace metadata: - name: podtato-head-entry - namespace: podtato-kubectl -spec: - template: - metadata: - labels: - keptn.sh/app: podtato-head - keptn.sh/workload: podtato-head-entry + name: podtato-kubectl + annotations: + keptn.sh/lifecycle-toolkit: "enabled" --- apiVersion: apps/v1 @@ -21,11 +16,9 @@ spec: template: metadata: labels: - app.kubernetes.io/version: 0.1.1 - annotations: - app.kubernetes.io/part-of: podtato-head - app.kubernetes.io/name: podtato-head-hat - keptn.sh/pre-deployment-tasks: pre-deployment-check-entry + keptn.sh/pre-deployment-tasks: pre-deployment-check-frontend + app.kubernetes.io/version: 0.1.2 + --- apiVersion: apps/v1 kind: Deployment @@ -35,39 +28,36 @@ metadata: spec: template: metadata: - annotations: - app.kubernetes.io/part-of: podtato-head - app.kubernetes.io/name: podtato-head-left-leg - keptn.sh/pre-deployment-tasks: pre-deployment-check-entry + labels: + keptn.sh/pre-deployment-tasks: pre-deployment-check-frontend + app.kubernetes.io/version: 0.1.1 + --- apiVersion: apps/v1 kind: Deployment metadata: - name: podtato-head-left-arm + name: podtato-head-right-leg namespace: podtato-kubectl spec: template: metadata: labels: - app.kubernetes.io/part-of: podtato-head - annotations: - app.kubernetes.io/name: podtato-head-left-arm - keptn.sh/pre-deployment-tasks: pre-deployment-check-entry + keptn.sh/pre-deployment-tasks: pre-deployment-check-frontend + app.kubernetes.io/version: 0.1.1 + --- apiVersion: apps/v1 kind: Deployment metadata: - name: podtato-head-right-leg + name: podtato-head-left-arm namespace: podtato-kubectl spec: template: metadata: labels: - component: podtato-head-right-leg - annotations: - app.kubernetes.io/part-of: podtato-head - app.kubernetes.io/name: podtato-head-right-leg - keptn.sh/pre-deployment-tasks: pre-deployment-check-entry + keptn.sh/pre-deployment-tasks: pre-deployment-check-frontend + app.kubernetes.io/version: 0.1.1 + --- apiVersion: apps/v1 kind: Deployment @@ -77,8 +67,6 @@ metadata: spec: template: metadata: - annotations: - app.kubernetes.io/part-of: podtato-head - keptn.sh/workload: podtato-head-right-arm - keptn.sh/version: 0.1.0 - keptn.sh/pre-deployment-tasks: pre-deployment-check-entry \ No newline at end of file + labels: + keptn.sh/pre-deployment-tasks: pre-deployment-check-frontend + app.kubernetes.io/version: 0.1.1 \ No newline at end of file diff --git a/examples/support/argo/Makefile b/examples/support/argo/Makefile index a28f4c1497..11e912ee45 100644 --- a/examples/support/argo/Makefile +++ b/examples/support/argo/Makefile @@ -10,7 +10,7 @@ install: @echo "-----------------------------------" @echo "Create Namespace and install ArgoCD" @echo "-----------------------------------" - kubectl create namespace $(ARGO_NAMESPACE) + kubectl create namespace "$(ARGO_NAMESPACE)" --dry-run=client -o yaml | kubectl apply -f - kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/$(ARGO_VERSION)/manifests/install.yaml @echo "" @@ -57,7 +57,7 @@ argo-install-podtatohead: .PHONY: uninstall uninstall: - kubectl delete -n $(ARGO_NAMESPACE) -f https://raw.githubusercontent.com/argoproj/argo-cd/v$(ARGO_VERSION)/manifests/install.yaml --ignore-not-found=true + kubectl delete -n $(ARGO_NAMESPACE) -f https://raw.githubusercontent.com/argoproj/argo-cd/$(ARGO_VERSION)/manifests/install.yaml --ignore-not-found=true kubectl delete namespace $(ARGO_NAMESPACE) --ignore-not-found=true @echo "" @echo "##########################" diff --git a/examples/support/keptn/keptnconfig.yaml b/examples/support/keptn/keptnconfig.yaml new file mode 100644 index 0000000000..f69789f23b --- /dev/null +++ b/examples/support/keptn/keptnconfig.yaml @@ -0,0 +1,6 @@ +apiVersion: options.keptn.sh/v1alpha1 +kind: KeptnConfig +metadata: + name: keptnconfig-sample +spec: + OTelCollectorUrl: 'otel-collector:4317' \ No newline at end of file diff --git a/examples/support/observability/Makefile b/examples/support/observability/Makefile index 61ebd0e904..e374b16166 100644 --- a/examples/support/observability/Makefile +++ b/examples/support/observability/Makefile @@ -1,5 +1,5 @@ -# renovate: datasource=github-tags depName=jaegertracing/jaeger -JAEGER_VERSION ?= v1.43.0 +# renovate: datasource=github-tags depName=jaegertracing/jaeger-operator +JAEGER_VERSION ?= v1.42.0 TOOLKIT_NAMESPACE ?= keptn-lifecycle-toolkit-system PODTATO_NAMESPACE ?= podtato-kubectl GRAFANA_PORT_FORWARD ?= 3000 diff --git a/examples/support/observability/config/otel-collector.yaml b/examples/support/observability/config/otel-collector.yaml index f1d06ee115..7858324a70 100644 --- a/examples/support/observability/config/otel-collector.yaml +++ b/examples/support/observability/config/otel-collector.yaml @@ -21,7 +21,7 @@ data: - job_name: 'otel-collector' scrape_interval: 5s static_configs: - - targets: ['lifecycle-operator-metrics-service:2222'] + - targets: ['keptn-klt-lifecycle-operator-metrics-service:2222'] processors: extensions: health_check: {}