diff --git a/deploy/kubernetes/helm/che/custom-charts/che-devfile-registry/Chart.yaml b/deploy/kubernetes/helm/che/custom-charts/che-devfile-registry/Chart.yaml new file mode 100644 index 00000000000..cbf7a573d20 --- /dev/null +++ b/deploy/kubernetes/helm/che/custom-charts/che-devfile-registry/Chart.yaml @@ -0,0 +1,13 @@ +# +# Copyright (c) 2018 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# + +apiVersion: "v1" +name: "che-devfile-registry" +version: "0.0.1" +home: "https://github.com/eclipse/che-devfile-registry/" diff --git a/deploy/kubernetes/helm/che/custom-charts/che-devfile-registry/README.md b/deploy/kubernetes/helm/che/custom-charts/che-devfile-registry/README.md new file mode 100644 index 00000000000..4931d6bee03 --- /dev/null +++ b/deploy/kubernetes/helm/che/custom-charts/che-devfile-registry/README.md @@ -0,0 +1,3 @@ +# Che devfile Registry Helm Chart + +This Helm Chart install [Che](https://github.com/eclipse/che) devfile Registry. More information about Che devfile Registry can be found [here](https://github.com/eclipse/che-devfile-registry). \ No newline at end of file diff --git a/deploy/kubernetes/helm/che/custom-charts/che-devfile-registry/templates/deployment.yaml b/deploy/kubernetes/helm/che/custom-charts/che-devfile-registry/templates/deployment.yaml new file mode 100644 index 00000000000..e3d62f923e0 --- /dev/null +++ b/deploy/kubernetes/helm/che/custom-charts/che-devfile-registry/templates/deployment.yaml @@ -0,0 +1,61 @@ +# +# Copyright (c) 2018 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# + +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: che + component: devfile-registry + name: devfile-registry +spec: + replicas: 1 + revisionHistoryLimit: 2 + selector: + matchLabels: + app: che + component: devfile-registry + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + template: + metadata: + labels: + app: che + component: devfile-registry + spec: + containers: + - image: {{ .Values.cheDevfileRegistry.image }} + imagePullPolicy: {{ .Values.cheDevfileRegistry.imagePullPolicy }} + name: che-devfile-registry + ports: + - containerPort: 8080 + livenessProbe: + httpGet: + path: /devfiles/ + port: 8080 + scheme: HTTP + initialDelaySeconds: 30 + periodSeconds: 10 + timeoutSeconds: 3 + readinessProbe: + httpGet: + path: /devfiles/ + port: 8080 + scheme: HTTP + initialDelaySeconds: 3 + periodSeconds: 10 + timeoutSeconds: 3 + resources: + limits: + memory: {{ .Values.cheDevfileRegistry.memoryLimit }} + requests: + memory: {{ .Values.cheDevfileRegistry.memoryRequests }} diff --git a/deploy/kubernetes/helm/che/custom-charts/che-devfile-registry/templates/ingress.yaml b/deploy/kubernetes/helm/che/custom-charts/che-devfile-registry/templates/ingress.yaml new file mode 100644 index 00000000000..4736b8157ae --- /dev/null +++ b/deploy/kubernetes/helm/che/custom-charts/che-devfile-registry/templates/ingress.yaml @@ -0,0 +1,30 @@ +# +# Copyright (c) 2018 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# + +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: devfile-registry + annotations: + kubernetes.io/ingress.class: "nginx" +spec: + rules: + - host: {{ printf .Values.global.cheDevfileRegistryUrlFormat .Release.Namespace .Values.global.ingressDomain }} + http: + paths: + - path: / + backend: + serviceName: devfile-registry + servicePort: 8080 +{{- if .Values.global.tls.enabled }} + tls: + - hosts: + - {{ printf .Values.global.cheDevfileRegistryUrlFormat .Release.Namespace .Values.global.ingressDomain }} + secretName: {{ .Values.global.tls.secretName }} +{{- end -}} diff --git a/deploy/kubernetes/helm/che/custom-charts/che-devfile-registry/templates/service.yaml b/deploy/kubernetes/helm/che/custom-charts/che-devfile-registry/templates/service.yaml new file mode 100644 index 00000000000..9b2c8001dc4 --- /dev/null +++ b/deploy/kubernetes/helm/che/custom-charts/che-devfile-registry/templates/service.yaml @@ -0,0 +1,24 @@ +# +# Copyright (c) 2018 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# + +apiVersion: v1 +kind: Service +metadata: + labels: + app: che + component: devfile-registry + name: devfile-registry +spec: + ports: + - protocol: TCP + port: 8080 + targetPort: 8080 + selector: + app: che + component: devfile-registry diff --git a/deploy/kubernetes/helm/che/custom-charts/che-devfile-registry/values.yaml b/deploy/kubernetes/helm/che/custom-charts/che-devfile-registry/values.yaml new file mode 100644 index 00000000000..1d62adc5b87 --- /dev/null +++ b/deploy/kubernetes/helm/che/custom-charts/che-devfile-registry/values.yaml @@ -0,0 +1,14 @@ +# +# Copyright (c) 2018 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# + +cheDevfileRegistry: + image: quay.io/eclipse/che-devfile-registry:nightly + imagePullPolicy: Always + memoryLimit: 32Mi + memoryRequests: 16Mi diff --git a/deploy/kubernetes/helm/che/custom-charts/che-plugin-registry/Chart.yaml b/deploy/kubernetes/helm/che/custom-charts/che-plugin-registry/Chart.yaml new file mode 100644 index 00000000000..fc7ba3dc461 --- /dev/null +++ b/deploy/kubernetes/helm/che/custom-charts/che-plugin-registry/Chart.yaml @@ -0,0 +1,13 @@ +# +# Copyright (c) 2018 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# + +apiVersion: "v1" +name: "che-plugin-registry" +version: "0.0.1" +home: "https://github.com/eclipse/che-plugin-registry/" diff --git a/deploy/kubernetes/helm/che/custom-charts/che-plugin-registry/README.md b/deploy/kubernetes/helm/che/custom-charts/che-plugin-registry/README.md new file mode 100644 index 00000000000..b4cb9b109fa --- /dev/null +++ b/deploy/kubernetes/helm/che/custom-charts/che-plugin-registry/README.md @@ -0,0 +1,3 @@ +# Che Plugin Registry Helm Chart + +This Helm Chart install [Che](https://github.com/eclipse/che) Plugin Registry. More information about Che Plugin Registry can be found [here](https://github.com/eclipse/che-plugin-registry). \ No newline at end of file diff --git a/deploy/kubernetes/helm/che/custom-charts/che-plugin-registry/templates/deployment.yaml b/deploy/kubernetes/helm/che/custom-charts/che-plugin-registry/templates/deployment.yaml new file mode 100644 index 00000000000..3393e04ba6d --- /dev/null +++ b/deploy/kubernetes/helm/che/custom-charts/che-plugin-registry/templates/deployment.yaml @@ -0,0 +1,61 @@ +# +# Copyright (c) 2018 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# + +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: che + component: plugin-registry + name: plugin-registry +spec: + replicas: 1 + revisionHistoryLimit: 2 + selector: + matchLabels: + app: che + component: plugin-registry + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + template: + metadata: + labels: + app: che + component: plugin-registry + spec: + containers: + - image: {{ .Values.chePluginRegistry.image }} + imagePullPolicy: {{ .Values.chePluginRegistry.imagePullPolicy }} + name: che-plugin-registry + ports: + - containerPort: 8080 + livenessProbe: + httpGet: + path: /v3/plugins/ + port: 8080 + scheme: HTTP + initialDelaySeconds: 30 + periodSeconds: 10 + timeoutSeconds: 3 + readinessProbe: + httpGet: + path: /v3/plugins/ + port: 8080 + scheme: HTTP + initialDelaySeconds: 3 + periodSeconds: 10 + timeoutSeconds: 3 + resources: + limits: + memory: {{ .Values.chePluginRegistry.memoryLimit }} + requests: + memory: {{ .Values.chePluginRegistry.memoryRequests }} diff --git a/deploy/kubernetes/helm/che/custom-charts/che-plugin-registry/templates/ingress.yaml b/deploy/kubernetes/helm/che/custom-charts/che-plugin-registry/templates/ingress.yaml new file mode 100644 index 00000000000..d55c7cc60d1 --- /dev/null +++ b/deploy/kubernetes/helm/che/custom-charts/che-plugin-registry/templates/ingress.yaml @@ -0,0 +1,30 @@ +# +# Copyright (c) 2018 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# + +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: plugin-registry + annotations: + kubernetes.io/ingress.class: "nginx" +spec: + rules: + - host: {{ printf .Values.global.chePluginRegistryUrlFormat .Release.Namespace .Values.global.ingressDomain }} + http: + paths: + - path: / + backend: + serviceName: plugin-registry + servicePort: 8080 +{{- if .Values.global.tls.enabled }} + tls: + - hosts: + - {{ printf .Values.global.chePluginRegistryUrlFormat .Release.Namespace .Values.global.ingressDomain }} + secretName: {{ .Values.global.tls.secretName }} +{{- end -}} diff --git a/deploy/kubernetes/helm/che/custom-charts/che-plugin-registry/templates/service.yaml b/deploy/kubernetes/helm/che/custom-charts/che-plugin-registry/templates/service.yaml new file mode 100644 index 00000000000..4f0448ead5b --- /dev/null +++ b/deploy/kubernetes/helm/che/custom-charts/che-plugin-registry/templates/service.yaml @@ -0,0 +1,24 @@ +# +# Copyright (c) 2018 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# + +apiVersion: v1 +kind: Service +metadata: + labels: + app: che + component: plugin-registry + name: plugin-registry +spec: + ports: + - protocol: TCP + port: 8080 + targetPort: 8080 + selector: + app: che + component: plugin-registry diff --git a/deploy/kubernetes/helm/che/custom-charts/che-plugin-registry/values.yaml b/deploy/kubernetes/helm/che/custom-charts/che-plugin-registry/values.yaml new file mode 100644 index 00000000000..22df5a8faa1 --- /dev/null +++ b/deploy/kubernetes/helm/che/custom-charts/che-plugin-registry/values.yaml @@ -0,0 +1,14 @@ +# +# Copyright (c) 2018 Red Hat, Inc. +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# + +chePluginRegistry: + image: quay.io/eclipse/che-plugin-registry:nightly + imagePullPolicy: Always + memoryLimit: 32Mi + memoryRequests: 16Mi diff --git a/deploy/kubernetes/helm/che/requirements.yaml b/deploy/kubernetes/helm/che/requirements.yaml index 92a4ba9317f..18d686cfde4 100644 --- a/deploy/kubernetes/helm/che/requirements.yaml +++ b/deploy/kubernetes/helm/che/requirements.yaml @@ -8,6 +8,14 @@ # dependencies: + - name: che-devfile-registry + repository: file://./custom-charts/che-devfile-registry/ + version: 0.0.1 + condition: cheDevfileRegistry.deploy + - name: che-plugin-registry + repository: file://./custom-charts/che-plugin-registry/ + version: 0.0.1 + condition: chePluginRegistry.deploy - name: che-postgres repository: file://./custom-charts/che-postgres/ version: 1.0.0 diff --git a/deploy/kubernetes/helm/che/templates/configmap.yaml b/deploy/kubernetes/helm/che/templates/configmap.yaml index a43d9c4b929..d5aabc7adc6 100644 --- a/deploy/kubernetes/helm/che/templates/configmap.yaml +++ b/deploy/kubernetes/helm/che/templates/configmap.yaml @@ -85,12 +85,22 @@ data: {{- if .Values.workspaceDefaultRamLimit }} CHE_WORKSPACE_DEFAULT_MEMORY_LIMIT_MB: {{ .Values.workspaceDefaultRamLimit }} {{- end }} -{{- if and .Values.che .Values.che.workspace }} - {{- if .Values.che.workspace.devfileRegistryUrl }} - CHE_WORKSPACE_DEVFILE__REGISTRY__URL: {{ .Values.che.workspace.devfileRegistryUrl | quote}} +{{- if .Values.che.workspace.devfileRegistryUrl }} + CHE_WORKSPACE_DEVFILE__REGISTRY__URL: {{ .Values.che.workspace.devfileRegistryUrl | quote }} +{{- else if .Values.cheDevfileRegistry.deploy }} + {{- if .Values.global.tls.enabled }} + CHE_WORKSPACE_DEVFILE__REGISTRY__URL: https://{{ printf .Values.global.cheDevfileRegistryUrlFormat .Release.Namespace .Values.global.ingressDomain }} + {{- else }} + CHE_WORKSPACE_DEVFILE__REGISTRY__URL: http://{{ printf .Values.global.cheDevfileRegistryUrlFormat .Release.Namespace .Values.global.ingressDomain }} {{- end }} - {{- if .Values.che.workspace.pluginRegistryUrl }} - CHE_WORKSPACE_PLUGIN__REGISTRY__URL: {{ .Values.che.workspace.pluginRegistryUrl | quote}} +{{- end }} +{{- if .Values.che.workspace.pluginRegistryUrl }} + CHE_WORKSPACE_PLUGIN__REGISTRY__URL: {{ .Values.che.workspace.pluginRegistryUrl | quote }} +{{- else if .Values.chePluginRegistry.deploy }} + {{- if .Values.global.tls.enabled }} + CHE_WORKSPACE_PLUGIN__REGISTRY__URL: https://{{ printf .Values.global.chePluginRegistryUrlFormat .Release.Namespace .Values.global.ingressDomain }}/v3 + {{- else }} + CHE_WORKSPACE_PLUGIN__REGISTRY__URL: http://{{ printf .Values.global.chePluginRegistryUrlFormat .Release.Namespace .Values.global.ingressDomain }}/v3 {{- end }} {{- end }} {{- if .Values.workspaceSidecarDefaultRamLimit }} diff --git a/deploy/kubernetes/helm/che/values.yaml b/deploy/kubernetes/helm/che/values.yaml index 7bd1acb36c4..80f77d87189 100644 --- a/deploy/kubernetes/helm/che/values.yaml +++ b/deploy/kubernetes/helm/che/values.yaml @@ -66,12 +66,20 @@ global: runAsUser: 1724 fsGroup: 1724 postgresDebugLogs: false + cheDevfileRegistryUrlFormat: "devfile-registry-%s.%s" + chePluginRegistryUrlFormat: "plugin-registry-%s.%s" -che: {} -# workspace: +che: + workspace: {} # devfileRegistryUrl: "https://che-devfile-registry.openshift.io/" # pluginRegistryUrl: "https://che-plugin-registry.openshift.io/v3" +cheDevfileRegistry: + deploy: true + +chePluginRegistry: + deploy: true + prometheus: alertmanager: enabled: false