Skip to content
This repository has been archived by the owner on Sep 15, 2022. It is now read-only.

Commit

Permalink
Bump gcp broker (#120)
Browse files Browse the repository at this point in the history
* Bump gcp broker image

* Add docu checker job to the GCP broker

* Move the  GCP Service Broker to the main index.yaml file
  • Loading branch information
piotrmiskiewicz committed Sep 26, 2019
1 parent dd77a77 commit 2701259
Show file tree
Hide file tree
Showing 42 changed files with 150 additions and 64 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: {{ include "fullname" . | trunc 60 }}-dc
labels:
app: {{ template "fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
subjects:
- kind: ServiceAccount
name: {{ include "fullname" . | trunc 60 }}-dc
namespace: {{ .Release.Namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "fullname" . | trunc 60 }}-dc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
kind: Role
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: {{ include "fullname" . | trunc 60 }}-dc
labels:
app: {{ template "fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
rules:
- apiGroups: ["cms.kyma-project.io"]
resources: ["docstopics"]
verbs: ["list"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "fullname" . | trunc 60 }}-dc
labels:
app: {{ template "fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
kind: Role
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: {{ include "fullname" . | trunc 60 }}-dc
labels:
app: {{ template "fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
rules:
- apiGroups: ["cms.kyma-project.io"]
resources: ["docstopics"]
verbs: ["list"]

---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: {{ template "fullname" . }}
labels:
Expand All @@ -41,17 +26,6 @@ metadata:
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"

---
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "fullname" . | trunc 60 }}-dc
labels:
app: {{ template "fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"

---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
Expand All @@ -70,22 +44,3 @@ roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ template "fullname" . }}

---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: {{ include "fullname" . | trunc 60 }}-dc
labels:
app: {{ template "fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
subjects:
- kind: ServiceAccount
name: {{ include "fullname" . | trunc 60 }}-dc
namespace: {{ .Release.Namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "fullname" . | trunc 60 }}-dc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Overview

The GCP Service Broker addon installs the [Google Cloud Platform Service Broker](https://cloud.google.com/kubernetes-engine/docs/concepts/google-cloud-platform-service-broker) in a given Namespace.
The GCP Service Broker addon installs the [Open Service Broker for Google Cloud Platform](https://github.com/GoogleCloudPlatform/gcp-service-broker) in a given Namespace.

## Details

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
apiVersion: batch/v1
kind: Job
metadata:
name: gcp-broker-docu-checker
labels:
app: {{ template "gcp-service-broker.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
annotations:
"helm.sh/hook": post-install,post-upgrade
"helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation
spec:
template:
metadata:
annotations:
sidecar.istio.io/inject: "false"
spec:
serviceAccountName: {{ include "gcp-service-broker.fullname" . | trunc 60 }}-dc
restartPolicy: Never
containers:
- name: docu-checker
image: eu.gcr.io/kyma-project/test-infra/alpine-kubectl:v20190325-ff66a3a
imagePullPolicy: IfNotPresent
command: ["/bin/sh","-c"]
args:
- |
while true
do
echo "Get list of not ready DocsTopic:"
lines=$(kubectl get DocsTopic -l chart=${LABEL_CHART},release=${LABEL_RELEASE} -n ${NS} \
--no-headers -o custom-columns=name:.metadata.name,phase:.status.phase | awk '$2!="Ready"' | wc -l)
echo "Got ${lines} not ready Docs Topic"
if [[ "${lines}" -eq "0" ]];
then
echo "Every DocsTopic is processed. Completed."
exit 0
fi
sleep 3
echo "----"
done
env:
- name: LABEL_CHART
value: {{ .Chart.Name }}-{{ .Chart.Version }}
- name: LABEL_RELEASE
value: {{ .Release.Name }}
- name: NS
valueFrom:
fieldRef:
fieldPath: metadata.namespace
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: {{ include "gcp-service-broker.fullname" . | trunc 60 }}-dc
labels:
app: {{ template "gcp-service-broker.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
subjects:
- kind: ServiceAccount
name: {{ include "gcp-service-broker.fullname" . | trunc 60 }}-dc
namespace: {{ .Release.Namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "gcp-service-broker.fullname" . | trunc 60 }}-dc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
kind: Role
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: {{ include "gcp-service-broker.fullname" . | trunc 60 }}-dc
labels:
app: {{ template "gcp-service-broker.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
rules:
- apiGroups: ["cms.kyma-project.io"]
resources: ["docstopics"]
verbs: ["list"]
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "gcp-service-broker.fullname" . | trunc 60 }}-dc
labels:
app: {{ template "gcp-service-broker.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ replicaCount: 1


# Both the image and doc base path are gathered from
# this commit: https://github.com/GoogleCloudPlatform/gcp-service-broker/commit/754f612578a163362821553d2b2122ba9d122c43
brokerDocBasePath: https://raw.githubusercontent.com/GoogleCloudPlatform/gcp-service-broker/754f612578a163362821553d2b2122ba9d122c43/docs/classes
# this commit: https://github.com/GoogleCloudPlatform/gcp-service-broker/commit/388e47b154b884fd0f77cca0b144584a9d25cf76
brokerDocBasePath: https://raw.githubusercontent.com/GoogleCloudPlatform/gcp-service-broker/388e47b154b884fd0f77cca0b144584a9d25cf76/docs/classes
image:
repository: gcr.io/gcp-service-broker/gcp-service-broker@sha256
tag: 2162aaa06bb7b1fdfb17d6f7f8148e1b66f08f588f8476223852b93ae38ce1db
tag: 76ab8f091a314b657036d353dffa4f5e7de491e355a307149ece325a81f0d96c
pullPolicy: IfNotPresent

# Settings for integrating the broker with the Kubernetes Service Catalog.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ type: Overview

>**NOTE:** To provision this class, first you must create a Secret. Read the following document to learn how.
The Google Cloud Platform Service Broker class exposes services from the [Google Cloud Platform Service Broker](https://cloud.google.com/kubernetes-engine/docs/concepts/google-cloud-platform-service-broker)
The GCP Service Broker class exposes services from the [Open Service Broker for Google Cloud Platform](https://github.com/GoogleCloudPlatform/gcp-service-broker)
in a given Namespace of the Kyma cluster.

The MySQL database is used to keep the broker's state. You can configure an external database. Uninstalling the broker deletes all information about created instances. It does not delete the services you created.

## Create a Secret

To add the Google Cloud Platform Service Broker to your Namespace, prepare a service account and a JSON access key.
To add the GCP Service Broker to your Namespace, prepare a service account and a JSON access key.

Follow these steps to create a Kubernetes Secret which contains a JSON access key:

Expand All @@ -34,4 +34,4 @@ Follow these steps to create a Kubernetes Secret which contains a JSON access ke

8. Click **Done**.

>**NOTE:** You can provision only one instance of the Google Cloud Platform Service Broker in each Namespace.
>**NOTE:** You can provision only one instance of the GCP Service Broker in each Namespace.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
docs:
- template:
displayName: "Documentation for Google Cloud Platform Service Broker"
displayName: "Documentation for GCP Service Broker"
description: "Overall documentation"
sources:
- type: markdown
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: google-cloud-platform-service-broker
name: gcp-service-broker
version: 0.1.0
id: cbc4ce74-b402-4ff6-b230-2a079cf1706d
description: "Enables the preview integration of Google Cloud Platform services. It is not recommended for production scenarios."
displayName: "[Preview] Google Cloud Platform Service Broker"
description: "Enables the integration of Google Cloud Platform services."
displayName: "GCP Service Broker"

tags: gcp, google, broker
providerDisplayName: "Google Cloud Platform"
longDescription: "[Preview] Open Service Broker for Google Cloud Platform"
longDescription: "Open Service Broker for Google Cloud Platform"
documentationURL: https://github.com/GoogleCloudPlatform/gcp-service-broker
imageURL: https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/apple-icon.png
bindable: false
Expand Down
6 changes: 0 additions & 6 deletions addons/index-gcp.yaml

This file was deleted.

6 changes: 5 additions & 1 deletion addons/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@ entries:
aws-service-broker:
- name: aws-service-broker
description: "AWS Service Broker"
version: 0.0.1
version: 0.0.1
gcp-service-broker:
- name: gcp-service-broker
description: "GCP Service Broker"
version: 0.1.0

0 comments on commit 2701259

Please sign in to comment.