Created
November 21, 2018 19:16
-
-
Save schrepfler/fd73fb7bd1cead0f1da1047ee3c8fa5f to your computer and use it in GitHub Desktop.
k8s lagom akka cluster descriptor yml
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
apiVersion: "apps/v1beta2" | |
kind: Deployment | |
metadata: | |
name: "contoso-v1-4-snapshot" | |
labels: | |
appName: "contoso" | |
appNameVersion: "contoso-v1-4-snapshot" | |
spec: | |
replicas: 3 | |
selector: | |
matchLabels: | |
appNameVersion: "contoso-v1-4-snapshot" | |
template: | |
metadata: | |
labels: | |
appName: "contoso" | |
appNameVersion: "contoso-v1-4-snapshot" | |
spec: | |
restartPolicy: Always | |
containers: | |
- name: "contoso" | |
image: "contoso-impl:1.4-SNAPSHOT" | |
imagePullPolicy: IfNotPresent | |
env: | |
- name: "RP_APP_NAME" | |
value: "contoso" | |
- name: "RP_APP_TYPE" | |
value: lagom | |
- name: "RP_APP_VERSION" | |
value: "1.4-SNAPSHOT" | |
- name: "RP_ENDPOINTS" | |
value: "HTTP,AKKA_REMOTE,AKKA_MGMT_HTTP" | |
- name: "RP_ENDPOINTS_COUNT" | |
value: "3" | |
- name: "RP_ENDPOINT_0_BIND_HOST" | |
valueFrom: | |
fieldRef: | |
fieldPath: "status.podIP" | |
- name: "RP_ENDPOINT_0_BIND_PORT" | |
value: "10000" | |
- name: "RP_ENDPOINT_0_HOST" | |
valueFrom: | |
fieldRef: | |
fieldPath: "status.podIP" | |
- name: "RP_ENDPOINT_0_PORT" | |
value: "10000" | |
- name: "RP_ENDPOINT_1_BIND_HOST" | |
valueFrom: | |
fieldRef: | |
fieldPath: "status.podIP" | |
- name: "RP_ENDPOINT_1_BIND_PORT" | |
value: "10001" | |
- name: "RP_ENDPOINT_1_HOST" | |
valueFrom: | |
fieldRef: | |
fieldPath: "status.podIP" | |
- name: "RP_ENDPOINT_1_PORT" | |
value: "10001" | |
- name: "RP_ENDPOINT_2_BIND_HOST" | |
valueFrom: | |
fieldRef: | |
fieldPath: "status.podIP" | |
- name: "RP_ENDPOINT_2_BIND_PORT" | |
value: "10002" | |
- name: "RP_ENDPOINT_2_HOST" | |
valueFrom: | |
fieldRef: | |
fieldPath: "status.podIP" | |
- name: "RP_ENDPOINT_2_PORT" | |
value: "10002" | |
- name: "RP_ENDPOINT_AKKA_MGMT_HTTP_BIND_HOST" | |
valueFrom: | |
fieldRef: | |
fieldPath: "status.podIP" | |
- name: "RP_ENDPOINT_AKKA_MGMT_HTTP_BIND_PORT" | |
value: "10002" | |
- name: "RP_ENDPOINT_AKKA_MGMT_HTTP_HOST" | |
valueFrom: | |
fieldRef: | |
fieldPath: "status.podIP" | |
- name: "RP_ENDPOINT_AKKA_MGMT_HTTP_PORT" | |
value: "10002" | |
- name: "RP_ENDPOINT_AKKA_REMOTE_BIND_HOST" | |
valueFrom: | |
fieldRef: | |
fieldPath: "status.podIP" | |
- name: "RP_ENDPOINT_AKKA_REMOTE_BIND_PORT" | |
value: "10001" | |
- name: "RP_ENDPOINT_AKKA_REMOTE_HOST" | |
valueFrom: | |
fieldRef: | |
fieldPath: "status.podIP" | |
- name: "RP_ENDPOINT_AKKA_REMOTE_PORT" | |
value: "10001" | |
- name: "RP_ENDPOINT_HTTP_BIND_HOST" | |
valueFrom: | |
fieldRef: | |
fieldPath: "status.podIP" | |
- name: "RP_ENDPOINT_HTTP_BIND_PORT" | |
value: "10000" | |
- name: "RP_ENDPOINT_HTTP_HOST" | |
valueFrom: | |
fieldRef: | |
fieldPath: "status.podIP" | |
- name: "RP_ENDPOINT_HTTP_PORT" | |
value: "10000" | |
- name: "RP_KUBERNETES_POD_IP" | |
valueFrom: | |
fieldRef: | |
fieldPath: "status.podIP" | |
- name: "RP_KUBERNETES_POD_NAME" | |
valueFrom: | |
fieldRef: | |
fieldPath: "metadata.name" | |
- name: "RP_MODULES" | |
value: "akka-cluster-bootstrapping,akka-management,common,play-http-binding,service-discovery,status" | |
- name: "RP_NAMESPACE" | |
valueFrom: | |
fieldRef: | |
fieldPath: "metadata.namespace" | |
- name: "RP_PLATFORM" | |
value: kubernetes | |
- name: "RP_APPLICATION_SECRET" | |
value: "change-this" | |
- name: "RP_CASSANDRA_URL" | |
value: "_cql._tcp.reactive-sandbox-cassandra.default.svc.cluster.local" | |
- name: "RP_KAFKA_URL" | |
value: "_broker._tcp.reactive-sandbox-kafka.default.svc.cluster.local" | |
- name: "JAVA_OPTS" | |
value: "-Xms128m -Xmx256m -Dconfig.resource=prod-application.conf -Dplay.http.secret.key=$(RP_APPLICATION_SECRET) -Dcom.lightbend.platform-tooling.service-discovery.external-service-addresses.cas_native.0=$(RP_CASSANDRA_URL) -Dcom.lightbend.platform-tooling.service-discovery.external-service-addresses.kafka_native.0=$(RP_KAFKA_URL)" | |
ports: | |
- name: http | |
containerPort: 10000 | |
- name: "akka-remote" | |
containerPort: 10001 | |
- name: "management" | |
containerPort: 10002 | |
volumeMounts: [] | |
readinessProbe: | |
httpGet: | |
path: "/platform-tooling/ready" | |
port: "management" | |
periodSeconds: 10 | |
initialDelaySeconds: 600 | |
livenessProbe: | |
httpGet: | |
path: "/platform-tooling/healthy" | |
port: "management" | |
periodSeconds: 10 | |
initialDelaySeconds: 600 | |
resources: | |
limits: | |
cpu: 0.2 | |
memory: 512Mi | |
requests: | |
cpu: 0.2 | |
memory: 512Mi | |
volumes: [] | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
labels: | |
appName: "contoso" | |
name: "contoso" | |
spec: | |
ports: | |
- name: http | |
port: 10000 | |
protocol: TCP | |
targetPort: 10000 | |
- name: "akka-remote" | |
port: 10001 | |
protocol: TCP | |
targetPort: 10001 | |
- name: "management" | |
port: 10002 | |
protocol: TCP | |
targetPort: 10002 | |
selector: | |
appName: "contoso" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment