From 8664fd85ce4947f8b4453c0c6639b325bc08bc93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paco=20Guzm=C3=A1n?= Date: Wed, 16 Feb 2022 16:00:02 +0100 Subject: [PATCH] autoscale demo --- devx/autoscale-demo/deployment.yaml | 22 ++++++++++++++++++++++ devx/autoscale-demo/kustomization.yaml | 8 ++++++++ devx/autoscale-demo/service.yaml | 15 +++++++++++++++ devx/base/autoscale-demo.yaml | 22 ++++++++++++++++++++++ devx/kustomization.yaml | 1 + 5 files changed, 68 insertions(+) create mode 100644 devx/autoscale-demo/deployment.yaml create mode 100644 devx/autoscale-demo/kustomization.yaml create mode 100644 devx/autoscale-demo/service.yaml create mode 100644 devx/base/autoscale-demo.yaml diff --git a/devx/autoscale-demo/deployment.yaml b/devx/autoscale-demo/deployment.yaml new file mode 100644 index 0000000..12bfcf2 --- /dev/null +++ b/devx/autoscale-demo/deployment.yaml @@ -0,0 +1,22 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: sample-app + labels: + app: sample-app +spec: + replicas: 1 + selector: + matchLabels: + app: sample-app + template: + metadata: + labels: + app: sample-app + spec: + containers: + - image: luxas/autoscale-demo:v0.1.2 + name: metrics-provider + ports: + - name: http + containerPort: 8080 diff --git a/devx/autoscale-demo/kustomization.yaml b/devx/autoscale-demo/kustomization.yaml new file mode 100644 index 0000000..7469538 --- /dev/null +++ b/devx/autoscale-demo/kustomization.yaml @@ -0,0 +1,8 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - deployment.yaml + - service.yaml + +namespace: autoscale-demo diff --git a/devx/autoscale-demo/service.yaml b/devx/autoscale-demo/service.yaml new file mode 100644 index 0000000..7317432 --- /dev/null +++ b/devx/autoscale-demo/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: sample-app + name: sample-app +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: 8080 + selector: + app: sample-app + type: ClusterIP diff --git a/devx/base/autoscale-demo.yaml b/devx/base/autoscale-demo.yaml new file mode 100644 index 0000000..0c0b531 --- /dev/null +++ b/devx/base/autoscale-demo.yaml @@ -0,0 +1,22 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: autoscale-demo + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + source: + path: devx/autoscale-demo + repoURL: https://github.com/pacoguzman/gitops + targetRevision: HEAD + #plugin: + # name: "vela" + destination: + server: https://kubernetes.default.svc + namespace: autoscale-demo + project: default + syncPolicy: + syncOptions: + - CreateNamespace=true + automated: + prune: true diff --git a/devx/kustomization.yaml b/devx/kustomization.yaml index 47e2bd6..62b1d32 100644 --- a/devx/kustomization.yaml +++ b/devx/kustomization.yaml @@ -2,6 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: +- base/autoscale-demo.yaml #- base/backstage.yaml - base/vela-hello-world.yaml