Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make knative default #3403

Merged
merged 12 commits into from Apr 2, 2019
2 changes: 1 addition & 1 deletion docs/kyma/docs/04-03-cluster-installation.md
Expand Up @@ -26,7 +26,7 @@ This Installation guide shows developers how to quickly deploy Kyma on a [Google
```
gcloud container --project "$PROJECT" clusters \
create "$CLUSTER_NAME" --zone "europe-west1-b" \
--cluster-version "1.12.5" --machine-type "n1-standard-2" \
--cluster-version "1.12.5" --machine-type "n1-standard-4" \
--addons HorizontalPodAutoscaling,HttpLoadBalancing,KubernetesDashboard
```

Expand Down
10 changes: 1 addition & 9 deletions installation/cmd/run.ps1
@@ -1,25 +1,17 @@
param (
[string]$CR_PATH = "",
[switch]$SKIP_MINIKUBE_START = $false,
[switch]$KNATIVE = $false,
[string]$VM_DRIVER = "hyperv",
[string]$PASSWORD = ""
)

$CURRENT_DIR = Split-Path $MyInvocation.MyCommand.Path
$SCRIPTS_DIR = "${CURRENT_DIR}\..\scripts"
$DOMAIN = "kyma.local"
$INSTALLER_EXTRA_ARGS = ""
$MINIKUBE_EXTRA_ARGS = ""
$CREATE_CR_EXTRA_ARGS = ""

if ($KNATIVE -eq $true) {
$MINIKUBE_EXTRA_ARGS = "${MINIKUBE_EXTRA_ARGS} -memory 10240 -disk_size 30g"
$INSTALLER_EXTRA_ARGS = "${INSTALLER_EXTRA_ARGS} -knative"
}

if ($SKIP_MINIKUBE_START -eq $false) {
Invoke-Expression -Command "${SCRIPTS_DIR}\minikube.ps1 -vm_driver ${VM_DRIVER} -domain ${DOMAIN} ${MINIKUBE_EXTRA_ARGS}"
Invoke-Expression -Command "${SCRIPTS_DIR}\minikube.ps1 -vm_driver ${VM_DRIVER} -domain ${DOMAIN}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing " at the end

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will create a second PR for this. To unblock other tasks, I will merge it once the tests succeed.


if($LastExitCode -gt 0){
exit
Expand Down
16 changes: 2 additions & 14 deletions installation/cmd/run.sh
Expand Up @@ -36,10 +36,6 @@ do
shift
shift
;;
--knative)
KNATIVE="--knative"
shift
;;
--password)
checkInputParameterValue "$2"
ADMIN_PASSWORD="${2}"
Expand All @@ -58,16 +54,8 @@ do
done
set -- "${POSITIONAL[@]}" # restore positional parameters

MINIKUBE_EXTRA_ARGS=""

if [ -n "$KNATIVE" ]; then

MINIKUBE_EXTRA_ARGS="${MINIKUBE_EXTRA_ARGS} --memory 10240 --disk-size 30g"

fi

if [[ ! ${SKIP_MINIKUBE_START} ]]; then
bash ${SCRIPTS_DIR}/minikube.sh --domain "${DOMAIN}" --vm-driver "${VM_DRIVER}" ${MINIKUBE_EXTRA_ARGS}
bash ${SCRIPTS_DIR}/minikube.sh --domain "${DOMAIN}" --vm-driver "${VM_DRIVER}"
fi

bash ${SCRIPTS_DIR}/build-kyma-installer.sh --vm-driver "${VM_DRIVER}"
Expand All @@ -80,5 +68,5 @@ if [ -z "$CR_PATH" ]; then

fi

bash ${SCRIPTS_DIR}/installer.sh --local --cr "${CR_PATH}" "${KNATIVE}" --password "${ADMIN_PASSWORD}"
bash ${SCRIPTS_DIR}/installer.sh --local --cr "${CR_PATH}" --password "${ADMIN_PASSWORD}"
rm -rf $TMPDIR
10 changes: 1 addition & 9 deletions installation/scripts/installer.ps1
@@ -1,7 +1,6 @@
param (
[string]$CR_PATH = $null,
[switch]$LOCAL = $false,
[switch]$KNATIVE = $false
[switch]$LOCAL = $false
)

$CURRENT_DIR = Split-Path $MyInvocation.MyCommand.Path
Expand Down Expand Up @@ -31,13 +30,6 @@ if ($CR_PATH -ne "") {
$cmd = "kubectl.exe apply -f ${CR_PATH}"
Invoke-Expression -Command $cmd

if ($KNATIVE -eq $true) {
$cmd = @"
kubectl -n kyma-installer patch configmap installation-config-overrides -p '{\"data\": {\"global.knative\": \"true\", \"global.kymaEventBus\": \"false\", \"global.natsStreaming.clusterID\": \"knative-nats-streaming\"}}'
"@
Invoke-Expression -Command $cmd
}

$cmd = "kubectl.exe label installation/kyma-installation action=install"
Invoke-Expression -Command $cmd
}
8 changes: 0 additions & 8 deletions installation/scripts/installer.sh
Expand Up @@ -27,10 +27,6 @@ do
shift # past argument
shift # past value
;;
--knative)
KNATIVE=true
shift
;;
--password)
ADMIN_PASSWORD="$2"
shift
Expand Down Expand Up @@ -98,10 +94,6 @@ fi

kubectl apply -f - <<<"$COMBO_YAML"

if [ $KNATIVE ]; then
kubectl -n kyma-installer patch configmap installation-config-overrides -p '{"data": {"global.knative": "true", "global.kymaEventBus": "false", "global.natsStreaming.clusterID": "knative-nats-streaming"}}'
fi

echo -e "\nConfiguring sub-components"
bash ${CURRENT_DIR}/configure-components.sh

Expand Down
4 changes: 2 additions & 2 deletions installation/scripts/minikube.ps1
@@ -1,8 +1,8 @@
param (
[string]$VM_DRIVER = "hyperv",
[string]$DOMAIN = "kyma.local",
[string]$DISK_SIZE = "20g",
[string]$MEMORY = "8196"
[string]$DISK_SIZE = "30g",
[string]$MEMORY = "8192"
)

$CURRENT_DIR = Split-Path $MyInvocation.MyCommand.Path
Expand Down
2 changes: 1 addition & 1 deletion installation/scripts/minikube.sh
Expand Up @@ -11,7 +11,7 @@ MINIKUBE_VERSION=0.33.0
KUBERNETES_VERSION=1.12.5
KUBECTL_CLI_VERSION=1.12.0
VM_DRIVER=hyperkit
DISK_SIZE=20g
DISK_SIZE=30g
MEMORY=8192

source $CURRENT_DIR/utils.sh
Expand Down
1 change: 0 additions & 1 deletion resources/application-connector/values.yaml
Expand Up @@ -6,7 +6,6 @@ connection_token_handler:

global:
isLocalEnv: false
knative: false
namespace: kyma-integration
istio:
tls:
Expand Down
3 changes: 1 addition & 2 deletions resources/ark/values.yaml
Expand Up @@ -67,9 +67,8 @@ prometheus:

global:
isLocalEnv: false
knative: false
containerRegistry:
path: eu.gcr.io/kyma-project
ark_plugin:
dir: develop/
version: "52070221"
version: "52070221"
1 change: 0 additions & 1 deletion resources/cluster-essentials/values.yaml
@@ -1,6 +1,5 @@
global:
isLocalEnv: false
knative: false

containerRegistry:
path: eu.gcr.io/kyma-project
Expand Down
1 change: 0 additions & 1 deletion resources/core/values.yaml
Expand Up @@ -20,7 +20,6 @@ console:

global:
isLocalEnv: false
knative: false
containerRegistry:
path: eu.gcr.io/kyma-project
istio:
Expand Down
1 change: 0 additions & 1 deletion resources/dex/values.yaml
Expand Up @@ -18,7 +18,6 @@ dex:

global:
isLocalEnv: false
knative: false
gateway:
name: kyma-gateway
static_users_generator:
Expand Down
@@ -1,5 +1,9 @@
{{- define "publish-knative.name" -}}
{{- printf "%s-%s" .Release.Name "publish" | trunc 63 | trimSuffix "-" -}}
{{- printf "publish-knative" -}}
{{- end -}}

{{- define "publish-knative.fullname" -}}
{{- printf "%s-%s" .Release.Name "publish-knative" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{- define "publish-knative.labels.standard" -}}
Expand Down
@@ -1,7 +1,7 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{ template "publish-knative.name" . }}
name: {{ template "publish-knative.fullname" . }}
labels:
{{ include "publish-knative.labels.standard" . | indent 4 }}
spec:
Expand All @@ -10,6 +10,10 @@ spec:
{{ else }}
replicas: {{ .Values.replicaCount }}
{{ end }}
selector:
matchLabels:
app: {{ template "publish-knative.fullname" . }}
release: {{ .Release.Name }}
strategy:
type: RollingUpdate
rollingUpdate:
Expand All @@ -19,7 +23,7 @@ spec:
annotations:
sidecar.istio.io/inject: "true"
labels:
app: {{ template "publish-knative.name" . }}
app: {{ template "publish-knative.fullname" . }}
release: {{ .Release.Name }}
kyma-grafana: {{ .Values.monitoring.grafana}}
kyma-alerts: {{ .Values.monitoring.alerts}}
Expand Down
@@ -1,13 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "publish-knative.name" . }}
name: "event-bus-publish"
labels:
{{ include "publish-knative.labels.standard" . | indent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.port }}
selector:
app: {{ template "publish-knative.name" . }}
release: {{ .Release.Name }}
app: {{ template "publish-knative.fullname" . }}
release: {{ .Release.Name }}
4 changes: 0 additions & 4 deletions resources/event-bus/charts/publish/Chart.yaml

This file was deleted.

28 changes: 0 additions & 28 deletions resources/event-bus/charts/publish/templates/_helpers.tpl

This file was deleted.

72 changes: 0 additions & 72 deletions resources/event-bus/charts/publish/templates/deployment.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions resources/event-bus/charts/publish/templates/service.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions resources/event-bus/charts/publish/values.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions resources/event-bus/charts/push/Chart.yaml

This file was deleted.