This repository has been archived by the owner on May 2, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Tamas Molnar
committed
Jul 13, 2017
1 parent
d51b977
commit 94aaf14
Showing
11 changed files
with
206 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
*.html | ||
*coverage.* | ||
*.iml | ||
v1-brands-transformer | ||
/v1-brands-transformer | ||
.idea/ | ||
*.db | ||
*.lock | ||
|
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,7 @@ | ||
@Library('k8s-pipeline-lib') _ | ||
|
||
import com.ft.jenkins.BuildConfig | ||
import com.ft.jenkins.Cluster | ||
|
||
BuildConfig config = new BuildConfig() | ||
entryPointForReleaseAndDev(config) |
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: v1-brands-transformer Helm chart for Kubernetes | ||
name: v1-brands-transformer | ||
version: 0.0.0 # this entry can be left untouched as it is automatically handled by Jenkins pipeline |
14 changes: 14 additions & 0 deletions
14
helm/v1-brands-transformer/app-configs/v1-brands-transformer_publishing.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,14 @@ | ||
# Values used for the deployed application. | ||
replicaCount: 1 | ||
service: | ||
name: v1-brands-transformer | ||
cache: | ||
size: 5Gi | ||
nfsServer: fs-6330fcaa.efs.eu-west-1.amazonaws.com | ||
path: "/" | ||
env: | ||
PORT: 8080 | ||
BASE_URL: "http://v1-brands-transformer:8080/transformers/brands/" | ||
CACHE_FILE_NAME: "/cache/v1-brands-transformer.db" | ||
BERTHA_SOURCE_URL: "http://bertha.ig.ft.com/republish/publish/gss/1wEdVRLtayZ6-XBfYM3vKAGaOV64cNJD3L8MlLM8-uFY/TestBrands" | ||
LOG_METRICS: false |
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,82 @@ | ||
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: TME_BASE_URL | ||
valueFrom: | ||
configMapKeyRef: | ||
name: global-config | ||
key: tme.url | ||
- name: TME_USERNAME | ||
valueFrom: | ||
secretKeyRef: | ||
name: global-secrets | ||
key: tme.username | ||
- name: TME_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: global-secrets | ||
key: tme.password | ||
- name: TOKEN | ||
valueFrom: | ||
secretKeyRef: | ||
name: global-secrets | ||
key: tme.token | ||
- name: GRAPHITE_ADDRESS | ||
valueFrom: | ||
configMapKeyRef: | ||
name: global-config | ||
key: graphite.address | ||
- name: PORT | ||
value: "{{ .Values.env.PORT }}" | ||
- name: BASE_URL | ||
value: {{ .Values.env.BASE_URL }} | ||
- name: CACHE_FILE_NAME | ||
value: {{ .Values.env.CACHE_FILE_NAME }} | ||
- name: BERTHA_SOURCE_URL | ||
value: {{ .Values.env.BERTHA_SOURCE_URL }} | ||
- name: GRAPHITE_PREFIX | ||
value: "coco.services.k8s.{{ .Values.service.name }}" | ||
- name: LOG_METRICS | ||
value: "{{ .Values.env.LOG_METRICS }}" | ||
volumeMounts: | ||
- name: "{{ .Values.service.name }}-cache" | ||
mountPath: /cache | ||
ports: | ||
- containerPort: 8080 | ||
livenessProbe: | ||
tcpSocket: | ||
port: 8080 | ||
initialDelaySeconds: 5 | ||
readinessProbe: | ||
httpGet: | ||
path: "/__gtg" | ||
port: 8080 | ||
initialDelaySeconds: 5 | ||
periodSeconds: 30 | ||
resources: | ||
{{ toYaml .Values.resources | indent 12 }} | ||
volumes: | ||
- name: "{{ .Values.service.name }}-cache" | ||
persistentVolumeClaim: | ||
claimName: "{{ .Values.service.name }}-cache-pvc" |
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,12 @@ | ||
kind: PersistentVolume | ||
apiVersion: v1 | ||
metadata: | ||
name: "{{ .Values.service.name }}-cache-pv" | ||
spec: | ||
capacity: | ||
storage: {{ .Values.cache.size }} | ||
accessModes: | ||
- ReadWriteMany | ||
nfs: | ||
server: {{ .Values.cache.nfsServer }} | ||
path: {{ .Values.cache.path }} |
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,10 @@ | ||
kind: PersistentVolumeClaim | ||
apiVersion: v1 | ||
metadata: | ||
name: {{ .Values.service.name }}-cache-pvc | ||
spec: | ||
accessModes: | ||
- ReadWriteMany | ||
resources: | ||
requests: | ||
storage: {{ .Values.cache.size }} |
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 @@ | ||
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,23 @@ | ||
# Default values for v1-brands-transformer. | ||
# 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: 1 | ||
image: | ||
repository: coco/v1-brands-transformer | ||
pullPolicy: IfNotPresent | ||
resources: | ||
limits: | ||
memory: 1536Mi | ||
cache: | ||
size: 5Gi | ||
nfsServer: "" | ||
path: "" | ||
env: | ||
PORT: 8080 | ||
BASE_URL: "" | ||
CACHE_FILE_NAME: "" | ||
BERTHA_SOURCE_URL: "" | ||
LOG_METRICS: false |