diff --git a/local-debug.sh b/local-debug.sh index 87950bce29..9b4a6e38e6 100755 --- a/local-debug.sh +++ b/local-debug.sh @@ -72,7 +72,7 @@ echo "WATCH_NAMESPACE='${CHE_NAMESPACE}'" >> ${ENV_FILE} echo "[WARN] Make sure that your CR contains valid ingress domain!" -operator-sdk run --local --watch-namespace=${CHE_NAMESPACE} --enable-delve & +operator-sdk run --local --namespace ${CHE_NAMESPACE} --enable-delve & OPERATOR_SDK_PID=$! wait ${OPERATOR_SDK_PID} diff --git a/pkg/deploy/server/che_configmap.go b/pkg/deploy/server/che_configmap.go index 5139b584b7..3807f3785b 100644 --- a/pkg/deploy/server/che_configmap.go +++ b/pkg/deploy/server/che_configmap.go @@ -282,6 +282,15 @@ func GetCheConfigMapData(deployContext *deploy.DeployContext) (cheEnv map[string if err != nil { return nil, err } + if cheTLSSecret == nil { + return nil, fmt.Errorf("%s secret not found", deployContext.CheCluster.Spec.K8s.TlsSecretName) + } + if _, exists := cheTLSSecret.Data["tls.key"]; !exists { + return nil, fmt.Errorf("%s secret has no 'tls.key' key in data", deployContext.CheCluster.Spec.K8s.TlsSecretName) + } + if _, exists := cheTLSSecret.Data["tls.crt"]; !exists { + return nil, fmt.Errorf("%s secret has no 'tls.crt' key in data", deployContext.CheCluster.Spec.K8s.TlsSecretName) + } k8sCheEnv["CHE_INFRA_KUBERNETES_TLS__KEY"] = string(cheTLSSecret.Data["tls.key"]) k8sCheEnv["CHE_INFRA_KUBERNETES_TLS__CERT"] = string(cheTLSSecret.Data["tls.crt"]) }