-
-
Save Efrat19/9a428d3730f859e2bf43c7b98587737a to your computer and use it in GitHub Desktop.
external-hosts chart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ range $name, $external := .Values.externalNames }} | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: {{ $name }} | |
labels: | |
{{ include "external-hosts.labels" $ | indent 4 }} | |
spec: | |
type: ExternalName | |
externalName: {{ $external }} | |
{{ end }} | |
{{ range .Values.headless }} | |
--- | |
kind: Endpoints | |
apiVersion: v1 | |
metadata: | |
name: {{ .host }} | |
labels: | |
{{ include "external-hosts.labels" $ | indent 4 }} | |
subsets: | |
- addresses: | |
- ip: {{ .ip }} | |
ports: | |
{{ range .ports }} | |
- name: {{ . | quote}} | |
port: {{ . }} | |
{{ end }} | |
{{ end }} | |
{{ range .Values.headless }} | |
--- | |
kind: Service | |
apiVersion: v1 | |
metadata: | |
name: {{ .host }} | |
labels: | |
{{ include "external-hosts.labels" $ | indent 4 }} | |
spec: | |
ports: | |
{{ range .ports }} | |
- name: {{ . | quote }} | |
port: {{ . }} | |
targetPort: {{ . }} | |
{{ end }} | |
{{ end }} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
externalNames: | |
mysql: face-db.bis650gy3b0g.us-east-2.rds.amazonaws.com | |
headless: | |
- host: face-rabbitmq | |
ip: "10.0.234.56" | |
ports: | |
- 3306 | |
- host: face-postgres | |
ip: "10.0.234.57" | |
ports: | |
- 3306 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment