From 4dc52c7f928a8cc43ff424f92c705169743ad442 Mon Sep 17 00:00:00 2001 From: chtrembl <62187826+chtrembl@users.noreply.github.com> Date: Wed, 22 Dec 2021 08:59:40 -0500 Subject: [PATCH] updates --- ...tservice-deployment-everything-enabled.yml | 51 +++++++++++++++++++ ...epetservice-service-everything-enabled.yml | 10 ++++ 2 files changed, 61 insertions(+) create mode 100644 manifests/petstorepetservice-deployment-everything-enabled.yml create mode 100644 manifests/petstorepetservice-service-everything-enabled.yml diff --git a/manifests/petstorepetservice-deployment-everything-enabled.yml b/manifests/petstorepetservice-deployment-everything-enabled.yml new file mode 100644 index 00000000..30d40f35 --- /dev/null +++ b/manifests/petstorepetservice-deployment-everything-enabled.yml @@ -0,0 +1,51 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: aks-petstorepetservice +spec: + replicas: 1 + selector: + matchLabels: + app: aks-petstorepetservice + template: + metadata: + labels: + app: aks-petstorepetservice + spec: + nodeSelector: + "beta.kubernetes.io/os": linux + containers: + - name: petstoreservice + image: azurepetstorecr.azurecr.io/petstorepetservice:latest + resources: + requests: + cpu: 250m + memory: 1Gi + limits: + cpu: 500m + memory: 2Gi + ports: + - containerPort: 8080 + env: + - name: PETSTOREPETSERVICE_SERVER_PORT + value: "80" + - name: spring.config.name + value: application_with_everything_enabled + - name: PETSTORESERVICES_AI_INSTRUMENTATION_KEY + valueFrom: + secretKeyRef: + name: aisecretkey + key: secret +--- +apiVersion: autoscaling/v1 +kind: HorizontalPodAutoscaler +metadata: + name: aks-petstorepetservice-hpa +spec: + maxReplicas: 4 # define max replica count + minReplicas: 1 # define min replica count + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: aks-petstorepetservice + targetCPUUtilizationPercentage: 80 # target CPU utilization diff --git a/manifests/petstorepetservice-service-everything-enabled.yml b/manifests/petstorepetservice-service-everything-enabled.yml new file mode 100644 index 00000000..5a19c150 --- /dev/null +++ b/manifests/petstorepetservice-service-everything-enabled.yml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Service +metadata: + name: aks-petstorepetservice +spec: + type: ClusterIP + ports: + - port: 80 + selector: + app: aks-petstorepetservice \ No newline at end of file