diff --git a/manifests/petstoreorderservice-deployment-everything-enabled.yml b/manifests/petstoreorderservice-deployment-everything-enabled.yml new file mode 100644 index 00000000..bec9af6a --- /dev/null +++ b/manifests/petstoreorderservice-deployment-everything-enabled.yml @@ -0,0 +1,51 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: aks-petstoreorderservice +spec: + replicas: 1 + selector: + matchLabels: + app: aks-petstoreorderservice + template: + metadata: + labels: + app: aks-petstoreorderservice + spec: + nodeSelector: + "beta.kubernetes.io/os": linux + containers: + - name: petstoreorderservice + image: azurepetstorecr.azurecr.io/petstoreorderservice:latest + resources: + requests: + cpu: 250m + memory: 1Gi + limits: + cpu: 500m + memory: 2Gi + ports: + - containerPort: 8080 + env: + - name: PETSTOREORDERSERVICE_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-petstoreorderservice-hpa +spec: + maxReplicas: 4 # define max replica count + minReplicas: 1 # define min replica count + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: aks-petstoreorderservice + targetCPUUtilizationPercentage: 80 # target CPU utilization diff --git a/manifests/petstoreorderservice-service-everything-enabled.yml b/manifests/petstoreorderservice-service-everything-enabled.yml new file mode 100644 index 00000000..a577f49c --- /dev/null +++ b/manifests/petstoreorderservice-service-everything-enabled.yml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Service +metadata: + name: aks-petstoreorderservice +spec: + type: ClusterIP + ports: + - port: 80 + selector: + app: aks-petstoreorderservice \ No newline at end of file diff --git a/manifests/petstoreproductservice-deployment-everything-enabled.yml b/manifests/petstoreproductservice-deployment-everything-enabled.yml new file mode 100644 index 00000000..aa082064 --- /dev/null +++ b/manifests/petstoreproductservice-deployment-everything-enabled.yml @@ -0,0 +1,51 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: aks-petstoreproductservice +spec: + replicas: 1 + selector: + matchLabels: + app: aks-petstoreproductservice + template: + metadata: + labels: + app: aks-petstoreproductservice + spec: + nodeSelector: + "beta.kubernetes.io/os": linux + containers: + - name: petstoreproductservice + image: azurepetstorecr.azurecr.io/petstoreproductservice:latest + resources: + requests: + cpu: 250m + memory: 1Gi + limits: + cpu: 500m + memory: 2Gi + ports: + - containerPort: 8080 + env: + - name: PETSTOREPRODUCTSERVICE_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-petstoreproductservice-hpa +spec: + maxReplicas: 4 # define max replica count + minReplicas: 1 # define min replica count + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: aks-petstoreproductservice + targetCPUUtilizationPercentage: 80 # target CPU utilization diff --git a/manifests/petstoreproductservice-service-everything-enabled.yml b/manifests/petstoreproductservice-service-everything-enabled.yml new file mode 100644 index 00000000..9113337e --- /dev/null +++ b/manifests/petstoreproductservice-service-everything-enabled.yml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Service +metadata: + name: aks-petstoreproductservice +spec: + type: ClusterIP + ports: + - port: 80 + selector: + app: aks-petstoreproductservice \ No newline at end of file diff --git a/petstore/petstoreorderservice/src/main/resources/application_with_everything_enabled.yml b/petstore/petstoreorderservice/src/main/resources/application_with_everything_enabled.yml index a008f5ab..9c736974 100644 --- a/petstore/petstoreorderservice/src/main/resources/application_with_everything_enabled.yml +++ b/petstore/petstoreorderservice/src/main/resources/application_with_everything_enabled.yml @@ -4,18 +4,15 @@ springfoxdocumentation: path: /api-docs server: - port: ${PETSTORESERVICE_SERVER_PORT} + port: ${PETSTOREORDERSERVICE_SERVER_PORT} spring: - jackson: - date-format: org.openapitools.RFC3339DateFormat - serialization.WRITE_DATES_AS_TIMESTAMPS: false application: - name: petstorepetservice + name: petstoreorderservice azure: application-insights: - instrumentation-key: ${PETSTORESERVICE_AI_INSTRUMENTATION_KEY} + instrumentation-key: ${PETSTORESERVICES_AI_INSTRUMENTATION_KEY} web: enable-W3C: true enable-W3C-backcompat-mode: true diff --git a/petstore/petstoreproductservice/src/main/resources/application_with_everything_enabled.yml b/petstore/petstoreproductservice/src/main/resources/application_with_everything_enabled.yml index a008f5ab..d942e405 100644 --- a/petstore/petstoreproductservice/src/main/resources/application_with_everything_enabled.yml +++ b/petstore/petstoreproductservice/src/main/resources/application_with_everything_enabled.yml @@ -4,18 +4,15 @@ springfoxdocumentation: path: /api-docs server: - port: ${PETSTORESERVICE_SERVER_PORT} + port: ${PETSTOREPRODUCTSERVICE_SERVER_PORT} spring: - jackson: - date-format: org.openapitools.RFC3339DateFormat - serialization.WRITE_DATES_AS_TIMESTAMPS: false application: - name: petstorepetservice + name: petstoreproductservice azure: application-insights: - instrumentation-key: ${PETSTORESERVICE_AI_INSTRUMENTATION_KEY} + instrumentation-key: ${PETSTORESERVICES_AI_INSTRUMENTATION_KEY} web: enable-W3C: true enable-W3C-backcompat-mode: true