From 925554d4e42f25b763324e3ea11a4d89f5dfb282 Mon Sep 17 00:00:00 2001 From: sido Date: Mon, 25 Jun 2018 15:11:29 +0200 Subject: [PATCH] nexus added --- .../httpd-deployment.yaml => deployment.yaml} | 22 +++++++----- .../deployment/nexus-deployment.yaml | 32 ----------------- nexus/v1.0.0/templates/ingress.yaml | 34 ++++++++++++++++--- .../httpd-service.yaml => service.yaml} | 12 +++---- .../templates/services/nexus-service.yaml | 15 -------- nexus/v1.0.0/values.yaml | 10 ++---- 6 files changed, 51 insertions(+), 74 deletions(-) rename nexus/v1.0.0/templates/{deployment/httpd-deployment.yaml => deployment.yaml} (59%) delete mode 100644 nexus/v1.0.0/templates/deployment/nexus-deployment.yaml rename nexus/v1.0.0/templates/{services/httpd-service.yaml => service.yaml} (50%) delete mode 100644 nexus/v1.0.0/templates/services/nexus-service.yaml diff --git a/nexus/v1.0.0/templates/deployment/httpd-deployment.yaml b/nexus/v1.0.0/templates/deployment.yaml similarity index 59% rename from nexus/v1.0.0/templates/deployment/httpd-deployment.yaml rename to nexus/v1.0.0/templates/deployment.yaml index 96a6b60..b83dfeb 100644 --- a/nexus/v1.0.0/templates/deployment/httpd-deployment.yaml +++ b/nexus/v1.0.0/templates/deployment.yaml @@ -2,28 +2,34 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: creationTimestamp: null - name: httpd + name: nexus labels: - app: httpd + app: nexus + environment: production spec: replicas: 1 strategy: {} template: metadata: labels: - app: httpd + app: nexus creationTimestamp: null spec: containers: - - env: + - name: httpd + image: registry.webhosting.rug.nl/molgenis/httpd:lts + env: - name: PROXY_SERVICE value: nexus:8081,nexus:5000:v2 - name: SERVER_NAME - value: httpd:80 - image: registry.webhosting.rug.nl/molgenis/httpd:lts - name: httpd + value: registry.molgenis.org ports: - containerPort: 80 resources: {} - restartPolicy: Always + restartPolicy: Always + - name: nexus + image: sonatype/nexus:latest + ports: + - containerPort: 8081 + - containerPort: 5000 status: {} diff --git a/nexus/v1.0.0/templates/deployment/nexus-deployment.yaml b/nexus/v1.0.0/templates/deployment/nexus-deployment.yaml deleted file mode 100644 index 675b68f..0000000 --- a/nexus/v1.0.0/templates/deployment/nexus-deployment.yaml +++ /dev/null @@ -1,32 +0,0 @@ -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - creationTimestamp: null - name: nexus -spec: - replicas: 1 - strategy: - type: Recreate - template: - metadata: - labels: - app: httpd - creationTimestamp: null - spec: - containers: - - image: sonatype/nexus3:latest - name: nexus - ports: - - containerPort: 8081 - - containerPort: 5000 - resources: {} - volumeMounts: - - mountPath: /nexus-data - name: molgenis-nexus-data - restartPolicy: Always - volumes: - - name: molgenis-nexus-data - persistentVolumeClaim: - claimName: molgenis-nexus-data -status: {} - diff --git a/nexus/v1.0.0/templates/ingress.yaml b/nexus/v1.0.0/templates/ingress.yaml index 2501f83..77c227c 100644 --- a/nexus/v1.0.0/templates/ingress.yaml +++ b/nexus/v1.0.0/templates/ingress.yaml @@ -1,12 +1,36 @@ +{{- if .Values.ingress.enabled }} +{{- range .Values.ingress.hosts }} apiVersion: extensions/v1beta1 kind: Ingress metadata: - name: ingress-nexus + name: "{{ $.Release.Name }}-ingress" + labels: + app: {{ template "nexus.fullname" $ }} + chart: "{{ $.Chart.Name }}-{{ $.Chart.Version }}" + release: "{{ $.Release.Name }}" + heritage: "{{ $.Release.Service }}" + annotations: + {{- if .tls }} + ingress.kubernetes.io/secure-backends: "true" + {{- end }} + {{- range $key, $value := .annotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} spec: rules: - - host: registry.molgenis.org + - host: {{ .name }} http: paths: - - backend: - serviceName: httpd - servicePort: 80 \ No newline at end of file + - path: {{ default "/" .path }} + backend: + serviceName: {{ template "nexus.fullname" $ }} + servicePort: 80 +{{- if .tls }} + tls: + - hosts: + - {{ .name }} + secretName: {{ .tlsSecret }} +{{- end }} +--- +{{- end }} +{{- end }} \ No newline at end of file diff --git a/nexus/v1.0.0/templates/services/httpd-service.yaml b/nexus/v1.0.0/templates/service.yaml similarity index 50% rename from nexus/v1.0.0/templates/services/httpd-service.yaml rename to nexus/v1.0.0/templates/service.yaml index 3a7f457..96bb41a 100644 --- a/nexus/v1.0.0/templates/services/httpd-service.yaml +++ b/nexus/v1.0.0/templates/service.yaml @@ -1,19 +1,19 @@ apiVersion: v1 kind: Service metadata: - name: {{ template "httpd.fullname" . }} + name: {{ template "nexus.fullname" . }} labels: - app: {{ template "httpd.name" . }} - chart: {{ template "httpd.chart" . }} + app: {{ template "nexus.name" . }} + chart: {{ template "nexus.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} spec: - type: {{ .Values.httpd.type }} + type: {{ .Values.service.type }} ports: - - port: {{ .Values.httpd.port }} + - port: {{ .Values.service.port }} targetPort: http protocol: TCP name: http selector: - app: {{ template "httpd.name" . }} + app: {{ template "nexus.name" . }} release: {{ .Release.Name }} diff --git a/nexus/v1.0.0/templates/services/nexus-service.yaml b/nexus/v1.0.0/templates/services/nexus-service.yaml deleted file mode 100644 index 14b56cb..0000000 --- a/nexus/v1.0.0/templates/services/nexus-service.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - creationTimestamp: null - name: nexus - labels: - app: nexus -spec: - ports: - - name: "ui" - port: 8081 - - name: "docker" - port: 5000 - selector: - app: nexus diff --git a/nexus/v1.0.0/values.yaml b/nexus/v1.0.0/values.yaml index ca02061..c1d3406 100644 --- a/nexus/v1.0.0/values.yaml +++ b/nexus/v1.0.0/values.yaml @@ -7,17 +7,11 @@ replicaCount: 1 image: repository: sonatype/nexus3 tag: stable - pullPolicy: IfNotPresent + pullPolicy: Always -httpd: - name: httpd +service: type: ClusterIP port: 80 - proxy: httpd:80:/ - -nexus: - name: nexus - type: ClusterIP ingress: enabled: true