From f1c83cf0c02d8976419cf51bfe89bc1697f3f144 Mon Sep 17 00:00:00 2001 From: sido Date: Mon, 25 Jun 2018 16:25:13 +0200 Subject: [PATCH] multiple services to allow communication between pods --- ...{deployment.yaml => httpd-deployment.yaml} | 9 ++----- nexus/v1.0.0/templates/httpd-service.yaml | 12 ++++++++++ nexus/v1.0.0/templates/nexus-deployment.yaml | 24 +++++++++++++++++++ nexus/v1.0.0/templates/nexus-service.yaml | 13 ++++++++++ nexus/v1.0.0/templates/service.yaml | 19 --------------- 5 files changed, 51 insertions(+), 26 deletions(-) rename nexus/v1.0.0/templates/{deployment.yaml => httpd-deployment.yaml} (77%) create mode 100644 nexus/v1.0.0/templates/httpd-service.yaml create mode 100644 nexus/v1.0.0/templates/nexus-deployment.yaml create mode 100644 nexus/v1.0.0/templates/nexus-service.yaml delete mode 100644 nexus/v1.0.0/templates/service.yaml diff --git a/nexus/v1.0.0/templates/deployment.yaml b/nexus/v1.0.0/templates/httpd-deployment.yaml similarity index 77% rename from nexus/v1.0.0/templates/deployment.yaml rename to nexus/v1.0.0/templates/httpd-deployment.yaml index 8af9e79..970988c 100644 --- a/nexus/v1.0.0/templates/deployment.yaml +++ b/nexus/v1.0.0/templates/httpd-deployment.yaml @@ -12,7 +12,7 @@ spec: template: metadata: labels: - app: nexus + app: httpd creationTimestamp: null spec: restartPolicy: Always @@ -26,9 +26,4 @@ spec: value: registry.molgenis.org ports: - containerPort: 80 - resources: {} - - name: nexus - image: sonatype/nexus:latest - ports: - - containerPort: 8081 - - containerPort: 5000 + resources: {} \ No newline at end of file diff --git a/nexus/v1.0.0/templates/httpd-service.yaml b/nexus/v1.0.0/templates/httpd-service.yaml new file mode 100644 index 0000000..f761fba --- /dev/null +++ b/nexus/v1.0.0/templates/httpd-service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: httpd + labels: + app: httpd +spec: + type: NodePort + ports: + - port: 80 + selector: + app: httpd diff --git a/nexus/v1.0.0/templates/nexus-deployment.yaml b/nexus/v1.0.0/templates/nexus-deployment.yaml new file mode 100644 index 0000000..5792230 --- /dev/null +++ b/nexus/v1.0.0/templates/nexus-deployment.yaml @@ -0,0 +1,24 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + creationTimestamp: null + name: nexus + labels: + app: nexus + environment: production +spec: + replicas: 1 + strategy: {} + template: + metadata: + labels: + app: nexus + creationTimestamp: null + spec: + restartPolicy: Always + containers: + - name: nexus + image: sonatype/nexus:latest + ports: + - containerPort: 8081 + - containerPort: 5000 diff --git a/nexus/v1.0.0/templates/nexus-service.yaml b/nexus/v1.0.0/templates/nexus-service.yaml new file mode 100644 index 0000000..3b66c21 --- /dev/null +++ b/nexus/v1.0.0/templates/nexus-service.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: nexus + labels: + app: nexus +spec: + type: ClusterIP + ports: + - port: 8081 + - port: 5000 + selector: + app: nexus diff --git a/nexus/v1.0.0/templates/service.yaml b/nexus/v1.0.0/templates/service.yaml deleted file mode 100644 index 96bb41a..0000000 --- a/nexus/v1.0.0/templates/service.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "nexus.fullname" . }} - labels: - app: {{ template "nexus.name" . }} - chart: {{ template "nexus.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - selector: - app: {{ template "nexus.name" . }} - release: {{ .Release.Name }}