Skip to content

Commit 8d65644

Browse files
New GCP Service Broker
1 parent 27a1f90 commit 8d65644

File tree

81 files changed

+2880
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+2880
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
## Overview
2+
3+
The GCP Service Broker bundle installs the [Google Cloud Platform Service Broker](https://cloud.google.com/kubernetes-engine/docs/concepts/google-cloud-platform-service-broker) in a given Namespace.
4+
5+
## Details
6+
7+
The GCP Service Broker bundle contains one `default` plan. Binding is disabled for the ServiceInstance created by this plan.
8+
9+
For more details about this bundle, see the [Overview](https://github.com/kyma-project/bundles/blob/master/bundles/gcp-service-broker-0.0.2/docs/broker/overview.md) document.
10+
For more information about the provisioning and deprovisioning flow, see the ServiceClass [plans details](https://github.com/kyma-project/bundles/blob/master/bundles/gcp-service-broker-0.0.2/docs/broker/plans-details.md) documentation.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
gcp-service-broker-*.tgz
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*~
18+
# Various IDEs
19+
.project
20+
.idea/
21+
*.tmproj
22+
.vscode/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright 2019 the Service Broker Project Authors. All rights reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
---
15+
apiVersion: v1
16+
version: 0.1.0
17+
description: A Helm chart for the Google Cloud Platform (GCP) Service Broker
18+
name: gcp-service-broker
19+
icon: https://cloud.google.com/_static/images/cloud/products/logos/svg/gcp.svg
20+
keywords:
21+
- gcp
22+
- google cloud
23+
- services
24+
- service broker
25+
home: https://github.com/GoogleCloudPlatform/gcp-service-broker
26+
sources:
27+
- https://github.com/GoogleCloudPlatform/gcp-service-broker
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dependencies:
2+
- name: mysql
3+
repository: https://kubernetes-charts.storage.googleapis.com/
4+
version: 0.15.0
5+
digest: sha256:d3a612d1a30d2a8d9de3512dfafeea91bbc2a0cbc7d5100ebaa86cc629d98f09
6+
generated: 2019-03-05T13:02:47.045729841-08:00
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2019 the Service Broker Project Authors. All rights reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
---
15+
dependencies:
16+
- name: mysql
17+
version: "0.15.0"
18+
condition: mysql.embedded
19+
repository: https://kubernetes-charts.storage.googleapis.com/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{{/* vim: set filetype=mustache: */}}
2+
{{/*
3+
Expand the name of the chart.
4+
*/}}
5+
{{- define "gcp-service-broker.name" -}}
6+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
7+
{{- end -}}
8+
9+
{{/*
10+
Create a default fully qualified app name.
11+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12+
If release name contains chart name it will be used as a full name.
13+
*/}}
14+
{{- define "gcp-service-broker.fullname" -}}
15+
{{- if .Values.fullnameOverride -}}
16+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
17+
{{- else -}}
18+
{{- $name := default .Chart.Name .Values.nameOverride -}}
19+
{{- if contains $name .Release.Name -}}
20+
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
21+
{{- else -}}
22+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
23+
{{- end -}}
24+
{{- end -}}
25+
{{- end -}}
26+
27+
{{/*
28+
Create chart name and version as used by the chart label.
29+
*/}}
30+
{{- define "gcp-service-broker.chart" -}}
31+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
32+
{{- end -}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# Copyright 2019 the Service Broker Project Authors. All rights reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
---
15+
apiVersion: apps/v1
16+
kind: Deployment
17+
metadata:
18+
name: {{ include "gcp-service-broker.fullname" . }}
19+
labels:
20+
app: {{ template "gcp-service-broker.fullname" . }}
21+
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
22+
release: "{{ .Release.Name }}"
23+
heritage: "{{ .Release.Service }}"
24+
spec:
25+
replicas: {{ .Values.replicaCount }}
26+
selector:
27+
matchLabels:
28+
app: {{ template "gcp-service-broker.fullname" . }}
29+
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
30+
release: "{{ .Release.Name }}"
31+
heritage: "{{ .Release.Service }}"
32+
template:
33+
metadata:
34+
labels:
35+
app: {{ template "gcp-service-broker.fullname" . }}
36+
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
37+
release: "{{ .Release.Name }}"
38+
heritage: "{{ .Release.Service }}"
39+
spec:
40+
containers:
41+
- name: {{ .Chart.Name }}
42+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
43+
imagePullPolicy: {{ .Values.image.pullPolicy }}
44+
args: ["serve"]
45+
env:
46+
- name: "PORT"
47+
value: "8080"
48+
- name: "GSB_COMPATIBILITY_ENABLE_CATALOG_SCHEMAS"
49+
value: "true"
50+
- name: "ROOT_SERVICE_ACCOUNT_JSON"
51+
valueFrom:
52+
secretKeyRef:
53+
name: {{ .Values.secretName }}
54+
key: sa-key
55+
- name: "SECURITY_USER_NAME"
56+
valueFrom:
57+
secretKeyRef:
58+
name: {{ template "gcp-service-broker.fullname" . }}-auth
59+
key: username
60+
- name: "SECURITY_USER_PASSWORD"
61+
valueFrom:
62+
secretKeyRef:
63+
name: {{ template "gcp-service-broker.fullname" . }}-auth
64+
key: password
65+
- name: "DB_HOST"
66+
{{- if .Values.mysql.embedded }}
67+
value: {{ .Release.Name }}-mysql
68+
{{- else }}
69+
value: {{ required "A value is required for mysql.host" .Values.mysql.host }}
70+
{{- end }}
71+
- name: "DB_USERNAME"
72+
valueFrom:
73+
secretKeyRef:
74+
name: {{ template "gcp-service-broker.fullname" . }}-creds
75+
key: db_username
76+
- name: "DB_PASSWORD"
77+
valueFrom:
78+
secretKeyRef:
79+
name: {{ template "gcp-service-broker.fullname" . }}-creds
80+
key: db_password
81+
- name: "DB_PORT"
82+
value: {{ .Values.mysql.port | quote }}
83+
- name: "DB_NAME"
84+
value: {{ required "A value is required for mysql.mysqlDatabase" .Values.mysql.mysqlDatabase | quote }}
85+
- name: "CA_CERT"
86+
valueFrom:
87+
secretKeyRef:
88+
name: {{ template "gcp-service-broker.fullname" . }}-creds
89+
key: db_ca_cert
90+
- name: "CLIENT_CERT"
91+
valueFrom:
92+
secretKeyRef:
93+
name: {{ template "gcp-service-broker.fullname" . }}-creds
94+
key: db_client_cert
95+
- name: "CLIENT_KEY"
96+
valueFrom:
97+
secretKeyRef:
98+
name: {{ template "gcp-service-broker.fullname" . }}-creds
99+
key: db_client_key
100+
{{- range $k, $v := .Values.broker.env }}
101+
- name: {{ $k | quote }}
102+
value: {{ $v | quote}}
103+
{{- end }}
104+
ports:
105+
- name: http
106+
containerPort: 8080
107+
protocol: TCP
108+
livenessProbe:
109+
failureThreshold: 3
110+
initialDelaySeconds: 30
111+
periodSeconds: 10
112+
successThreshold: 1
113+
timeoutSeconds: 2
114+
httpGet:
115+
path: /live
116+
port: http
117+
readinessProbe:
118+
failureThreshold: 3
119+
initialDelaySeconds: 30
120+
periodSeconds: 10
121+
successThreshold: 1
122+
timeoutSeconds: 2
123+
httpGet:
124+
path: /ready
125+
port: http
126+
resources:
127+
{{- toYaml .Values.resources | nindent 12 }}
128+
{{- with .Values.nodeSelector }}
129+
nodeSelector:
130+
{{- toYaml . | nindent 8 }}
131+
{{- end }}
132+
{{- with .Values.affinity }}
133+
affinity:
134+
{{- toYaml . | nindent 8 }}
135+
{{- end }}
136+
{{- with .Values.tolerations }}
137+
tolerations:
138+
{{- toYaml . | nindent 8 }}
139+
{{- end }}

0 commit comments

Comments
 (0)