Compare commits

..
Author SHA1 Message Date
Daniel Farrell a7d72ba4db Remove Travis CI
All tests and release work has been transferred to run on GitHub
Actions, like the rest of Subariner's repos.

Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
2020-10-22 07:29:14 -04:00
Daniel Farrell 331ed1ff0d Release Helm charts via helm/chart-releaser GHA
Use the official Helm chart releasing GitHub Action instead of our
custom bash.

Travis CI can be removed after this commit, as all tests will have
equivalents for GHAs.

Closes: #71
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
2020-10-22 07:28:23 -04:00
Daniel FarrellandThomas Pantelis f92523dbb1 Run YAML linting also via GHA
YAML linting currently runs on Travis. Convert to a GHA, to align with
other repos and prepare for future optimizations.

Only run against values.yaml and Chart.yaml files, as is currently the
case in the Travis-driven workflow.

Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
2020-10-21 13:46:48 -04:00
Daniel FarrellandThomas Pantelis 4461924636 Fix Markdown linting errros in README
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
2020-10-21 11:06:52 -04:00
Daniel FarrellandThomas Pantelis 3ac4e14664 Add Markdown linting
Add linting for Markdown files, following norms from other repos.

Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
2020-10-21 11:06:52 -04:00
Daniel FarrellandThomas Pantelis 8c49e84959 Refactor periodic GHA
Convert MD-lint Workflow into general periodic Workflow.

Minor tweaks from refactoring in other repos.

Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
2020-10-21 09:18:50 -04:00
Daniel FarrellandThomas Pantelis 5d4d921dbf Refactor linting GHAs
Combine linting GitHub Actions into a single Workflow.

Minor updates to reflect refactoring in other repos.

Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
2020-10-21 09:18:50 -04:00
Nir YechielandGitHub 0dde6f2123 Add stalebot to charts repo (#64)
Signed-off-by: nyechiel <n.yechiel@gmail.com>
2020-09-29 09:51:54 -04:00
Vishal ThaparandThomas Pantelis 1e3737abd9 Add deletecollection verb for endpointslices
Refer: https://github.com/submariner-io/submariner-operator/pull/636

Signed-off-by: Vishal Thapar <5137689+vthapar@users.noreply.github.com>
2020-09-03 10:10:19 -04:00
Stephen KittandMiguel Angel Ajo Pelayo c4760944f9 Bump to 0.6.0
This changes the defaults to 0.6.0, pulling the images from our Quay
repository.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2020-08-31 12:14:39 +02:00
Daniel FarrellandThomas Pantelis bb60a9e87b Bump MD link check linter 0.6->1.*
Adds support for check-modified-files-only config, which currently isn't
honored and throws a warning.

Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
2020-08-26 09:00:50 -04:00
Sridhar GaddamandMiguel Angel Ajo Pelayo d38625a9fd Modify updateStrategy for Route-agent Pods
Currently, the updateStrategy for Route-agent pods is set to RollingUpdate
with maxUnavailable as 1. Because of this, when the route-agent DaemonSet
is updated, the Pods are updated one after the other. While the rolling
update strategy is good for user-facing services, for route-agent DaemonSet
its not the most suitable one as it takes time for all the route-agent pods
to be updated in a large cluster.

Ideally, it would have been great if "Recreate" updateStrategy was supported
for DaemonSets, but unfortunately K8s does not support it. But an alternate
way to achieve something similar is to configure rollingUpdate.maxUnavailable
to 100% so that the DaemonSet controller can update all the route-agent Pods
in a single go.

https://kubernetes.io/docs/tasks/manage-daemon/update-daemon-set/#daemonset-update-strategy

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

Signed-Off-by: Sridhar Gaddam <sgaddam@redhat.com>
2020-08-21 10:05:46 +02:00
Daniel FarrellandThomas Pantelis ae84a0b409 Add link aliveness tests
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
2020-08-20 14:36:53 -04:00
Stephen KittandMiguel Angel Ajo Pelayo 9d3a9b7f66 Rename "supercluster" to "clusterset"
The latter is the name chosen by the multi-cluster SIG.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2020-08-20 09:40:42 +02:00
Vishal ThaparandThomas Pantelis 8df47c6f85 Add roles for endpoints and endpointslices
* Add clusterrole to give lighthouse serviceaccount access to endpoints and
endpointslices
* Add role to give broker serviceaccont access to endpoint slices

Signed-off-by: Vishal Thapar <5137689+vthapar@users.noreply.github.com>
2020-08-07 07:54:15 -04:00
Vishal ThaparandThomas Pantelis fefd6b21ed 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 11:35:31 -04:00
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
26 changed files with 620 additions and 95 deletions
+8
View File
@@ -0,0 +1,8 @@
---
name: Broken link detected by CI
labels: bug
---
<!-- Used by automation to raise an Issue when the periodic link aliveness tests detect a broken link. -->
Periodic link aliveness CI detected a broken link. Please see the job results for details.
+57
View File
@@ -0,0 +1,57 @@
---
# Configuration for probot-stale - https://github.com/probot/stale
# Number of days of inactivity before an Issue becomes stale (pull request is overridden later)
daysUntilStale: 60
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 7
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
onlyLabels: []
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels:
- security
- confirmed
# Set to true to ignore issues in a project (defaults to false)
exemptProjects: false
# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: false
# Set to true to ignore issues with an assignee (defaults to false)
exemptAssignees: false
# Label to use when marking as stale
staleLabel: wontfix
# Comment to post when marking as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
activity for 60 days. It will be closed if no further activity occurs.
Please make a comment if this issue/pr is still valid. Thank you
for your contributions.
# Comment to post when removing the stale label.
# unmarkComment: >
# Your comment here.
# Comment to post when closing a stale Issue or Pull Request.
# closeComment: >
# Your comment here.
# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 30
# Limit to only `issues` or `pulls`
# only: issues
pulls:
daysUntilStale: 30
markComment: >
This pull request has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
+57
View File
@@ -0,0 +1,57 @@
---
name: Linting
on:
pull_request:
jobs:
dco:
name: DCO in Commit Message(s)
runs-on: ubuntu-latest
steps:
- name: Get PR commits
id: 'get-pr-commits'
uses: tim-actions/get-pr-commits@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run DCO check
uses: tim-actions/dco@master
with:
commits: ${{ steps.get-pr-commits.outputs.commits }}
markdown-link-check:
name: Markdown Links (modified files)
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2
- name: Run markdown-link-check
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
config-file: ".markdownlinkcheck.json"
check-modified-files-only: "yes"
markdownlint:
name: Markdown
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2
- name: Run markdownlint
uses: nosborn/github-action-markdown-cli@v1.1.1
with:
files: .
config_file: ".markdownlint.yml"
yaml-lint:
name: YAML
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2
- name: Run yamllint
uses: ibiqlik/action-yamllint@v1
with:
file_or_dir: submariner/values.yaml submariner-k8s-broker/values.yaml submariner/Chart.yaml submariner-k8s-broker/Chart.yaml
config_file: .yamllint.yml
+27
View File
@@ -0,0 +1,27 @@
---
name: Periodic
on:
schedule:
- cron: "0 0 * * 0"
jobs:
markdown-link-check-periodic:
name: Markdown Links (all files)
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2
- name: Run markdown-link-check
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
config-file: ".markdownlinkcheck.json"
- name: Raise an Issue to report broken links
if: ${{ failure() }}
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filename: .github/ISSUE_TEMPLATE/broken-link.md
+25
View File
@@ -0,0 +1,25 @@
---
name: Release Charts
on:
push:
branches:
- master
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
+10
View File
@@ -0,0 +1,10 @@
{
"ignorePatterns": [
{
"pattern": "^https://github.com/\\S+/\\S+/(issues|pull)/[0-9]+"
},
{
"pattern": "^http://localhost:"
}
]
}
+12
View File
@@ -0,0 +1,12 @@
---
# Breaks reusing MD snippets extracted to files
first-line-heading: false
# Set maximum line Length to 140c to match Go linting
line-length:
line_length: 140
# Allow HTML span elements to set font sizes
no-inline-html:
allowed_elements:
- span
-46
View File
@@ -1,46 +0,0 @@
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
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; 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
+1
View File
@@ -0,0 +1 @@
* @mangelajo @tpantelis @Oats87
+10 -10
View File
@@ -1,17 +1,17 @@
# submariner-charts # submariner-charts
Please see https://github.com/submariner-io/submariner for more information. This is only a supporting repository for Submariner Please see the [Helm docs on Submariner's website](https://submariner.io/deployment/helm/).
# Dev workflow. ## Dev workflow
### Prerequisites ### Prerequisites
- [helm] - [helm]
- [docker] or [podman] - [docker] or [podman]
### Create a fork and checkout. ### Create a fork and checkout
[Create a fork] of the original repository, clone it locally and checkout a new branch from master. [Create a fork] of the original repository, clone it locally and checkout a new branch from master.
Example: Example:
@@ -31,12 +31,12 @@ Before serving the modified charts, the charts must be packaged for local usage.
helm package ./submariner helm package ./submariner
helm package ./submariner-k8s-broker helm package ./submariner-k8s-broker
``` ```
Note: if you just installed helm, you have to init the helm, by running Note: if you just installed helm, you have to init the helm, by running
```bash ```bash
helm init --client-only helm init --client-only
``` ```
Serve the packaged charts through a local helm repository: Serve the packaged charts through a local helm repository:
@@ -44,8 +44,8 @@ Serve the packaged charts through a local helm repository:
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 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 or
```bash ```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 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
``` ```
@@ -93,7 +93,7 @@ Search the new repo for submariner charts:
helm search -l test-repo helm search -l test-repo
``` ```
### Modify submariner e2e tests helm deployment script to use your local 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. 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: In the file `scripts/shared/lib/deploy_helm` change the line from:
@@ -102,7 +102,7 @@ In the file `scripts/shared/lib/deploy_helm` change the line from:
helm repo add submariner-latest https://submariner-io.github.io/submariner-charts/charts helm repo add submariner-latest https://submariner-io.github.io/submariner-charts/charts
``` ```
to to
```bash ```bash
internal_ip=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' helm-repo) internal_ip=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' helm-repo)
+5 -5
View File
@@ -1,12 +1,12 @@
--- ---
name: submariner-k8s-broker name: submariner-k8s-broker
version: 0.0.1 version: 0.6.0
appVersion: v0.0.1 appVersion: 0.6.0
description: Submariner Kubernetes Broker description: Submariner Kubernetes Broker
keywords: keywords:
home: https://submariner.io/ home: https://submariner-io.github.io/
sources: sources:
- https://submariner-io.github.io/submariner-charts/charts - https://submariner-io.github.io/submariner-charts/charts
maintainers: maintainers:
- name: Rancher Labs - name: Submariner Developers
email: charts@rancher.com email: submariner-dev@googlegroups.com
+81
View File
@@ -26,4 +26,85 @@ spec:
kind: Endpoint kind: Endpoint
plural: endpoints plural: endpoints
scope: Namespaced 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 -}} {{- end -}}
@@ -12,6 +12,12 @@ rules:
- apiGroups: ["submariner.io"] - apiGroups: ["submariner.io"]
resources: ["clusters", "endpoints"] resources: ["clusters", "endpoints"]
verbs: ["create", "get", "list", "watch", "patch", "update", "delete"] verbs: ["create", "get", "list", "watch", "patch", "update", "delete"]
- apiGroups: ["lighthouse.submariner.io"]
resources: ["*"]
verbs: ["create", "get", "list", "watch", "patch", "update", "delete"]
- apiGroups: ["discovery.k8s.io"]
resources: ["endpointslices"]
verbs: ["create", "get", "list", "watch","patch", "update", "delete"]
--- ---
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding kind: RoleBinding
+2
View File
@@ -7,3 +7,5 @@ serviceAccounts:
client: client:
create: true create: true
name: "" name: ""
submariner:
serviceDiscovery: false
+6 -6
View File
@@ -1,12 +1,12 @@
--- ---
name: submariner name: submariner
version: 0.0.3 version: 0.6.0
appVersion: v0.0.3 appVersion: 0.6.0
description: k8s 1.16.x support description: Submariner enables direct networking between Pods and Services in different Kubernetes clusters
keywords: keywords:
home: https://submariner.io/ home: https://submariner-io.github.io/
sources: sources:
- https://submariner-io.github.io/submariner-charts/charts - https://submariner-io.github.io/submariner-charts/charts
maintainers: maintainers:
- name: Rancher Labs - name: Submariner Developers
email: charts@rancher.com email: submariner-dev@googlegroups.com
+10 -4
View File
@@ -8,12 +8,12 @@ questions:
group: "Container Images" group: "Container Images"
subquestions: subquestions:
- variable: engine.image.repository - variable: engine.image.repository
default: "rancher/submariner" default: "quay.io/submariner/submariner"
description: "Submariner Engine Image Repository" description: "Submariner Engine Image Repository"
type: string type: string
label: Submariner Engine Image Repository label: Submariner Engine Image Repository
- variable: engine.image.tag - variable: engine.image.tag
default: "v0.0.2" default: "0.6.0"
description: "Submariner Engine Image Tag" description: "Submariner Engine Image Tag"
type: string type: string
label: Submariner Engine Image Tag label: Submariner Engine Image Tag
@@ -26,12 +26,12 @@ questions:
group: "Container Images" group: "Container Images"
subquestions: subquestions:
- variable: routeAgent.image.repository - variable: routeAgent.image.repository
default: "rancher/submariner-route-agent" default: "quay.io/submariner/submariner-route-agent"
description: "Submariner Route Agent Image Repository" description: "Submariner Route Agent Image Repository"
type: string type: string
label: Submariner Route Agent Image Repository label: Submariner Route Agent Image Repository
- variable: routeAgent.image.tag - variable: routeAgent.image.tag
default: "v0.0.2" default: "0.6.0"
description: "Submariner Route Agent Image Tag" description: "Submariner Route Agent Image Tag"
type: string type: string
label: Submariner Route Agent Image Tag label: Submariner Route Agent Image Tag
@@ -130,3 +130,9 @@ questions:
group: "Advanced Configuration" group: "Advanced Configuration"
description: "Enable Charon debug mode" description: "Enable Charon debug mode"
label: "Charon Enabled" label: "Charon Enabled"
- variable: submariner.cableDriver
type: string
default: ""
group: "Advanced Configuration"
description: "Cable driver implementation"
label: "Cable Driver"
+18
View File
@@ -63,3 +63,21 @@ Create the name of the submariner-globalnet service account to use
{{ default "default" .Values.serviceAccounts.globalnet.name }} {{ default "default" .Values.serviceAccounts.globalnet.name }}
{{- end -}} {{- end -}}
{{- 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 -}}
+67
View File
@@ -40,4 +40,71 @@ spec:
kind: Gateway kind: Gateway
plural: gateways plural: gateways
scope: Namespaced 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 -}} {{- end -}}
+5 -3
View File
@@ -13,7 +13,7 @@ spec:
selector: selector:
matchLabels: matchLabels:
app: {{ template "submariner.fullname" . }}-engine app: {{ template "submariner.fullname" . }}-engine
strategy: updateStrategy:
rollingUpdate: rollingUpdate:
maxUnavailable: 1 maxUnavailable: 1
type: RollingUpdate type: RollingUpdate
@@ -71,6 +71,8 @@ spec:
value: "{{ .Values.submariner.natEnabled }}" value: "{{ .Values.submariner.natEnabled }}"
- name: SUBMARINER_BROKER - name: SUBMARINER_BROKER
value: "{{ .Values.broker.type }}" value: "{{ .Values.broker.type }}"
- name: SUBMARINER_CABLEDRIVER
value: "{{ .Values.submariner.cableDriver }}"
{{- if eq .Values.broker.type "phpapi" }} {{- if eq .Values.broker.type "phpapi" }}
- name: BROKER_PHPAPI_PROTO - name: BROKER_PHPAPI_PROTO
value: "{{ .Values.broker.proto }}" value: "{{ .Values.broker.proto }}"
@@ -106,7 +108,7 @@ spec:
value: "{{ .Values.leadership.renewDeadline }}" value: "{{ .Values.leadership.renewDeadline }}"
- name: LEADERSHIP_RETRYPERIOD - name: LEADERSHIP_RETRYPERIOD
value: "{{ .Values.leadership.retryPeriod }}" value: "{{ .Values.leadership.retryPeriod }}"
image: {{ .Values.engine.image.repository }}:{{ .Values.engine.image.tag }} image: {{ .Values.engine.image.repository }}:{{ default .Chart.AppVersion .Values.engine.image.tag }}
imagePullPolicy: {{ .Values.engine.image.pullPolicy }} imagePullPolicy: {{ .Values.engine.image.pullPolicy }}
name: submariner name: submariner
resources: resources:
@@ -128,5 +130,5 @@ spec:
restartPolicy: Always restartPolicy: Always
schedulerName: default-scheduler schedulerName: default-scheduler
securityContext: {} securityContext: {}
terminationGracePeriodSeconds: 0 terminationGracePeriodSeconds: 1
serviceAccountName: {{ template "submariner.engineServiceAccountName" . }} serviceAccountName: {{ template "submariner.engineServiceAccountName" . }}
+7 -2
View File
@@ -13,6 +13,10 @@ spec:
selector: selector:
matchLabels: matchLabels:
app: {{ template "submariner.fullname" . }}-globalnet app: {{ template "submariner.fullname" . }}-globalnet
updateStrategy:
rollingUpdate:
maxUnavailable: 1
type: RollingUpdate
template: template:
metadata: metadata:
labels: labels:
@@ -21,17 +25,18 @@ spec:
hostNetwork: true hostNetwork: true
serviceAccountName: submariner-globalnet serviceAccountName: submariner-globalnet
serviceAccount: submariner-globalnet serviceAccount: submariner-globalnet
terminationGracePeriodSeconds: 2
nodeSelector: nodeSelector:
submariner.io/gateway: 'true' submariner.io/gateway: 'true'
containers: containers:
- name: {{ template "submariner.fullname" . }}-globalnet - name: {{ template "submariner.fullname" . }}-globalnet
image: {{ .Values.globalnet.image.repository }}:{{ .Values.globalnet.image.tag }} image: {{ .Values.globalnet.image.repository }}:{{ default .Chart.AppVersion .Values.globalnet.image.tag }}
imagePullPolicy: {{ .Values.globalnet.image.pullPolicy }} imagePullPolicy: {{ .Values.globalnet.image.pullPolicy }}
env: env:
- name: SUBMARINER_CLUSTERID - name: SUBMARINER_CLUSTERID
value: '{{ .Values.submariner.clusterId }}' value: '{{ .Values.submariner.clusterId }}'
- name: SUBMARINER_EXCLUDENS - name: SUBMARINER_EXCLUDENS
value: 'submariner,kube-system,operators' value: 'submariner-operator,kube-system,operators'
- name: SUBMARINER_NAMESPACE - name: SUBMARINER_NAMESPACE
value: '{{ .Release.Namespace }}' value: '{{ .Release.Namespace }}'
securityContext: securityContext:
@@ -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: |
clusterset.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 }}
+33
View File
@@ -109,5 +109,38 @@ subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: {{ template "submariner.globalnetServiceAccountName" . }} name: {{ template "submariner.globalnetServiceAccountName" . }}
namespace: {{ .Release.Namespace }} 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", "endpoints"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["discovery.k8s.io"]
resources: ["endpointslices"]
verbs: ["create", "get", "list", "watch", "update", "delete", "deletecollection"]
- 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 -}}
{{- end -}} {{- end -}}
+7 -3
View File
@@ -12,6 +12,10 @@ spec:
selector: selector:
matchLabels: matchLabels:
app: {{ template "submariner.fullname" . }}-routeagent app: {{ template "submariner.fullname" . }}-routeagent
updateStrategy:
rollingUpdate:
maxUnavailable: "100%"
type: RollingUpdate
template: template:
metadata: metadata:
labels: labels:
@@ -22,13 +26,13 @@ spec:
component: routeagent component: routeagent
spec: spec:
serviceAccountName: {{ template "submariner.routeAgentServiceAccountName" . }} serviceAccountName: {{ template "submariner.routeAgentServiceAccountName" . }}
terminationGracePeriodSeconds: 0 terminationGracePeriodSeconds: 1
hostNetwork: true hostNetwork: true
containers: containers:
- name: routeagent - name: routeagent
command: command:
- submariner-route-agent.sh - 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 }} imagePullPolicy: {{ .Values.routeAgent.image.pullPolicy }}
env: env:
- name: SUBMARINER_NAMESPACE - name: SUBMARINER_NAMESPACE
@@ -71,4 +75,4 @@ spec:
volumes: volumes:
- name: host-slash - name: host-slash
hostPath: hostPath:
path: / path: /
+12
View File
@@ -33,3 +33,15 @@ metadata:
chart: {{ template "submariner.chart" . }} chart: {{ template "submariner.chart" . }}
app: {{ template "submariner.name" . }} app: {{ template "submariner.name" . }}
{{- end }} {{- 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 }}
+25 -16
View File
@@ -8,6 +8,7 @@ submariner:
natEnabled: false natEnabled: false
colorCodes: blue colorCodes: blue
debug: false debug: false
serviceDiscovery: false
crd: crd:
create: true create: true
broker: broker:
@@ -25,38 +26,43 @@ ipsec:
ikePort: 500 ikePort: 500
natPort: 4500 natPort: 4500
leadership: leadership:
leaseDuration: 5 leaseDuration: 10
renewDeadline: 3 renewDeadline: 5
retryPeriod: 2 retryPeriod: 2
engine: engine:
image: image:
repository: rancher/submariner repository: quay.io/submariner/submariner
tag: v0.0.2 tag: ""
pullPolicy: Always pullPolicy: IfNotPresent
resources: {} resources: {}
# limits:
# cpu: 100m
# memory: 100Mi
nodeSelectorEnabled: true nodeSelectorEnabled: true
nodeSelector: {} nodeSelector: {}
tolerations: [] tolerations: []
affinity: {} affinity: {}
routeAgent: routeAgent:
image: image:
repository: rancher/submariner-route-agent repository: quay.io/submariner/submariner-route-agent
tag: v0.0.2 tag: ""
pullPolicy: Always pullPolicy: IfNotPresent
resources: {} resources: {}
# limits:
# cpu: 100m
# memory: 100Mi
nodeSelector: {} nodeSelector: {}
tolerations: [] tolerations: []
affinity: {} affinity: {}
globalnet: globalnet:
image: image:
repository: submariner-globalnet repository: quay.io/submariner/submariner-globalnet
tag: local 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 pullPolicy: IfNotPresent
serviceAccounts: serviceAccounts:
engine: engine:
@@ -68,3 +74,6 @@ serviceAccounts:
globalnet: globalnet:
create: false create: false
name: "" name: ""
lighthouse:
create: false
name: ""