This repository has been archived by the owner on Feb 11, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from Financial-Times/annotations-proxy
Helm Deploy
- Loading branch information
Showing
13 changed files
with
200 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
|
||
/vendor/* | ||
!/vendor/vendor.json | ||
*.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@Library('k8s-pipeline-lib') _ | ||
|
||
pacEntryPointForJenkinsfile() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: v1 | ||
description: draft-annotations-api Helm chart for Kubernetes | ||
name: draft-annotations-api | ||
version: 0.0.0 # this entry can be left untouched as it is automatically handled by Jenkins pipeline |
4 changes: 4 additions & 0 deletions
4
helm/draft-annotations-api/app-configs/draft-annotations-api_pac.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Values used for the deployed application. | ||
replicaCount: 2 | ||
service: | ||
name: draft-annotations-api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 24 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 24 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
*/}} | ||
{{- define "fullname" -}} | ||
{{- $name := default .Chart.Name .Values.nameOverride -}} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 24 | trimSuffix "-" -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: extensions/v1beta1 | ||
kind: Ingress | ||
metadata: | ||
name: {{.Values.service.name}}-admin-ingress | ||
annotations: | ||
# type of authentication | ||
ingress.kubernetes.io/auth-type: basic | ||
# name of the secret that contains the user/password definitions | ||
ingress.kubernetes.io/auth-secret: basic-auth | ||
# message to display with an appropiate context why the authentication is required | ||
ingress.kubernetes.io/auth-realm: "Authentication Required" | ||
ingress.kubernetes.io/rewrite-target: / | ||
|
||
spec: | ||
rules: | ||
- host: {{.Values.ingress.host}} | ||
http: | ||
paths: | ||
- path: /__{{.Values.service.name}}/ | ||
backend: | ||
serviceName: {{.Values.service.name}} | ||
servicePort: 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
##this is an example deployment.yaml that should be customized in order to meet the configuration for app k8s deployment | ||
|
||
apiVersion: extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ .Values.service.name }} | ||
labels: | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
visualize: "true" | ||
app: {{ .Values.service.name }} | ||
spec: | ||
replicas: {{ .Values.replicaCount }} | ||
selector: | ||
matchLabels: | ||
app: {{ .Values.service.name }} | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ .Values.service.name }} | ||
visualize: "true" | ||
spec: | ||
containers: | ||
- name: {{ .Values.service.name }} | ||
image: "{{ .Values.image.repository }}:{{ .Chart.Version }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
env: | ||
- name: ANNOTATIONS_ENDPOINT | ||
valueFrom: | ||
configMapKeyRef: | ||
name: global-config | ||
key: annotations-endpoint | ||
- name: UPP_APIKEY | ||
valueFrom: | ||
configMapKeyRef: | ||
name: global-config | ||
key: upp-api-key | ||
ports: | ||
- containerPort: 8080 | ||
livenessProbe: | ||
tcpSocket: | ||
port: 8080 | ||
initialDelaySeconds: 10 | ||
readinessProbe: | ||
httpGet: | ||
path: "/__gtg" | ||
port: 8080 | ||
initialDelaySeconds: 15 | ||
periodSeconds: 30 | ||
resources: | ||
{{ toYaml .Values.resources | indent 12 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: extensions/v1beta1 | ||
kind: Ingress | ||
metadata: | ||
name: {{.Values.service.name}}-ingress | ||
annotations: | ||
# type of authentication | ||
ingress.kubernetes.io/auth-type: basic | ||
# name of the secret that contains the user/password definitions | ||
ingress.kubernetes.io/auth-secret: basic-auth | ||
# message to display with an appropiate context why the authentication is required | ||
ingress.kubernetes.io/auth-realm: "Authentication Required" | ||
# to interpret the wildcard in path as a regex | ||
ingress.kubernetes.io/rewrite-target: /drafts/content/ | ||
spec: | ||
rules: | ||
- host: {{.Values.ingress.host}} | ||
http: | ||
paths: | ||
- path: /drafts/content/.*/annotations | ||
backend: | ||
serviceName: {{.Values.service.name}} | ||
servicePort: 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
kind: Service | ||
apiVersion: v1 | ||
metadata: | ||
name: {{.Values.service.name}} | ||
labels: | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
app: {{.Values.service.name}} | ||
visualize: "true" | ||
hasHealthcheck: "{{ .Values.service.hasHealthcheck }}" | ||
spec: | ||
ports: | ||
- port: 8080 | ||
# name: # The name of this port within the service. Optional if only one port is defined on this service | ||
targetPort: 8080 | ||
selector: | ||
app: {{ .Values.service.name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Default values for draft-annotations-api. | ||
# This is a YAML-formatted file. | ||
# Declare variables to be passed into your templates. | ||
service: | ||
name: "" # The name of the service, should be defined in the specific app-configs folder | ||
hasHealthcheck: "true" | ||
replicaCount: 2 | ||
image: | ||
repository: coco/draft-annotations-api | ||
pullPolicy: Always | ||
ingress: | ||
host: "pre-prod-eu-pac.ft.com" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters