Compare commits

...
Author SHA1 Message Date
Vishal Thapar b0afebf806 Install gateway CRD on broker
If crd.create is set to false when installing submariner on same cluster
as broker, gateways CRD never gets installed because it is missing from
broker charts. This change is to install the CRD even on broker, as a
cleaner alternative to adding more flags.

Signed-off-by: Vishal Thapar <5137689+vthapar@users.noreply.github.com>
2020-07-21 15:47:26 +05:30
Vishal ThaparandThomas Pantelis 1954770672 Allow lighthouse access to gateways.submariner.io
Adds following permissions to lighthouse clusterrole
for `gateways.submariner.io`
 - get
 - list
 - watch

This allows lighthouse to track changes to gateway status and know which
clusters are connected.

Signed-off-by: Vishal Thapar <5137689+vthapar@users.noreply.github.com>
2020-07-20 11:16:04 -04:00
Sridhar GaddamandGitHub 7cc50b03d3 Reset terminationGracePeriodSeconds for SM Pods (#50)
In one of the earlier PRs, we modified the terminationGracePeriodSeconds
to 10 secs. However, its seen that this is causing more CI failures
during e2e redundancy tests. Ideally, once the Pods are terminated,
it should cleanup itself ASAP but it is seen that SM Pods are sometimes
taking time to exit and during this Period since there is no active SM
Pod running, this is triggering some failures.

Until we figure out the exact reason why the Pods are taking time for
cleanup, this PR reduces the terminationGracePeriodSeconds.

This issue would be properly addressed via
https://github.com/submariner-io/submariner/issues/694

Signed-Off-by: Sridhar Gaddam <sgaddam@redhat.com>
2020-07-10 14:57:14 -04:00
Vishal ThaparandGitHub fb65f1ffbe Add ServiceImport CRD (#51)
Signed-off-by: Vishal Thapar <5137689+vthapar@users.noreply.github.com>
2020-07-09 10:54:28 -04:00
Sridhar GaddamandGitHub c9f1f79338 Fix updateStrategy in Submariner DaemonSet Pods (#49)
Fixes issue: https://github.com/submariner-io/submariner-charts/issues/48

Signed-Off-by: Sridhar Gaddam <sgaddam@redhat.com>
2020-06-24 10:47:08 -04:00
Miguel Angel Ajo PelayoandGitHub 3b44f11749 Update versioning and image repositories (#44)
* Update versioning and image repositories

Update helm charts to follow the submariner versioning,
and include the image repositories by default.

Signed-off-by: Miguel Angel Ajo <majopela@redhat.com>

* Update final version

Signed-off-by: Miguel Angel Ajo Pelayo <majopela@redhat.com>
2020-06-24 10:11:21 -04:00
Vishal ThaparandGitHub d2b0d98ea2 Add globalnet flag for lighthouse (#43)
To optimize Lighthouse for Globalnet, Lighthouse needs to know if
globalnet was enabled.

Signed-off-by: Vishal Thapar <5137689+vthapar@users.noreply.github.com>
2020-06-23 10:00:29 -04:00
Miguel Angel Ajo PelayoandGitHub eadf5be408 Update contact details for charts (#46)
Signed-off-by: Miguel Angel Ajo <majopela@redhat.com>
2020-06-23 07:57:59 -04:00
Miguel Angel Ajo PelayoandGitHub 86ee45297b Update default gateway leadership timing (#45)
Those values where changed on the engine.

Signed-off-by: Miguel Angel Ajo <majopela@redhat.com>
2020-06-23 07:57:17 -04:00
Daniel FarrellandMiguel Angel Ajo Pelayo 90929ce969 Add DCO signed-off-by GHA validation
Add GitHub Action validating presence of signed-off-by line to accept
the Developer Certificate of Origin, as required for CNCF.

Relates-to: submariner-io/submariner#666
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
2020-06-23 09:39:51 +02:00
Vishal ThaparandGitHub e43e321a0d Use correct name for lighthouse-coredns (#41) 2020-06-09 16:40:18 -04:00
Vishal ThaparandMiguel Angel Ajo Pelayo b217b75f96 Add lighthouse-coredns charts
1. Adds deployment amd configmap
2. Updates RBAC
2020-06-09 13:27:07 +02:00
Sridhar GaddamandMiguel Angel Ajo Pelayo c905d9fdca Fix terminationGracePeriodSeconds in Submariner Pods
In K8s the default termination grace period for a Pod is 30
secs. However, for Submariner Pods, we were configuring this as
0 secs, because of which, cleanup was not happening in a
consistent manner and we are seeing failures in CI jobs.

This PR modifies the terminationGracePeriodSeconds to 10 secs.

Along with this change, it also uses the proper namespace of
submariner in the excluded namespaces.

Fixes issue: https://github.com/submariner-io/submariner-charts/issues/39

Signed-off-by: Sridhar Gaddam <sgaddam@redhat.com>
2020-06-08 11:05:16 +02:00
Vishal ThaparandMiguel Angel Ajo Pelayo 77fe3d91fa Add crd-install hook for ServiceExport 2020-05-19 10:44:52 +02:00
Vishal ThaparandMiguel Angel Ajo Pelayo 855b874a6a Use v1beta1 for lighthouse CRDs
v1 is only available k8s v1.16 onwards and we're using 1.14 in E2E.
2020-05-18 10:11:59 +02:00
Mike KolesnikandMiguel Angel Ajo Pelayo 1d2af4468b Check also optional parts of charts
The CI job currently only checks the bare chart, with optional flags set
to defaults which cause it to miss those parts. Set the flags so that
the job also checks those parts.
2020-05-15 00:43:54 +02:00
Vishal ThaparandMiguel Angel Ajo Pelayo 97e83e4fc8 Add ServiceExport CRD 2020-05-15 00:41:54 +02:00
Daniel FarrellandGitHub 40538471b6 Add CODEOWNERS file to manage commit rights (#32)
Add a GitHub CODEOWNERS file to support disaggregating commit rights.
Allows the Committer process in the Community Membership docs to be
implemented.

Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
2020-05-05 09:02:40 -04:00
Mike KolesnikandMiguel Angel Ajo Pelayo 89b509f60d Fix lighthouseServiceAccountName
It was missing the post-deletion operator which caused it to generate:
    name:
    submariner-lighthouse

Instead of `name: submariner-lighthouse`

Now it should be fine
2020-04-26 08:49:57 +02:00
Miguel Angel Ajo PelayoandGitHub 2146487899 Add printer column to gateway CRD (#28) 2020-04-24 08:07:12 -04:00
Vishal ThaparandMiguel Angel Ajo Pelayo d37db87a61 Bump chart versions for servicediscovery
With servicediscovery changes coming in, time to update chart versions

submariner: 0.0.3 => 0.0.4
submariner-k8s-broker: 0.0.1 => 0.0.2
2020-04-23 09:29:50 +02:00
Vishal ThaparandMiguel Angel Ajo Pelayo 5e425b9079 Add Lighthouse charts
This adds the deployment for lighthouse-agent, service account and RBAC.
2020-04-23 09:29:50 +02:00
Alexey RoytmanandGitHub 2914c74e38 Support CableDriver (#18) 2020-04-20 09:49:00 -04:00
Alexey RoytmanandGitHub d82c6ce442 Update the README file (#19)
* Update the README file

* update README file with shipyard changes
2020-04-16 09:40:21 -04:00
Miguel Angel Ajo PelayoandGitHub 77b41721a9 Merge pull request #24 from skitt/gateway-crd
Add Gateway CRD
2020-04-15 16:57:22 +02:00
Stephen Kitt 5888e837ce Add Gateway CRD
This will be used to store and report the cluster-local engine
status.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2020-04-14 10:54:14 +02:00
Miguel Angel Ajo PelayoandGitHub 8213fe55f0 Merge pull request #21 from sridhargaddam/route-agent-get-nodes
Add ClusterRole for route-agent to annotate a node
2020-04-13 16:36:50 +02:00
Miguel Angel Ajo PelayoandGitHub 8fa5ec5c03 Merge pull request #20 from sridhargaddam/gncontroller-nodes
Add role for globalnet controller to annotate a node
2020-04-13 16:36:02 +02:00
Sridhar Gaddam ae121cfdc4 Add ClusterRole for route-agent to annotate a node
As part of supporting connectivity from HostNetwork to remoteClusters, globalnet
controller requires the CNIInterfaceIP on each node. This PR adds the necessary
clusterRoles for the route-agent daemonSet which will annotate the node with the
CNIInterfaceIP on that respective node.

Signed-off-by: Sridhar Gaddam <sgaddam@redhat.com>
2020-04-10 14:36:00 +05:30
Sridhar Gaddam 80bdf3eb07 Add role for globalnet controller to annotate a node
As part of supporting connectivity from HostNetwork to remoteClusters, globalnet
controller annotates a node with globalIP. This PR adds the necessary roles for
globalnetController.

Signed-off-by: Sridhar Gaddam <sgaddam@redhat.com>
2020-04-09 22:58:57 +05:30
Miguel Angel Ajo PelayoandGitHub f3ff20e128 Update travis.yml to fail if deployment fails 2020-03-13 12:15:24 +01:00
Miguel Angel Ajo PelayoandGitHub 535256f640 Merge pull request #15 from sridhargaddam/leader-election
Make Gateway Leadership variables configurable
2020-03-11 18:23:21 +01:00
Miguel Angel Ajo PelayoandGitHub 232bb7478c Merge pull request #16 from mkolesnik/local-reg-globalnet
Support globalnet image specification
2020-03-11 15:28:37 +01:00
Mike Kolesnik 116615040a Support globalnet image specification
This is necessary to allow globalnet image to be stored in local
registry.
2020-03-11 10:30:34 +02:00
Sridhar Gaddam 9041855054 Make Gateway Leadership variables configurable
This PR provides a mechanism to configure the following
Submariner Gateway leader election values
1. leaseDuration
2. renewDeadline
3. retryPeriod

Signed-off-by: Sridhar Gaddam <sgaddam@redhat.com>
2020-02-13 19:41:26 +05:30
Miguel Angel Ajo PelayoandGitHub f6301aea3a Merge pull request #14 from mangelajo/rename-daemonset-to-gateway
Rename submariner engine daemonset to submariner-gateyway
2020-01-29 13:37:26 +01:00
Miguel Angel Ajo bcd9f800bf Rename submariner engine daemonset to submariner-gateyway
In previous upstream discussions we talked about renaming submariner
engine "deployment" (now daemonset) to submariner-gateway to make
identification of the gateway easier to admins and avoid confusion.

Also see: https://github.com/submariner-io/submariner-operator/pull/145
2020-01-28 16:36:32 +01:00
Miguel Angel Ajo PelayoandGitHub fd672a570c Merge pull request #13 from sridhargaddam/update-sm-engine-as-ds
Update Submariner Engine to a DaemonSet
2020-01-28 16:21:14 +01:00
Sridhar Gaddam d4a0bc4d15 Update Submariner Engine to a DaemonSet
Currently, the Submariner Engine is a deployment with nodeSelector
(for submariner.io/gateway=true). It is seen that when the label
is removed from the node after SM engine is deployed, SM engine
continues to run on that node. This behavior is not in Sync with
the DaemonSet (used by GlobalnetController) behavior where the POD
is immediately terminated when the label is removed from the node.
This PR updates SM engine as DaemonSet so that we have consistent
behavior between the SM Engine POD and GlobalnetController POD.

Signed-off-by: Sridhar Gaddam <sgaddam@redhat.com>
2020-01-28 19:23:32 +05:30
Miguel Angel Ajo PelayoandGitHub 7200264f5f Merge pull request #12 from mkolesnik/ipam-support
Add support for the Globalnet controller
2020-01-28 14:06:26 +01:00
Mike Kolesnik 04865e056b Added clusters to rbac 2020-01-28 08:27:25 +02:00
Mike Kolesnik fb754f5f2f Added the role & binding for globalnet
Signed-off-by: Mike Kolesnik <mkolesni@redhat.com>
2020-01-23 14:36:26 +02:00
Mike Kolesnik 35417fa669 Add globalnet service account creation
Signed-off-by: Mike Kolesnik <mkolesni@redhat.com>
2020-01-22 16:50:32 +02:00
Mike Kolesnik afac49e68e Remove GLOBALCIDR, empty yaml if disabled 2020-01-21 11:49:45 +02:00
Mike Kolesnik 409c875713 Add support for the Globalnet controller
Added a chart for the globalnet controller which uses the global CIDR.
Also added the global CIDR to the submariner engine pod env so it can
utilize it.
The controller will only be deployed if the CIDR is specified.
2020-01-13 10:22:23 +02:00
Dmitry GroismanandGitHub e1a313755c Merge pull request #10 from dimaunx/k8s-1.16.x
Add support for k8s version 1.16.x
2019-12-03 14:44:48 +02:00
Dmitry Groisman f8565a2e30 k8s 1.16.x support 2019-11-25 15:23:22 +02:00
Miguel Angel Ajo PelayoandGitHub ddf1538905 Merge pull request #9 from mangelajo/bump-submariner-to-0.0.2
Bump submariner image versions to 0.0.2
2019-11-05 15:29:50 +01:00
Miguel Angel Ajo 459b9c23bc Bump submariner image versions to 0.0.2 2019-11-04 14:01:36 +01:00
Dmitry GroismanandGitHub c563636ed0 Merge pull request #8 from dimaunx/dev-workflow
Dev workflow proposal
2019-09-27 15:19:10 +03:00
Miguel Angel Ajo PelayoandGitHub 97ebaecb96 Merge pull request #7 from dimaunx/ipsec-custom-port
Add custom ipsec ports support
2019-09-27 10:19:15 +02:00
Dmitry Groisman 129cb73a00 local dev workflow 2019-09-26 16:03:22 +03:00
Dmitry Groisman 8d2c48b8a1 adding custom ipsec ports support 2019-09-26 12:54:02 +03:00
Dmitry Groisman faf5f3e04b fixing sources location 2019-09-05 14:52:52 +03:00
Dmitry Groisman 2b92daa9f8 fixing yaml lint issues 2019-09-05 14:15:44 +03:00
Dmitry Groisman 47638e04f9 helm repo ci 2019-09-05 14:12:53 +03:00
22 changed files with 779 additions and 48 deletions
+17
View File
@@ -0,0 +1,17 @@
name: DCO Check
on: pull_request
jobs:
dco:
runs-on: ubuntu-latest
name: DCO Check
steps:
- name: Get PR Commits
id: 'get-pr-commits'
uses: tim-actions/get-pr-commits@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: DCO Check
uses: tim-actions/dco@master
with:
commits: ${{ steps.get-pr-commits.outputs.commits }}
+2
View File
@@ -0,0 +1,2 @@
.idea
*.tgz
+47
View File
@@ -0,0 +1,47 @@
language: python
env:
global:
- HELM_URL=https://storage.googleapis.com/kubernetes-helm
- HELM_TGZ=helm-v2.14.3-linux-amd64.tar.gz
- TARGET_BR=gh-pages
- GH_URL=https://submariner-io.github.io/submariner-charts/charts
- CHARTS_DIR=charts
- YAMLLINT_VERSION=1.17.0
- HELM_FLAGS='--set submariner.serviceDiscovery=true,serviceAccounts.globalnet.create=true,globalCidr="169.254.0.0/16"'
install:
- wget -q ${HELM_URL}/${HELM_TGZ}
- tar xzfv ${HELM_TGZ}
- PATH=`pwd`/linux-amd64/:$PATH
- helm init --client-only
- sudo pip install yamllint=="${YAMLLINT_VERSION}"
script:
- for dir in submariner submariner-k8s-broker; do helm lint $dir $HELM_FLAGS; done
- yamllint -c .yamllint.yml -s $(find . -type f -name "Chart.yaml")
- yamllint -c .yamllint.yml -s $(find . -type f -name "values.yaml")
after_success:
- >
if [ $TRAVIS_BRANCH = 'master' ] && [ $TRAVIS_PULL_REQUEST = 'false' ]; then
set -e
for dir in submariner submariner-k8s-broker; do
helm dep update $dir
helm package $dir
done
REPO_URL=`git config remote.origin.url`
git clone ${REPO_URL} out && cd out && git checkout gh-pages && mkdir -p ${CHARTS_DIR}
cp -f ../submariner-*.tgz ${CHARTS_DIR}/
if [ -f charts/index.yaml ]; then
helm repo index ${CHARTS_DIR} --url ${GH_URL} --merge index.yaml
else
helm repo index ${CHARTS_DIR} --url ${GH_URL}
fi
git config user.name "Travis CI"
git config user.email "travis@travis-ci.org"
git add -f ${CHARTS_DIR}/*
git commit -m "Travis build: $TRAVIS_BUILD_NUMBER"
git remote add origin-pages https://${GH_TOKEN}@github.com/submariner-io/submariner-charts.git > /dev/null 2>&1
git push --quiet -f -u origin-pages gh-pages
fi
+15
View File
@@ -0,0 +1,15 @@
---
extends: default
rules:
comments: disable
comments-indentation: disable
line-length:
max: 150
braces:
min-spaces-inside: 0
max-spaces-inside: 0
brackets:
min-spaces-inside: 0
max-spaces-inside: 0
indentation:
indent-sequences: consistent
+1
View File
@@ -0,0 +1 @@
* @mangelajo @tpantelis @Oats87
+114 -1
View File
@@ -1,3 +1,116 @@
# submariner-charts
Please see https://github.com/rancher/submariner for more information. This is only a supporting repository for Submariner
Please see https://github.com/submariner-io/submariner for more information. This is only a supporting repository for Submariner
# Dev workflow.
### Prerequisites
- [helm]
- [docker] or [podman]
### Create a fork and checkout.
[Create a fork] of the original repository, clone it locally and checkout a new branch from master.
Example:
```bash
git clone https://github.com/myuser/submariner-charts.git
cd submariner-charts
git checkout -b new-feature
```
Now you can modify the helm charts according to your needs.
### Serve the modified charts
Before serving the modified charts, the charts must be packaged for local usage.
```bash
helm package ./submariner
helm package ./submariner-k8s-broker
```
Note: if you just installed helm, you have to init the helm, by running
```bash
helm init --client-only
```
Serve the packaged charts through a local helm repository:
```bash
docker run -d --rm --name helm-repo -p 8080:8080 -v $PWD:/charts -e DEBUG=true -e STORAGE=local -e STORAGE_LOCAL_ROOTDIR=/charts chartmuseum/chartmuseum
```
or
```bash
sudo podman run -d --rm --name helm-repo -p 8080:8080 -v $PWD:/charts -e DEBUG=true -e STORAGE=local -e STORAGE_LOCAL_ROOTDIR=/charts chartmuseum/chartmuseum
```
Get the container internal ip:
```bash
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' helm-repo
```
The local container will serve the charts locally on port 8080.
Get logs for the container:
```bash
docker logs -f helm-repo
```
### Use the modified charts
Init helm
```bash
helm init --client-only
```
Add your local repository to helm
```bash
internal_ip=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' helm-repo)
helm repo add test-repo http://$internal_ip:8080
```
List the repos:
```bash
helm repo list
```
You should be able to see test-repo in the list
Search the new repo for submariner charts:
```bash
helm search -l test-repo
```
### Modify submariner e2e tests helm deployment script to use your local test-repo.
You can test your helm-charts with e2e tests from the [shipyard](https://github.com/submariner-io/shipyard) repository.
In the file `scripts/shared/lib/deploy_helm` change the line from:
```bash
helm repo add submariner-latest https://submariner-io.github.io/submariner-charts/charts
```
to
```bash
internal_ip=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' helm-repo)
helm repo add submariner-latest http://$internal_ip:8080
```
<!--links-->
[helm]: https://helm.sh/docs/using_helm/#installing-helm
[docker]: https://docs.docker.com/install/
[podman]: https://podman.io/getting-started/installation
[Create a fork]: https://help.github.com/en/articles/fork-a-repo
+7 -6
View File
@@ -1,11 +1,12 @@
---
name: submariner-k8s-broker
version: 0.0.1
appVersion: v0.0.1
version: 0.4.1
appVersion: 0.4.1
description: Submariner Kubernetes Broker
keywords:
home: https://submariner.io/
home: https://submariner-io.github.io/
sources:
- https://github.com/rancher/submariner-charts
- https://submariner-io.github.io/submariner-charts/charts
maintainers:
- name: Rancher Labs
email: charts@rancher.com
- name: Submariner Developers
email: submariner-dev@googlegroups.com
+81
View File
@@ -26,4 +26,85 @@ spec:
kind: Endpoint
plural: endpoints
scope: Namespaced
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: gateways.submariner.io
annotations:
"helm.sh/hook": crd-install
spec:
group: submariner.io
version: v1
names:
kind: Gateway
plural: gateways
scope: Namespaced
additionalPrinterColumns:
- name: ha-status
type: string
description: High Availability Status of the Gateway
JSONPath: .status.haStatus
---
{{- if .Values.submariner.serviceDiscovery }}
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: multiclusterservices.lighthouse.submariner.io
annotations:
"helm.sh/hook": crd-install
spec:
group: lighthouse.submariner.io
version: v1
names:
kind: MultiClusterService
plural: multiclusterservices
singular: multiclusterservice
scope: Namespaced
validation:
openAPIV3Schema:
properties:
spec:
properties:
clusterServiceInfo:
properties:
clusterID:
type: "string"
clusterDomain:
type: "string"
serviceIP:
type: "string"
port:
type: "integer"
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: serviceexports.lighthouse.submariner.io
annotations:
"helm.sh/hook": crd-install
spec:
group: lighthouse.submariner.io
version: v2alpha1
names:
kind: ServiceExport
plural: serviceexports
singular: serviceexport
scope: Namespaced
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: serviceimports.lighthouse.submariner.io
annotations:
"helm.sh/hook": crd-install
spec:
group: lighthouse.submariner.io
version: v2alpha1
names:
kind: ServiceImport
plural: serviceimports
singular: serviceimport
scope: Namespaced
{{- end -}}
{{- end -}}
@@ -12,6 +12,9 @@ rules:
- apiGroups: ["submariner.io"]
resources: ["clusters", "endpoints"]
verbs: ["create", "get", "list", "watch", "patch", "update", "delete"]
- apiGroups: ["lighthouse.submariner.io"]
resources: ["*"]
verbs: ["create", "get", "list", "watch", "patch", "update", "delete"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
+4 -1
View File
@@ -1,3 +1,4 @@
---
rbac:
create: true
crd:
@@ -5,4 +6,6 @@ crd:
serviceAccounts:
client:
create: true
name: ""
name: ""
submariner:
serviceDiscovery: false
+8 -7
View File
@@ -1,11 +1,12 @@
---
name: submariner
version: 0.0.1
appVersion: v0.0.1
description: Submariner
version: 0.4.0
appVersion: 0.4.0
description: Submariner enables direct networking between Pods and Services in different Kubernetes clusters
keywords:
home: https://submariner.io/
home: https://submariner-io.github.io/
sources:
- https://github.com/rancher/submariner-charts
- https://submariner-io.github.io/submariner-charts/charts
maintainers:
- name: Rancher Labs
email: charts@rancher.com
- name: Submariner Developers
email: submariner-dev@googlegroups.com
+8 -2
View File
@@ -13,7 +13,7 @@ questions:
type: string
label: Submariner Engine Image Repository
- variable: engine.image.tag
default: "v0.0.1"
default: "v0.0.2"
description: "Submariner Engine Image Tag"
type: string
label: Submariner Engine Image Tag
@@ -31,7 +31,7 @@ questions:
type: string
label: Submariner Route Agent Image Repository
- variable: routeAgent.image.tag
default: "v0.0.1"
default: "v0.0.2"
description: "Submariner Route Agent Image Tag"
type: string
label: Submariner Route Agent Image Tag
@@ -130,3 +130,9 @@ questions:
group: "Advanced Configuration"
description: "Enable Charon debug mode"
label: "Charon Enabled"
- variable: submariner.cableDriver
type: string
default: ""
group: "Advanced Configuration"
description: "Cable driver implementation"
label: "Cable Driver"
+30 -1
View File
@@ -51,4 +51,33 @@ Create the name of the submariner-route-agent service account to use
{{- else -}}
{{ default "default" .Values.serviceAccounts.routeAgent.name }}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create the name of the submariner-globalnet service account to use
*/}}
{{- define "submariner.globalnetServiceAccountName" -}}
{{- if .Values.serviceAccounts.globalnet.create -}}
{{ default (printf "%s-globalnet" (include "submariner.fullname" .)) .Values.serviceAccounts.globalnet.name }}
{{- else -}}
{{ default "default" .Values.serviceAccounts.globalnet.name }}
{{- end -}}
{{- end -}}
{{/*
Create the name of the submariner-lighthouse service account to use
*/}}
{{- define "submariner.lighthouseServiceAccountName" -}}
{{- if .Values.submariner.serviceDiscovery -}}
{{ default (printf "%s-lighthouse" (include "submariner.fullname" .)) .Values.serviceAccounts.lighthouse.name }}
{{- else -}}
{{ default "default" .Values.serviceAccounts.lighthouse.name }}
{{- end -}}
{{- end -}}
{{/*
Create the name of the submariner-lighthouse-coredns service name to use
*/}}
{{- define "submariner.lighthouseDnsName" -}}
{{- default (printf "%s-lighthouse-coredns" (include "submariner.fullname" .)) .Values.lighthouseCoredns.name }}
{{- end -}}
+81
View File
@@ -26,4 +26,85 @@ spec:
kind: Endpoint
plural: endpoints
scope: Namespaced
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: gateways.submariner.io
annotations:
"helm.sh/hook": crd-install
spec:
group: submariner.io
version: v1
names:
kind: Gateway
plural: gateways
scope: Namespaced
additionalPrinterColumns:
- name: ha-status
type: string
description: High Availability Status of the Gateway
JSONPath: .status.haStatus
---
{{- if .Values.submariner.serviceDiscovery }}
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: multiclusterservices.lighthouse.submariner.io
annotations:
"helm.sh/hook": crd-install
spec:
group: lighthouse.submariner.io
version: v1
names:
kind: MultiClusterService
plural: multiclusterservices
singular: multiclusterservice
scope: Namespaced
validation:
openAPIV3Schema:
properties:
spec:
properties:
clusterServiceInfo:
properties:
clusterID:
type: "string"
clusterDomain:
type: "string"
serviceIP:
type: "string"
port:
type: "integer"
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: serviceexports.lighthouse.submariner.io
annotations:
"helm.sh/hook": crd-install
spec:
group: lighthouse.submariner.io
version: v2alpha1
names:
kind: ServiceExport
plural: serviceexports
singular: serviceexport
scope: Namespaced
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: serviceimports.lighthouse.submariner.io
annotations:
"helm.sh/hook": crd-install
spec:
group: lighthouse.submariner.io
version: v2alpha1
names:
kind: ServiceImport
plural: serviceimports
singular: serviceimport
scope: Namespaced
{{- end }}
{{- end -}}
+22 -11
View File
@@ -1,5 +1,5 @@
apiVersion: apps/v1beta2
kind: Deployment
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
heritage: {{ .Release.Service | quote }}
@@ -7,18 +7,15 @@ metadata:
chart: {{ template "submariner.chart" . }}
app: {{ template "submariner.fullname" . }}-engine
component: engine
name: {{ template "submariner.fullname" . }}
name: {{ template "submariner.fullname" . }}-gateway
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 5
selector:
matchLabels:
app: {{ template "submariner.fullname" . }}-engine
strategy:
updateStrategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
@@ -60,6 +57,8 @@ spec:
value: "{{ .Values.submariner.clusterCidr }}"
- name: SUBMARINER_SERVICECIDR
value: "{{ .Values.submariner.serviceCidr }}"
- name: SUBMARINER_GLOBALCIDR
value: "{{ .Values.submariner.globalCidr }}"
- name: SUBMARINER_TOKEN
value: "{{ .Values.submariner.apiToken }}"
- name: SUBMARINER_CLUSTERID
@@ -72,6 +71,8 @@ spec:
value: "{{ .Values.submariner.natEnabled }}"
- name: SUBMARINER_BROKER
value: "{{ .Values.broker.type }}"
- name: SUBMARINER_CABLEDRIVER
value: "{{ .Values.submariner.cableDriver }}"
{{- if eq .Values.broker.type "phpapi" }}
- name: BROKER_PHPAPI_PROTO
value: "{{ .Values.broker.proto }}"
@@ -97,7 +98,17 @@ spec:
value: "{{ .Values.ipsec.psk }}"
- name: CE_IPSEC_DEBUG
value: "{{ .Values.ipsec.debug }}"
image: {{ .Values.engine.image.repository }}:{{ .Values.engine.image.tag }}
- name: CE_IPSEC_IKEPORT
value: "{{ .Values.ipsec.ikePort }}"
- name: CE_IPSEC_NATTPORT
value: "{{ .Values.ipsec.natPort }}"
- name: LEADERSHIP_LEASEDURATION
value: "{{ .Values.leadership.leaseDuration }}"
- name: LEADERSHIP_RENEWDEADLINE
value: "{{ .Values.leadership.renewDeadline }}"
- name: LEADERSHIP_RETRYPERIOD
value: "{{ .Values.leadership.retryPeriod }}"
image: {{ .Values.engine.image.repository }}:{{ default .Chart.AppVersion .Values.engine.image.tag }}
imagePullPolicy: {{ .Values.engine.image.pullPolicy }}
name: submariner
resources:
@@ -119,5 +130,5 @@ spec:
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 0
serviceAccountName: {{ template "submariner.engineServiceAccountName" . }}
terminationGracePeriodSeconds: 1
serviceAccountName: {{ template "submariner.engineServiceAccountName" . }}
+59
View File
@@ -0,0 +1,59 @@
{{- if ne .Values.submariner.globalCidr "" }}
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ template "submariner.fullname" . }}-globalnet
labels:
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
chart: {{ template "submariner.chart" . }}
app: {{ template "submariner.fullname" . }}-globalnet
component: globalnet
spec:
selector:
matchLabels:
app: {{ template "submariner.fullname" . }}-globalnet
updateStrategy:
rollingUpdate:
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
app: {{ template "submariner.fullname" . }}-globalnet
spec:
hostNetwork: true
serviceAccountName: submariner-globalnet
serviceAccount: submariner-globalnet
terminationGracePeriodSeconds: 2
nodeSelector:
submariner.io/gateway: 'true'
containers:
- name: {{ template "submariner.fullname" . }}-globalnet
image: {{ .Values.globalnet.image.repository }}:{{ default .Chart.AppVersion .Values.globalnet.image.tag }}
imagePullPolicy: {{ .Values.globalnet.image.pullPolicy }}
env:
- name: SUBMARINER_CLUSTERID
value: '{{ .Values.submariner.clusterId }}'
- name: SUBMARINER_EXCLUDENS
value: 'submariner-operator,kube-system,operators'
- name: SUBMARINER_NAMESPACE
value: '{{ .Release.Namespace }}'
securityContext:
allowPrivilegeEscalation: true
capabilities:
add:
- ALL
privileged: true
readOnlyRootFilesystem: false
runAsNonRoot: false
volumeMounts:
# Because we don't actually run iptables locally, but chroot in to the host
- mountPath: /host
name: host-slash
readOnly: true
volumes:
- name: host-slash
hostPath:
path: /
{{- end }}
@@ -0,0 +1,74 @@
{{- if .Values.submariner.serviceDiscovery }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "submariner.lighthouseDnsName" . }}
labels:
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
chart: {{ template "submariner.chart" . }}
app: {{ template "submariner.lighthouseDnsName" . }}
component: lighthouse-coredns
spec:
selector:
matchLabels:
app: {{ template "submariner.lighthouseDnsName" . }}
replicas: 2
template:
metadata:
labels:
app: {{ template "submariner.lighthouseDnsName" . }}
spec:
containers:
- args:
- -conf
- /etc/coredns/Corefile
image: {{ .Values.lighthouseCoredns.image.repository }}:{{ default .Chart.AppVersion .Values.lighthouseCoredns.image.tag }}
imagePullPolicy: {{ .Values.lighthouseCoredns.image.pullPolicy }}
name: {{ template "submariner.lighthouseDnsName" . }}
volumeMounts:
- mountPath: /etc/coredns
name: config-volume
readOnly: true
serviceAccountName: {{ template "submariner.lighthouseServiceAccountName" . }}
volumes:
- configMap:
defaultMode: 420
items:
- key: Corefile
path: Corefile
name: {{ template "submariner.lighthouseDnsName" . }}
name: config-volume
---
apiVersion: v1
kind: Service
metadata:
name: {{ template "submariner.lighthouseDnsName" . }}
labels:
app: {{ template "submariner.lighthouseDnsName" . }}
spec:
ports:
- name: udp
port: 53
protocol: UDP
targetPort: 53
selector:
app: {{ template "submariner.lighthouseDnsName" . }}
type: ClusterIP
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "submariner.lighthouseDnsName" . }}
data:
Corefile: |
supercluster.local:53 {
{{- if .Values.submariner.debug }}
log
{{- end }}
lighthouse
errors
health
ready
}
{{- end }}
+55
View File
@@ -0,0 +1,55 @@
{{- if .Values.submariner.serviceDiscovery }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "submariner.fullname" . }}-lighthouse-agent
labels:
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
chart: {{ template "submariner.chart" . }}
app: {{ template "submariner.fullname" . }}-lighthouse-agent
component: lighthouse
spec:
replicas: 1
selector:
matchLabels:
app: {{ template "submariner.fullname" . }}-lighthouse-agent
template:
metadata:
labels:
app: {{ template "submariner.fullname" . }}-lighthouse-agent
spec:
serviceAccountName: {{ template "submariner.lighthouseServiceAccountName" . }}
containers:
- command:
- lighthouse-agent.sh
env:
- name: SUBMARINER_NAMESPACE
value: "{{ .Release.Namespace }}"
- name: SUBMARINER_CLUSTERID
value: "{{ .Values.submariner.clusterId }}"
- name: SUBMARINER_DEBUG
value: "{{ .Values.submariner.debug }}"
{{- if ne .Values.submariner.globalCidr "" }}
- name: SUBMARINER_GLOBALNET_ENABLED
value: "true"
{{- end }}
- name: BROKER_K8S_APISERVER
value: "{{ .Values.broker.server }}"
- name: BROKER_K8S_APISERVERTOKEN
value: "{{ .Values.broker.token }}"
- name: BROKER_K8S_REMOTENAMESPACE
value: "{{ .Values.broker.namespace }}"
{{- if .Values.broker.insecure }}
- name: BROKER_K8S_INSECURE
value: "true"
{{- else }}
- name: BROKER_K8S_CA
value: "{{ .Values.broker.ca }}"
{{- end }}
name: {{ template "submariner.fullname" . }}-lighthouse-agent
image: {{ .Values.lighthouse.image.repository }}:{{ default .Chart.AppVersion .Values.lighthouse.image.tag }}
imagePullPolicy: {{ .Values.lighthouse.image.pullPolicy }}
restartPolicy: Always
terminationGracePeriodSeconds: 0
{{- end }}
+81 -2
View File
@@ -13,7 +13,7 @@ rules:
resources: ["configmaps"]
verbs: ["create", "get", "list", "watch", "patch", "update"]
- apiGroups: ["submariner.io"]
resources: ["clusters", "endpoints"]
resources: ["clusters", "endpoints", "gateways"]
verbs: ["create", "get", "list", "watch", "patch", "update", "delete"]
- apiGroups: [""]
resources: ["events"]
@@ -30,7 +30,7 @@ metadata:
app: {{ template "submariner.name" . }}
rules:
- apiGroups: ["submariner.io"]
resources: ["clusters", "endpoints"]
resources: ["clusters", "endpoints", "gateways"]
verbs: ["create", "get", "list", "watch", "patch", "update"]
- apiGroups: [""]
resources: ["pods"]
@@ -61,4 +61,83 @@ subjects:
- kind: ServiceAccount
name: {{ template "submariner.routeAgentServiceAccountName" . }}
namespace: {{ .Release.Namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ template "submariner.fullname" . }}:routeagent
rules:
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "update"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ template "submariner.fullname" . }}:routeagent
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ template "submariner.fullname" . }}:routeagent
subjects:
- kind: ServiceAccount
name: {{ template "submariner.routeAgentServiceAccountName" . }}
namespace: {{ .Release.Namespace }}
---
{{- if ne .Values.submariner.globalCidr "" }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ template "submariner.fullname" . }}:globalnet
rules:
- apiGroups: [""]
resources: ["services", "namespaces", "pods", "nodes"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["submariner.io"]
resources: ["clusters", "endpoints", "gateways"]
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ template "submariner.fullname" . }}:globalnet
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ template "submariner.fullname" . }}:globalnet
subjects:
- kind: ServiceAccount
name: {{ template "submariner.globalnetServiceAccountName" . }}
namespace: {{ .Release.Namespace }}
---
{{- end -}}
{{- if .Values.submariner.serviceDiscovery }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ template "submariner.fullname" . }}:lighthouse
rules:
- apiGroups: [""]
resources: ["services", "namespaces", "configmaps"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["lighthouse.submariner.io"]
resources: ["*"]
verbs: ["create", "get", "list", "watch", "update", "delete"]
- apiGroups: ["submariner.io"]
resources: ["gateways"]
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ template "submariner.fullname" . }}:lighthouse
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ template "submariner.fullname" . }}:lighthouse
subjects:
- kind: ServiceAccount
name: {{ template "submariner.lighthouseServiceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end -}}
{{- end -}}
+7 -3
View File
@@ -1,4 +1,4 @@
apiVersion: apps/v1beta2
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ template "submariner.fullname" . }}-routeagent
@@ -12,6 +12,10 @@ spec:
selector:
matchLabels:
app: {{ template "submariner.fullname" . }}-routeagent
updateStrategy:
rollingUpdate:
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
labels:
@@ -22,13 +26,13 @@ spec:
component: routeagent
spec:
serviceAccountName: {{ template "submariner.routeAgentServiceAccountName" . }}
terminationGracePeriodSeconds: 0
terminationGracePeriodSeconds: 1
hostNetwork: true
containers:
- name: routeagent
command:
- submariner-route-agent.sh
image: {{ .Values.routeAgent.image.repository }}:{{ .Values.routeAgent.image.tag }}
image: {{ .Values.routeAgent.image.repository }}:{{ default .Chart.AppVersion .Values.routeAgent.image.tag }}
imagePullPolicy: {{ .Values.routeAgent.image.pullPolicy }}
env:
- name: SUBMARINER_NAMESPACE
+25 -1
View File
@@ -20,4 +20,28 @@ metadata:
release: {{ .Release.Name | quote }}
chart: {{ template "submariner.chart" . }}
app: {{ template "submariner.name" . }}
{{- end }}
{{- end }}
---
{{- if .Values.serviceAccounts.globalnet.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "submariner.globalnetServiceAccountName" . }}
labels:
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
chart: {{ template "submariner.chart" . }}
app: {{ template "submariner.name" . }}
{{- end }}
---
{{- if .Values.serviceAccounts.lighthouse.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "submariner.lighthouseServiceAccountName" . }}
labels:
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
chart: {{ template "submariner.chart" . }}
app: {{ template "submariner.name" . }}
{{- end }}
+38 -13
View File
@@ -1,11 +1,14 @@
---
submariner:
clusterId: ""
token: ""
clusterCidr: "10.42.0.0/16"
serviceCidr: "10.43.0.0/16"
globalCidr: ""
natEnabled: false
colorCodes: blue
debug: false
serviceDiscovery: false
crd:
create: true
broker:
@@ -20,35 +23,57 @@ rbac:
ipsec:
psk: ""
debug: false
ikePort: 500
natPort: 4500
leadership:
leaseDuration: 10
renewDeadline: 5
retryPeriod: 2
engine:
image:
repository: rancher/submariner
tag: v0.0.1
pullPolicy: Always
repository: quay.io/submariner/submariner
tag: ""
pullPolicy: IfNotPresent
resources: {}
# limits:
# cpu: 100m
# memory: 100Mi
nodeSelectorEnabled: true
nodeSelector: {}
tolerations: []
affinity: {}
routeAgent:
image:
repository: rancher/submariner-route-agent
tag: v0.0.1
pullPolicy: Always
repository: quay.io/submariner/submariner-route-agent
tag: ""
pullPolicy: IfNotPresent
resources: {}
# limits:
# cpu: 100m
# memory: 100Mi
nodeSelector: {}
tolerations: []
affinity: {}
globalnet:
image:
repository: quay.io/submariner/submariner-globalnet
tag: ""
pullPolicy: IfNotPresent
lighthouse:
image:
repository: quay.io/submariner/lighthouse-agent
tag: ""
pullPolicy: IfNotPresent
lighthouseCoredns:
name: ""
image:
repository: quay.io/submariner/lighthouse-coredns
tag: ""
pullPolicy: IfNotPresent
serviceAccounts:
engine:
create: true
name: ""
routeAgent:
create: true
name: ""
name: ""
globalnet:
create: false
name: ""
lighthouse:
create: false
name: ""