diff --git a/charts/cargotracker-liberty-aks/.helmignore b/charts/cargotracker-liberty-aks/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/cargotracker-liberty-aks/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/cargotracker-liberty-aks/Chart.yaml b/charts/cargotracker-liberty-aks/Chart.yaml new file mode 100644 index 0000000..d075755 --- /dev/null +++ b/charts/cargotracker-liberty-aks/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: cargotracker-liberty-aks-chart +description: A Helm chart for deploying the cargotracker application on aks using Liberty. + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 1.0.5 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" diff --git a/charts/cargotracker-liberty-aks/templates/openlibertyapplication.yaml b/charts/cargotracker-liberty-aks/templates/openlibertyapplication.yaml new file mode 100644 index 0000000..abe712a --- /dev/null +++ b/charts/cargotracker-liberty-aks/templates/openlibertyapplication.yaml @@ -0,0 +1,64 @@ +apiVersion: apps.openliberty.io/v1beta2 +kind: OpenLibertyApplication +metadata: + name: cargo-tracker-cluster + namespace: "{{ .Values.namespace }}" +spec: + replicas: {{ .Values.replicaCount }} + applicationImage: "{{ .Values.loginServer }}/{{ .Values.imageName }}:{{ .Values.imageTag }}" + pullPolicy: Always + service: + type: ClusterIP + port: 9080 + env: + - name: DB_SERVER_NAME + valueFrom: + secretKeyRef: + name: db-secret-sql + key: db.server.name + - name: DB_PORT_NUMBER + valueFrom: + secretKeyRef: + name: db-secret-sql + key: db.port.number + - name: DB_NAME + valueFrom: + secretKeyRef: + name: db-secret-sql + key: db.name + - name: DB_USER + valueFrom: + secretKeyRef: + name: db-secret-sql + key: db.user + - name: DB_PASSWORD + valueFrom: + secretKeyRef: + name: db-secret-sql + key: db.password + - name: APPLICATIONINSIGHTS_CONNECTION_STRING + valueFrom: + secretKeyRef: + name: app-insight-secret + key: connection.string +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: cargo-tracker-ingress + namespace: default + annotations: + appgw.ingress.kubernetes.io/cookie-based-affinity: "true" + appgw.ingress.kubernetes.io/use-private-ip: "false" +spec: + ingressClassName: azure-application-gateway + rules: + - http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: cargo-tracker-cluster + port: + number: 9080 diff --git a/charts/cargotracker-liberty-aks/values.yaml b/charts/cargotracker-liberty-aks/values.yaml new file mode 100644 index 0000000..7c07ffe --- /dev/null +++ b/charts/cargotracker-liberty-aks/values.yaml @@ -0,0 +1,24 @@ +# Default values for cargotracker-liberty-aks. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 3 + +namespace: "default" + +appInsightConnectionString: "" +db: + ServerName: "" + PortNumber: "" + Name: "" + User: "" + Password: "" + +loginServer: {} + +# +nodeSelector: {} + +tolerations: [] + +affinity: {}