UNCLASSIFIED

You need to sign in or sign up before continuing.
Commit 6d6da51c authored by Gerard Fulton's avatar Gerard Fulton
Browse files

Merge branch 'newversion_helmchart_fixes' into 'master'

New product version. New base image. Adding Helm Chart. Adding HEALTHCHECK in...

See merge request !3
parents 92f1b13d 74b7dee6
Pipeline #50840 failed with stages
in 11 seconds
ARG NEXUS_SERVER=nexus.52.61.140.4.nip.io
ARG BASE_REGISTRY=registry.access.redhat.com
ARG BASE_IMAGE=ubi7/ubi
ARG BASE_TAG=7.7
#
# BASE IMAGE
#
ARG BASE_REGISTRY=nexus-docker.52.61.140.4.nip.io
ARG BASE_IMAGE=redhat/ubi/ubi8
ARG BASE_TAG=8.1
FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}
#
# ENVIRONMENT VARIABLES
#
......@@ -15,10 +16,9 @@ ENV JIRA_LB_PUBLIC_HOST=jira-cluster \
#
# BASE PACKAGES
#
RUN yum update -y --disableplugin=subscription-manager && \
yum install -y --disableplugin=subscription-manager httpd python27-python-pip && \
RUN yum install -y --nogpgcheck httpd python2-pip && \
yum clean all && \
scl enable python27 "pip install shinto-cli"
pip2 install shinto-cli
#
# INSTALL
......@@ -58,11 +58,16 @@ COPY config/loadbalancer-virtual-host.conf.jinja2 /work-private
WORKDIR /work
EXPOSE $JIRA_LB_PUBLIC_PORT
#
# HEALTHCHECK
#
HEALTHCHECK --start-period=1m --interval=3m --timeout=3s \
CMD curl -f http://localhost:$JIRA_LB_PUBLIC_PORT/ || exit 1
#
# RUN
#
USER worker
ENV BASH_ENV=/opt/rh/python27/enable
VOLUME ["/work"]
ENTRYPOINT ["/work-private/docker-entrypoint.sh"]
CMD ["httpd", "-DFOREGROUND"]
# jira-cluster-load-balancer helm chart setup
## jira-cluster-load-balancer
**1.** Run helm install
helm install --set nodes=<nodes> jira-cluster jira-cluster-load-balancer
# Notes
Image repository in values.yaml should be replaced with actual repository.
# 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
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
apiVersion: v1
version: 0.1.0
appVersion: 7.13.11
description: A Helm chart for Kubernetes
name: jira-cluster-loadbalancer
keywords:
- loadbalancer
- apache
type: application
maintainers:
- name: Ascend Integrated
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "jira-cluster-loadbalancer.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 "jira-cluster-loadbalancer.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 "jira-cluster-loadbalancer.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Common labels
*/}}
{{- define "jira-cluster-loadbalancer.labels" -}}
helm.sh/chart: {{ include "jira-cluster-loadbalancer.chart" . }}
{{ include "jira-cluster-loadbalancer.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
{{/*
Selector labels
*/}}
{{- define "jira-cluster-loadbalancer.selectorLabels" -}}
app.kubernetes.io/name: {{ include "jira-cluster-loadbalancer.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "jira-cluster-loadbalancer.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "jira-cluster-loadbalancer.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "jira-cluster-loadbalancer.fullname" . }}
labels:
{{- include "jira-cluster-loadbalancer.labels" . | nindent 4 }}
spec:
replicas: 1
selector:
matchLabels:
{{- include "jira-cluster-loadbalancer.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "jira-cluster-loadbalancer.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "jira-cluster-loadbalancer.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 8080
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}
env:
- name: NODES
value: {{ .Values.nodes | quote }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "jira-cluster-loadbalancer.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "jira-cluster-loadbalancer.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ . }}
backend:
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "jira-cluster-loadbalancer.fullname" . }}
labels:
{{- include "jira-cluster-loadbalancer.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
{{- include "jira-cluster-loadbalancer.selectorLabels" . | nindent 4 }}
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "jira-cluster-loadbalancer.serviceAccountName" . }}
labels:
{{ include "jira-cluster-loadbalancer.labels" . | nindent 4 }}
{{- end -}}
image:
repository: dsop/jira-load-balancer
tag: 7.13.11
pullPolicy: IfNotPresent
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
create: true
name:
podSecurityContext: {}
securityContext: {}
service:
type: ClusterIP
port: 8080
ingress:
enabled: false
annotations: {}
hosts:
- host: jira-cluster.local
paths: []
tls: []
resources: {}
nodeSelector: {}
tolerations: []
affinity: {}
#!/bin/bash
set -e
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment