mirror of
https://github.com/submariner-io/submariner-charts.git
synced 2026-09-20 21:30:35 +00:00
Switch to Helm v3
This allows us to deploy v1 CRDs such as the upstream MCS API CRDs. Fixes: #47 Signed-off-by: Stephen Kitt <skitt@redhat.com>
This commit is contained in:
committed by
Miguel Angel Ajo Pelayo
parent
44374a709c
commit
5906cfb3dc
@@ -1,10 +1,16 @@
|
|||||||
FROM quay.io/submariner/shipyard-dapper-base:devel
|
FROM quay.io/submariner/shipyard-dapper-base:devel
|
||||||
|
|
||||||
ARG DAPPER_HOST_ARCH
|
ARG DAPPER_HOST_ARCH
|
||||||
|
ARG UPX_LEVEL=-5
|
||||||
ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH} \
|
ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH} \
|
||||||
DAPPER_ENV="REPO TAG QUAY_USERNAME QUAY_PASSWORD GITHUB_SHA MAKEFLAGS CLUSTERS_ARGS DEPLOY_ARGS E2E_ARGS RELEASE_ARGS" \
|
DAPPER_ENV="REPO TAG QUAY_USERNAME QUAY_PASSWORD GITHUB_SHA MAKEFLAGS CLUSTERS_ARGS DEPLOY_ARGS E2E_ARGS RELEASE_ARGS" \
|
||||||
DAPPER_SOURCE=/go/src/github.com/submariner-io/submariner-charts DAPPER_DOCKER_SOCKET=true
|
DAPPER_SOURCE=/go/src/github.com/submariner-io/submariner-charts DAPPER_DOCKER_SOCKET=true
|
||||||
ENV DAPPER_OUTPUT=${DAPPER_SOURCE}/output PATH=${DAPPER_SOURCE}/bin/:${PATH}
|
ENV DAPPER_OUTPUT=${DAPPER_SOURCE}/output PATH=${DAPPER_SOURCE}/bin/:${PATH}
|
||||||
|
ENV HELM_VERSION=v3.4.1
|
||||||
|
|
||||||
|
RUN curl "https://get.helm.sh/helm-${HELM_VERSION}-linux-${ARCH}.tar.gz" | tar -xzf - && \
|
||||||
|
mv linux-${ARCH}/helm /go/bin/ && chmod a+x /go/bin/helm && rm -rf linux-${ARCH} && \
|
||||||
|
find /go/bin -type f -executable -newercc /proc | xargs -r upx ${UPX_LEVEL}
|
||||||
|
|
||||||
WORKDIR ${DAPPER_SOURCE}
|
WORKDIR ${DAPPER_SOURCE}
|
||||||
|
|
||||||
|
|||||||
+6
-19
@@ -9,22 +9,8 @@ readonly SUBMARINER_PSK=$(LC_CTYPE=C tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w
|
|||||||
|
|
||||||
### Functions ###
|
### Functions ###
|
||||||
|
|
||||||
function install_helm() {
|
|
||||||
if kubectl -n kube-system rollout status deploy/tiller-deploy --timeout=3s > /dev/null 2>&1; then
|
|
||||||
echo "Helm already installed, skipping helm installation..."
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Installing helm..."
|
|
||||||
kubectl -n kube-system create serviceaccount tiller
|
|
||||||
kubectl create clusterrolebinding tiller --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
|
|
||||||
helm --kube-context "${cluster}" init --service-account tiller
|
|
||||||
kubectl -n kube-system rollout status deploy/tiller-deploy --timeout=30s
|
|
||||||
}
|
|
||||||
|
|
||||||
function deploytool_prereqs() {
|
function deploytool_prereqs() {
|
||||||
helm init --client-only
|
helm version
|
||||||
run_all_clusters install_helm
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setup_broker() {
|
function setup_broker() {
|
||||||
@@ -33,9 +19,9 @@ function setup_broker() {
|
|||||||
else
|
else
|
||||||
echo "Installing submariner broker..."
|
echo "Installing submariner broker..."
|
||||||
# shellcheck disable=SC2086 # Split on purpose
|
# shellcheck disable=SC2086 # Split on purpose
|
||||||
helm install ./submariner-k8s-broker \
|
helm install "${SUBMARINER_BROKER_NS}" ./submariner-k8s-broker \
|
||||||
|
--create-namespace \
|
||||||
--kube-context "${cluster}" \
|
--kube-context "${cluster}" \
|
||||||
--name "${SUBMARINER_BROKER_NS}" \
|
|
||||||
--namespace "${SUBMARINER_BROKER_NS}" \
|
--namespace "${SUBMARINER_BROKER_NS}" \
|
||||||
${deploytool_broker_args}
|
${deploytool_broker_args}
|
||||||
fi
|
fi
|
||||||
@@ -56,8 +42,9 @@ function helm_install_subm() {
|
|||||||
|
|
||||||
echo "Installing Submariner..."
|
echo "Installing Submariner..."
|
||||||
# shellcheck disable=SC2086 # Split on purpose
|
# shellcheck disable=SC2086 # Split on purpose
|
||||||
helm --kube-context "${cluster}" install ./submariner-operator \
|
helm --kube-context "${cluster}" install submariner-operator \
|
||||||
--name submariner-operator \
|
./submariner-operator \
|
||||||
|
--create-namespace \
|
||||||
--namespace "${SUBM_NS}" \
|
--namespace "${SUBM_NS}" \
|
||||||
--set ipsec.psk="${SUBMARINER_PSK}" \
|
--set ipsec.psk="${SUBMARINER_PSK}" \
|
||||||
--set broker.server="${submariner_broker_url}" \
|
--set broker.server="${submariner_broker_url}" \
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
{{- if .Values.crd.create -}}
|
|
||||||
apiVersion: apiextensions.k8s.io/v1beta1
|
apiVersion: apiextensions.k8s.io/v1beta1
|
||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
name: clusters.submariner.io
|
name: clusters.submariner.io
|
||||||
annotations:
|
|
||||||
"helm.sh/hook": crd-install
|
|
||||||
spec:
|
spec:
|
||||||
group: submariner.io
|
group: submariner.io
|
||||||
version: v1
|
version: v1
|
||||||
@@ -17,8 +14,6 @@ apiVersion: apiextensions.k8s.io/v1beta1
|
|||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
name: endpoints.submariner.io
|
name: endpoints.submariner.io
|
||||||
annotations:
|
|
||||||
"helm.sh/hook": crd-install
|
|
||||||
spec:
|
spec:
|
||||||
group: submariner.io
|
group: submariner.io
|
||||||
version: v1
|
version: v1
|
||||||
@@ -31,8 +26,6 @@ apiVersion: apiextensions.k8s.io/v1beta1
|
|||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
name: gateways.submariner.io
|
name: gateways.submariner.io
|
||||||
annotations:
|
|
||||||
"helm.sh/hook": crd-install
|
|
||||||
spec:
|
spec:
|
||||||
group: submariner.io
|
group: submariner.io
|
||||||
version: v1
|
version: v1
|
||||||
@@ -46,13 +39,10 @@ spec:
|
|||||||
description: High Availability Status of the Gateway
|
description: High Availability Status of the Gateway
|
||||||
JSONPath: .status.haStatus
|
JSONPath: .status.haStatus
|
||||||
---
|
---
|
||||||
{{- if .Values.submariner.serviceDiscovery }}
|
|
||||||
apiVersion: apiextensions.k8s.io/v1beta1
|
apiVersion: apiextensions.k8s.io/v1beta1
|
||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
name: multiclusterservices.lighthouse.submariner.io
|
name: multiclusterservices.lighthouse.submariner.io
|
||||||
annotations:
|
|
||||||
"helm.sh/hook": crd-install
|
|
||||||
spec:
|
spec:
|
||||||
group: lighthouse.submariner.io
|
group: lighthouse.submariner.io
|
||||||
version: v1
|
version: v1
|
||||||
@@ -81,8 +71,6 @@ apiVersion: apiextensions.k8s.io/v1beta1
|
|||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
name: serviceexports.lighthouse.submariner.io
|
name: serviceexports.lighthouse.submariner.io
|
||||||
annotations:
|
|
||||||
"helm.sh/hook": crd-install
|
|
||||||
spec:
|
spec:
|
||||||
group: lighthouse.submariner.io
|
group: lighthouse.submariner.io
|
||||||
version: v2alpha1
|
version: v2alpha1
|
||||||
@@ -96,8 +84,6 @@ apiVersion: apiextensions.k8s.io/v1beta1
|
|||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
name: serviceimports.lighthouse.submariner.io
|
name: serviceimports.lighthouse.submariner.io
|
||||||
annotations:
|
|
||||||
"helm.sh/hook": crd-install
|
|
||||||
spec:
|
spec:
|
||||||
group: lighthouse.submariner.io
|
group: lighthouse.submariner.io
|
||||||
version: v2alpha1
|
version: v2alpha1
|
||||||
@@ -111,8 +97,6 @@ apiVersion: apiextensions.k8s.io/v1
|
|||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
name: serviceexports.multicluster.x-k8s.io
|
name: serviceexports.multicluster.x-k8s.io
|
||||||
annotations:
|
|
||||||
"helm.sh/hook": crd-install
|
|
||||||
spec:
|
spec:
|
||||||
group: multicluster.x-k8s.io
|
group: multicluster.x-k8s.io
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
@@ -194,8 +178,6 @@ apiVersion: apiextensions.k8s.io/v1
|
|||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
name: serviceimports.multicluster.x-k8s.io
|
name: serviceimports.multicluster.x-k8s.io
|
||||||
annotations:
|
|
||||||
"helm.sh/hook": crd-install
|
|
||||||
spec:
|
spec:
|
||||||
group: multicluster.x-k8s.io
|
group: multicluster.x-k8s.io
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
@@ -340,5 +322,3 @@ spec:
|
|||||||
x-kubernetes-list-map-keys:
|
x-kubernetes-list-map-keys:
|
||||||
- cluster
|
- cluster
|
||||||
x-kubernetes-list-type: map
|
x-kubernetes-list-type: map
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
@@ -4,7 +4,6 @@ kind: CustomResourceDefinition
|
|||||||
metadata:
|
metadata:
|
||||||
name: submariners.submariner.io
|
name: submariners.submariner.io
|
||||||
annotations:
|
annotations:
|
||||||
"helm.sh/hook": crd-install
|
|
||||||
controller-gen.kubebuilder.io/version: v0.3.0
|
controller-gen.kubebuilder.io/version: v0.3.0
|
||||||
spec:
|
spec:
|
||||||
group: submariner.io
|
group: submariner.io
|
||||||
@@ -1,10 +1,7 @@
|
|||||||
{{- if .Values.crd.create -}}
|
|
||||||
apiVersion: apiextensions.k8s.io/v1beta1
|
apiVersion: apiextensions.k8s.io/v1beta1
|
||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
name: clusters.submariner.io
|
name: clusters.submariner.io
|
||||||
annotations:
|
|
||||||
"helm.sh/hook": crd-install
|
|
||||||
spec:
|
spec:
|
||||||
group: submariner.io
|
group: submariner.io
|
||||||
version: v1
|
version: v1
|
||||||
@@ -17,8 +14,6 @@ apiVersion: apiextensions.k8s.io/v1beta1
|
|||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
name: endpoints.submariner.io
|
name: endpoints.submariner.io
|
||||||
annotations:
|
|
||||||
"helm.sh/hook": crd-install
|
|
||||||
spec:
|
spec:
|
||||||
group: submariner.io
|
group: submariner.io
|
||||||
version: v1
|
version: v1
|
||||||
@@ -31,8 +26,6 @@ apiVersion: apiextensions.k8s.io/v1beta1
|
|||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
name: gateways.submariner.io
|
name: gateways.submariner.io
|
||||||
annotations:
|
|
||||||
"helm.sh/hook": crd-install
|
|
||||||
spec:
|
spec:
|
||||||
group: submariner.io
|
group: submariner.io
|
||||||
version: v1
|
version: v1
|
||||||
@@ -46,13 +39,10 @@ spec:
|
|||||||
description: High Availability Status of the Gateway
|
description: High Availability Status of the Gateway
|
||||||
JSONPath: .status.haStatus
|
JSONPath: .status.haStatus
|
||||||
---
|
---
|
||||||
{{- if .Values.submariner.serviceDiscovery }}
|
|
||||||
apiVersion: apiextensions.k8s.io/v1beta1
|
apiVersion: apiextensions.k8s.io/v1beta1
|
||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
name: multiclusterservices.lighthouse.submariner.io
|
name: multiclusterservices.lighthouse.submariner.io
|
||||||
annotations:
|
|
||||||
"helm.sh/hook": crd-install
|
|
||||||
spec:
|
spec:
|
||||||
group: lighthouse.submariner.io
|
group: lighthouse.submariner.io
|
||||||
version: v1
|
version: v1
|
||||||
@@ -81,8 +71,6 @@ apiVersion: apiextensions.k8s.io/v1beta1
|
|||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
name: serviceexports.lighthouse.submariner.io
|
name: serviceexports.lighthouse.submariner.io
|
||||||
annotations:
|
|
||||||
"helm.sh/hook": crd-install
|
|
||||||
spec:
|
spec:
|
||||||
group: lighthouse.submariner.io
|
group: lighthouse.submariner.io
|
||||||
version: v2alpha1
|
version: v2alpha1
|
||||||
@@ -96,8 +84,6 @@ apiVersion: apiextensions.k8s.io/v1beta1
|
|||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
name: serviceimports.lighthouse.submariner.io
|
name: serviceimports.lighthouse.submariner.io
|
||||||
annotations:
|
|
||||||
"helm.sh/hook": crd-install
|
|
||||||
spec:
|
spec:
|
||||||
group: lighthouse.submariner.io
|
group: lighthouse.submariner.io
|
||||||
version: v2alpha1
|
version: v2alpha1
|
||||||
@@ -111,8 +97,6 @@ apiVersion: apiextensions.k8s.io/v1
|
|||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
name: serviceexports.multicluster.x-k8s.io
|
name: serviceexports.multicluster.x-k8s.io
|
||||||
annotations:
|
|
||||||
"helm.sh/hook": crd-install
|
|
||||||
spec:
|
spec:
|
||||||
group: multicluster.x-k8s.io
|
group: multicluster.x-k8s.io
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
@@ -194,8 +178,6 @@ apiVersion: apiextensions.k8s.io/v1
|
|||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
name: serviceimports.multicluster.x-k8s.io
|
name: serviceimports.multicluster.x-k8s.io
|
||||||
annotations:
|
|
||||||
"helm.sh/hook": crd-install
|
|
||||||
spec:
|
spec:
|
||||||
group: multicluster.x-k8s.io
|
group: multicluster.x-k8s.io
|
||||||
scope: Namespaced
|
scope: Namespaced
|
||||||
@@ -340,5 +322,3 @@ spec:
|
|||||||
x-kubernetes-list-map-keys:
|
x-kubernetes-list-map-keys:
|
||||||
- cluster
|
- cluster
|
||||||
x-kubernetes-list-type: map
|
x-kubernetes-list-type: map
|
||||||
{{- end }}
|
|
||||||
{{- end -}}
|
|
||||||
Reference in New Issue
Block a user