mirror of
https://github.com/submariner-io/submariner-charts.git
synced 2026-09-20 19:10:34 +00:00
initial commit, adding v0.0.1 helm charts
This commit is contained in:
@@ -0,0 +1 @@
|
||||
.git
|
||||
@@ -0,0 +1,11 @@
|
||||
name: submariner-k8s-broker
|
||||
version: 0.0.1
|
||||
appVersion: 0.0.1
|
||||
description: Submariner Kubernetes Broker
|
||||
keywords:
|
||||
home: https://submariner.io/
|
||||
sources:
|
||||
- https://github.com/rancher/submariner-charts
|
||||
maintainers:
|
||||
- name: Chris Kim
|
||||
email: chris.kim@rancher.com
|
||||
@@ -0,0 +1,5 @@
|
||||
# Submariner Kubernetes Broker
|
||||
|
||||
[Submariner](https://submariner.io) is a cross-cluster networking tool.
|
||||
|
||||
This chart creates a service account and role/role binding for use by Submariner to share cluster/endpoint information between clusters.
|
||||
@@ -0,0 +1,19 @@
|
||||
questions:
|
||||
- variable: submariner-k8s-broker.rbac.create
|
||||
type: boolean
|
||||
default: true
|
||||
group: "Role Based Access Control"
|
||||
description: "Create the role/rolebinding for the Submariner client"
|
||||
label: "RBAC Creation Enabled"
|
||||
- variable: submariner-k8s-broker.crd.create
|
||||
type: boolean
|
||||
default: true
|
||||
group: "Submariner CRD"
|
||||
description: "Create the submariner CRDs for the Submariner client"
|
||||
label: "Submariner CRD Creation Enabled"
|
||||
- variable: submariner-k8s-broker.serviceAccounts.client.create
|
||||
type: boolean
|
||||
default: true
|
||||
group: "Service Account"
|
||||
description: "Create the service account for the Submariner client"
|
||||
label: "Submariner Service Account Creation Enabled"
|
||||
@@ -0,0 +1,9 @@
|
||||
The Submariner Kubernetes Broker is now setup.
|
||||
|
||||
You can retrieve the server URL by running
|
||||
|
||||
$ SUBMARINER_BROKER_URL=$(kubectl -n default get endpoints kubernetes -o jsonpath="{.subsets[0].addresses[0].ip}:{.subsets[0].ports[0].port}")
|
||||
|
||||
The broker client token can be retrieved by running
|
||||
|
||||
$ SUBMARINER_BROKER_TOKEN=$(kubectl -n {{ .Release.Namespace }} get secrets -o jsonpath="{.items[?(@.metadata.annotations['kubernetes\.io/service-account\.name']=='{{ template "submariner-k8s-broker.clientServiceAccountName" . }}')].data.token}"|base64 --decode)
|
||||
@@ -0,0 +1,43 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "submariner-k8s-broker.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 "submariner-k8s-broker.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 "submariner-k8s-broker.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the submariner-client service account to use
|
||||
*/}}
|
||||
{{- define "submariner-k8s-broker.clientServiceAccountName" -}}
|
||||
{{- if .Values.serviceAccounts.client.create -}}
|
||||
{{ default (printf "%s-client" (include "submariner-k8s-broker.fullname" .)) .Values.serviceAccounts.client.name }}
|
||||
{{- else -}}
|
||||
{{ default "default" .Values.serviceAccounts.client.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,29 @@
|
||||
{{- if .Values.crd.create -}}
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: clusters.submariner.io
|
||||
annotations:
|
||||
"helm.sh/hook": crd-install
|
||||
spec:
|
||||
group: submariner.io
|
||||
version: v1
|
||||
names:
|
||||
kind: Cluster
|
||||
plural: clusters
|
||||
scope: Namespaced
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: endpoints.submariner.io
|
||||
annotations:
|
||||
"helm.sh/hook": crd-install
|
||||
spec:
|
||||
group: submariner.io
|
||||
version: v1
|
||||
names:
|
||||
kind: Endpoint
|
||||
plural: endpoints
|
||||
scope: Namespaced
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,28 @@
|
||||
{{- if .Values.rbac.create -}}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ template "submariner-k8s-broker.fullname" . }}:client
|
||||
labels:
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
chart: {{ template "submariner-k8s-broker.chart" . }}
|
||||
app: {{ template "submariner-k8s-broker.name" . }}
|
||||
rules:
|
||||
- apiGroups: ["submariner.io"]
|
||||
resources: ["clusters", "endpoints"]
|
||||
verbs: ["create", "get", "list", "watch", "patch", "update", "delete"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: {{ template "submariner-k8s-broker.fullname" . }}:client
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ template "submariner-k8s-broker.fullname" . }}:client
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "submariner-k8s-broker.clientServiceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,11 @@
|
||||
{{- if .Values.serviceAccounts.client.create }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ template "submariner-k8s-broker.clientServiceAccountName" . }}
|
||||
labels:
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
chart: {{ template "submariner-k8s-broker.chart" . }}
|
||||
app: {{ template "submariner-k8s-broker.name" . }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,8 @@
|
||||
rbac:
|
||||
create: true
|
||||
crd:
|
||||
create: true
|
||||
serviceAccounts:
|
||||
client:
|
||||
create: true
|
||||
name: ""
|
||||
Reference in New Issue
Block a user