Skip to content
Snippets Groups Projects
Commit 5ed45e96 authored by Tucker Gary Siegel's avatar Tucker Gary Siegel
Browse files

add chart

parent dd63d942
No related branches found
No related tags found
No related merge requests found
0.1.0
\ No newline at end of file
# 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/
apiVersion: v2
name: dawn-gdd
description: A Helm chart for Kubernetes
# 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: 0.1.0
# 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: "0.1.0"
{{/*
Expand the name of the chart.
*/}}
{{- define "dawn-gateway.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "dawn-gateway.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "dawn-gateway.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "dawn-gateway.labels" -}}
helm.sh/chart: {{ include "dawn-gateway.chart" . }}
{{ include "dawn-gateway.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "dawn-gateway.selectorLabels" -}}
app.kubernetes.io/name: {{ include "dawn-gateway.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "dawn-gateway.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "dawn-gateway.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
apiVersion: v1
kind: ConfigMap
metadata:
name: dawn-gdd-conf
namespace: {{ .Release.Namespace }}
data:
conf: |
app:
name: {{ .Values.conf.app.name }}
logLevel: {{ .Values.conf.app.logLevel }}
logType: {{ .Values.conf.app.logType }}
swagger: {{ .Values.conf.app.swagger }}
auth: {{ .Values.conf.app.auth }}
swagger-host-url: {{ .Values.conf.app.swaggerHostUrl }}
api-version: {{ .Values.conf.app.apiVersion }}
server:
host: {{ .Values.conf.server.host }}
port: {{ .Values.conf.server.port }}
context-path: {{ .Values.conf.server.contextPath }}
db:
uri: {{ .Values.conf.db.uri }}
database: {{ .Values.conf.db.database }}
\ No newline at end of file
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
kind: Deployment
metadata:
name: dawn-gdd
namespace: {{ .Release.Namespace }}
labels:
version: {{ .Chart.AppVersion }}
spec:
selector:
matchLabels:
service: dawn-gdd
env: {{ .Release.Namespace }}
replicas: 1
template:
metadata:
labels:
service: dawn-gdd
env: {{ .Release.Namespace }}
version: {{ .Chart.AppVersion }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configMap.yaml") . | sha256sum }}
spec:
containers:
- name: dawn-gdd
image: docker.registry.dawn.int:5000/dawn/dawn-gdd:{{.Chart.AppVersion}}
resources:
requests:
cpu: {{.Values.resources.requests.cpu}}
memory: {{.Values.resources.requests.memory}}
volumeMounts:
- name: conf
mountPath: "/root/config/conf"
subPath: conf
readOnly: true
args:
- --config
- conf
ports:
- containerPort: {{.Values.port}}
volumes:
- name: conf
configMap:
name: dawn-gdd-conf
apiVersion: v1
kind: Service
metadata:
name: dawn-gdd
namespace: {{ .Release.Namespace }}
labels:
service: dawn-gdd
env: {{ .Release.Namespace }}
spec:
type: ClusterIP
ports:
- port: 80
targetPort: {{.Values.port}}
selector:
service: dawn-gdd
env: {{ .Release.Namespace }}
\ No newline at end of file
port: 5000
resources:
requests:
cpu: 100m
memory: 100Mi
# default for staging
conf:
app:
name: gdd-service
logType: json
logLevel: DEBUG
swagger: true
auth: false
swaggerHostUrl: "localhost:5000"
apiVersion: 1
server:
host: "localhost"
port: 5000
contextPath: "/api/weather"
db:
uri: "mongodb://deployment-internal-mongo.deployment-internal.svc.cluster.local:27017/"
database: "weather-service"
kind: product
name: dawn-gdd
---
kind: release
product-name: dawn-gdd
product-version: 0.1.0
release-channel: DEV
helm-chart: dawn/dawn-gdd
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment