diff --git a/src/deploy/k8s/deploy-scdf.sh b/src/deploy/k8s/deploy-scdf.sh index 0ef119b65d..45a3f8e048 100755 --- a/src/deploy/k8s/deploy-scdf.sh +++ b/src/deploy/k8s/deploy-scdf.sh @@ -196,8 +196,8 @@ kubectl apply --namespace "$NS" -f "$YAML_PATH/server-config.yaml" kubectl create --namespace "$NS" clusterrolebinding scdftestrole --clusterrole cluster-admin --user=system:serviceaccount:default:scdf-sa - -kubectl apply --namespace "$NS" -f "$YAML_PATH/skipper-config-$BROKER.yaml" +kubectl apply --namespace "$NS" -f "$YAML_PATH/${BROKER}-default-binder.yaml" +kubectl apply --namespace "$NS" -f "$YAML_PATH/skipper-config.yaml" cat "$YAML_PATH/skipper-deployment.yaml" | envsubst '$DATAFLOW_VERSION,$SKIPPER_VERSION,$DATABASE' | kubectl create --namespace "$NS" -f - kubectl create --namespace "$NS" -f "$YAML_PATH/skipper-svc.yaml" diff --git a/src/deploy/k8s/yaml/rabbit-default-binder.yaml b/src/deploy/k8s/yaml/rabbit-default-binder.yaml new file mode 100644 index 0000000000..81c66bb9f5 --- /dev/null +++ b/src/deploy/k8s/yaml/rabbit-default-binder.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: Secret +metadata: + name: default-binder +type: Opaque +stringData: + spring.cloud.stream.rabbit.binder.nodes[0]: 'rabbitmq:5672' + diff --git a/src/deploy/k8s/yaml/server-config.yaml b/src/deploy/k8s/yaml/server-config.yaml index 7eb79d1057..db88479c46 100644 --- a/src/deploy/k8s/yaml/server-config.yaml +++ b/src/deploy/k8s/yaml/server-config.yaml @@ -40,6 +40,10 @@ data: kubernetes: accounts: default: + secretRefs: + - scdf-datasource + configMapRefs: + - scdf-datasource environmentVariables: 'JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=-1' imagePullPolicy: IfNotPresent imagePullSecret: registry-key diff --git a/src/deploy/k8s/yaml/server-deployment.yaml b/src/deploy/k8s/yaml/server-deployment.yaml index a19b4d916a..d64b190526 100644 --- a/src/deploy/k8s/yaml/server-deployment.yaml +++ b/src/deploy/k8s/yaml/server-deployment.yaml @@ -85,51 +85,6 @@ spec: # Provide the Skipper service location - name: SPRING_CLOUD_SKIPPER_CLIENT_SERVER_URI value: 'http://${SKIPPER_SERVICE_HOST}:${SKIPPER_SERVICE_PORT}/api' - - name: SPRING_DATASOURCE_USERNAME - valueFrom: - secretKeyRef: - key: SPRING_DATASOURCE_USERNAME - name: scdf-datasource - - name: SPRING_DATASOURCE_PASSWORD - valueFrom: - secretKeyRef: - key: SPRING_DATASOURCE_PASSWORD - name: scdf-datasource - - name: SPRING_DATASOURCE_URL - valueFrom: - configMapKeyRef: - key: SPRING_DATASOURCE_URL - name: scdf-datasource - - name: SPRING_DATASOURCE_DRIVER_CLASS_NAME - valueFrom: - configMapKeyRef: - key: SPRING_DATASOURCE_DRIVER_CLASS_NAME - name: scdf-datasource - - name: SPRING_DATASOURCE_TEST_ON_BORROW - valueFrom: - configMapKeyRef: - key: SPRING_DATASOURCE_TEST_ON_BORROW - name: scdf-datasource - - name: SPRING_DATASOURCE_VALIDATION_QUERY - valueFrom: - configMapKeyRef: - key: SPRING_DATASOURCE_VALIDATION_QUERY - name: scdf-datasource - - name: 'SPRING_DATASOURCE_HIKARI_DATA_SOURCE_PROPERTIES_USE_UNICODE' - valueFrom: - configMapKeyRef: - key: 'SPRING_DATASOURCE_HIKARI_DATA_SOURCE_PROPERTIES_USE_UNICODE' - name: 'scdf-datasource' - - name: SPRING_DATASOURCE_HIKARI_DATA_SOURCE_PROPERTIES_CHARACTER_ENCODING - valueFrom: - configMapKeyRef: - key: SPRING_DATASOURCE_HIKARI_DATA_SOURCE_PROPERTIES_CHARACTER_ENCODING - name: scdf-datasource - - name: SPRING_JPA_DATABASE_PLATFORM - valueFrom: - configMapKeyRef: - key: SPRING_JPA_DATABASE_PLATFORM - name: scdf-datasource - name: 'MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLED' value: 'true' - name: 'MANAGEMENT_METRICS_EXPORT_PROMETHEUS_RSOCKET_ENABLED' diff --git a/src/deploy/k8s/yaml/skipper-config-rabbit.yaml b/src/deploy/k8s/yaml/skipper-config-rabbit.yaml deleted file mode 100644 index 7891e71174..0000000000 --- a/src/deploy/k8s/yaml/skipper-config-rabbit.yaml +++ /dev/null @@ -1,48 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: skipper - labels: - app: skipper -data: - application-kubernetes.yaml: |- - logging: - level: - root: info - org.springframework: debug - io.fabric8: debug - spring: - output: - ansi: - enabled: NEVER - cloud: - deployer: - kubernetes: - imagePullPolicy: IfNotPresent - imagePullSecret: - -name: registry-key - skipper: - server: - platform: - kubernetes: - accounts: - default: - imagePullPolicy: IfNotPresent - imagePullSecret: - -name: registry-key - environmentVariables: 'JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=-1,LANG=en_US.utf8,LC_ALL=en_US.utf8,JDK_JAVA_OPTIONS=-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8,SPRING_CLOUD_CONFIG_ENABLED=false,SPRING_RABBITMQ_HOST=${RABBITMQ_SERVICE_HOST},SPRING_RABBITMQ_PORT=${RABBITMQ_SERVICE_PORT}' - request: - memory: 1024Mi - cpu: 1500m - readinessProbeDelay: 1 - readinessProbeTimeout: 5 - livenessProbeDelay: 1 - livenessProbeTimeout: 2 - startupProbeDelay: 20 - startupProbeTimeout: 5 - startupProbeFailure: 50 - management: - defaults: - metrics: - export: - enabled: false diff --git a/src/deploy/k8s/yaml/skipper-config-kafka.yaml b/src/deploy/k8s/yaml/skipper-config.yaml similarity index 86% rename from src/deploy/k8s/yaml/skipper-config-kafka.yaml rename to src/deploy/k8s/yaml/skipper-config.yaml index 99e06b3a50..98b8a8217b 100644 --- a/src/deploy/k8s/yaml/skipper-config-kafka.yaml +++ b/src/deploy/k8s/yaml/skipper-config.yaml @@ -27,10 +27,15 @@ data: kubernetes: accounts: default: + secretRefs: + - default-binder + - scdf-datasource + configMapRefs: + - scdf-datasource imagePullPolicy: IfNotPresent imagePullSecret: - name: registry-key - environmentVariables: 'JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=-1,LANG=en_US.utf8,LC_ALL=en_US.utf8,JDK_JAVA_OPTIONS=-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8,SPRING_CLOUD_CONFIG_ENABLED=false,SPRING_CLOUD_STREAM_KAFKA_BINDER_BROKERS=kafka-broker:9092,SPRING_CLOUD_STREAM_KAFKA_BINDER_ZK_NODES=${KAFKA_ZK_SERVICE_HOST}:${KAFKA_ZK_SERVICE_PORT}' + environmentVariables: 'JAVA_TOOL_OPTIONS=-XX:ActiveProcessorCount=-1,LANG=en_US.utf8,LC_ALL=en_US.utf8,JDK_JAVA_OPTIONS=-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8,SPRING_CLOUD_CONFIG_ENABLED=false' request: memory: 1024Mi cpu: 1500m diff --git a/src/deploy/k8s/yaml/skipper-deployment.yaml b/src/deploy/k8s/yaml/skipper-deployment.yaml index 95be4d114e..87b31c4278 100644 --- a/src/deploy/k8s/yaml/skipper-deployment.yaml +++ b/src/deploy/k8s/yaml/skipper-deployment.yaml @@ -72,51 +72,6 @@ spec: value: 'false' - name: SPRING_CLOUD_KUBERNETES_SECRETS_PATHS value: /etc/secrets - - name: SPRING_DATASOURCE_USERNAME - valueFrom: - secretKeyRef: - key: SPRING_DATASOURCE_USERNAME - name: scdf-datasource - - name: SPRING_DATASOURCE_PASSWORD - valueFrom: - secretKeyRef: - key: SPRING_DATASOURCE_PASSWORD - name: scdf-datasource - - name: SPRING_DATASOURCE_URL - valueFrom: - configMapKeyRef: - key: SPRING_DATASOURCE_URL - name: scdf-datasource - - name: SPRING_DATASOURCE_DRIVER_CLASS_NAME - valueFrom: - configMapKeyRef: - key: SPRING_DATASOURCE_DRIVER_CLASS_NAME - name: scdf-datasource - - name: SPRING_DATASOURCE_TEST_ON_BORROW - valueFrom: - configMapKeyRef: - key: SPRING_DATASOURCE_TEST_ON_BORROW - name: scdf-datasource - - name: SPRING_DATASOURCE_VALIDATION_QUERY - valueFrom: - configMapKeyRef: - key: SPRING_DATASOURCE_VALIDATION_QUERY - name: scdf-datasource - - name: SPRING_DATASOURCE_HIKARI_DATA_SOURCE_PROPERTIES_USE_UNICODE - valueFrom: - configMapKeyRef: - key: SPRING_DATASOURCE_HIKARI_DATA_SOURCE_PROPERTIES_USE_UNICODE - name: scdf-datasource - - name: SPRING_DATASOURCE_HIKARI_DATA_SOURCE_PROPERTIES_CHARACTER_ENCODING - valueFrom: - configMapKeyRef: - key: SPRING_DATASOURCE_HIKARI_DATA_SOURCE_PROPERTIES_CHARACTER_ENCODING - name: scdf-datasource - - name: SPRING_JPA_DATABASE_PLATFORM - valueFrom: - configMapKeyRef: - key: SPRING_JPA_DATABASE_PLATFORM - name: scdf-datasource - name: MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLED value: 'true' - name: MANAGEMENT_METRICS_EXPORT_PROMETHEUS_RSOCKET_ENABLED