Skip to content

Commit

Permalink
Add Helm chart for deploying Cargo Tracker on AKS with Liberty.
Browse files Browse the repository at this point in the history
  • Loading branch information
backwind1233 committed Sep 25, 2024
1 parent 080bc32 commit 9ad445e
Show file tree
Hide file tree
Showing 4 changed files with 135 additions and 0 deletions.
23 changes: 23 additions & 0 deletions charts/cargotracker-liberty-aks/.helmignore
Original file line number Diff line number Diff line change
@@ -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/
24 changes: 24 additions & 0 deletions charts/cargotracker-liberty-aks/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
@@ -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
24 changes: 24 additions & 0 deletions charts/cargotracker-liberty-aks/values.yaml
Original file line number Diff line number Diff line change
@@ -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: {}

0 comments on commit 9ad445e

Please sign in to comment.