Convert docker compose files to basic kubernetes manifests for dev use (#127)

* Generate k8s manifests from compose.
This commit is contained in:
Rob Holland
2022-07-27 11:27:31 +01:00
committed by GitHub
parent dcf4a68eb8
commit 7c0681875f
17 changed files with 2219 additions and 0 deletions

70
KUBERNETES.md Normal file
View File

@@ -0,0 +1,70 @@
# Temporal Server Kubernetes manifests
This repository provides Kubernetes manifests that enable you to run a development version of the Temporal Server.
There are a variety of manifest folders, each setup to utilize a different set of dependencies.
## Prerequisites
To use these manifests, you must first have a Kubernetes cluster setup. If you'd just like to try this locally without using a Kubernetes cluster setup in the cloud then tools like `minikube`, `kind` or Docker Desktop's built-in kubernetes setup will all work just fine to create a cluster you can use for exploring Temporal.
You must have `kubectl` configured and be able to succesfully run commands like `kubectl get pods` to be able to follow the examples in this document.
## How to use
The following command will run a developer setup of the Temporal Server and its default dependencies in the `temporal` namespace in your Kubernetes cluster:
```bash
kubectl create namespace temporal
kubectl apply -n temporal -R -f https://raw.githubusercontent.com/temporalio/docker-compose/main/k8s/temporal.yaml
```
You can check to see when everything is up and running using `kubectl get pods -n temporal` and checking that all pods are showing `STATUS` as `RUNNING`.
```bash
kubectl get pods -n temporal
```
Once everything is up you can open the Temporal Web UI in your browser. You can use port forwarding to be able to reach the Temporal Web UI from your workstation using the `kubectl port-forward ...` command. Leave this running in a terminal window and then visit [http://localhost:8088](http://localhost:8088) in your browser.
```bash
kubectl port-forward -n temporal services/temporal-web 8088:8088
```
You can also interact with the Server using a preconfigured CLI (tctl).
First create an alias for `tctl`:
```bash
alias tctl="kubectl exec -n temporal deployment/temporal-admin-tools -- tctl"
```
The following is an example of how to register a new namespace `test-namespace` with 1 day of retention:
```bash
tctl --ns test-namespace namespace register -rd 1
```
You can find our `tctl` docs on [docs.temporal.io](https://docs.temporal.io/docs/system-tools/tctl/).
Get started building Workflows with a [Go sample](https://github.com/temporalio/samples-go), [Java sample](https://github.com/temporalio/samples-java), or write your own using one of the [SDKs](https://docs.temporal.io/docs/sdks-introduction).
### Other manifest sets
The manifests set at `k8s/temporal-default` installs a PostgreSQL database, an Elasticsearch instance and Temporal Server.
The other manifest directories in the repo spin up instances of the Temporal Server using different databases and dependencies.
For example you can run the Temporal Server with MySQL and Elastic Search with this command:
```bash
kubectl create namespace temporal
kubectl apply -n temporal -R -f https://raw.githubusercontent.com/temporalio/docker-compose/main/k8s/temporal-mysql-es.yaml
```
Here is a list of available manifest sets and the dependencies they install.
| Directory | Description |
|------------------------------------| -------------------------------------- |
| k8s/temporal-default | PostgreSQL and Elasticsearch |
| k8s/temporal-postgres | PostgreSQL |
| k8s/temporal-cass | Cassandra |
| k8s/temporal-cass-es | Cassandra and Elasticsearch |
| k8s/temporal-mysql | MySQL |
| k8s/temporal-mysql-es | MySQL and Elasticsearch |
| k8s/temporal-cockroach | CockroachDB |
| k8s/temporal-cockroach-es | CockroachDB and Elasticsearch |

9
Makefile Normal file
View File

@@ -0,0 +1,9 @@
k8s: k8s/temporal.yaml k8s/temporal-postgres.yaml k8s/temporal-mysql.yaml k8s/temporal-mysql-es.yaml k8s/temporal-cass.yaml k8s/temporal-cass-es.yaml
k8s/temporal.yaml: docker-compose.yml
kompose convert -f $< -o $@
yq -i '(.items.[] | select(.kind == "Deployment") | .spec.template.spec.enableServiceLinks) = false' $@
k8s/temporal-%.yaml: docker-compose-%.yml
kompose convert -f $< -o $@
yq -i '(.items.[] | select(.kind == "Deployment") | .spec.template.spec.enableServiceLinks) = false' $@

View File

@@ -4,6 +4,8 @@ This repository provides docker-compose files that enable you to run a local ins
There are a variety of docker-compose files, each utilizing a different set of dependencies.
Every major or minor release of the Temporal Server has a corresponding docker-compose release.
Alongside the docker compose files you can find Kubernetes manifests suitable for setting up a development version of Temporal in a Kubernetes cluster. These files can be found in [k8s](./k8s) directory, each directory holds the manifests related to one of the docker compose files. Details of using these manifests can be found in [KUBERNETES](./KUBERNETES.md).
## Prerequisites
To use these files, you must first have the following installed:

View File

@@ -40,6 +40,8 @@ services:
- 7233:7233
volumes:
- ./dynamicconfig:/etc/temporal/config/dynamicconfig
labels:
kompose.volume.type: configMap
temporal-admin-tools:
container_name: temporal-admin-tools
depends_on:

View File

@@ -21,6 +21,8 @@ services:
- 7233:7233
volumes:
- ./dynamicconfig:/etc/temporal/config/dynamicconfig
labels:
kompose.volume.type: configMap
temporal-admin-tools:
container_name: temporal-admin-tools
depends_on:

View File

@@ -54,6 +54,8 @@ services:
- 7233:7233
volumes:
- ./dynamicconfig:/etc/temporal/config/dynamicconfig
labels:
kompose.volume.type: configMap
temporal-admin-tools:
container_name: temporal-admin-tools
depends_on:

View File

@@ -35,6 +35,8 @@ services:
- 7233:7233
volumes:
- ./dynamicconfig:/etc/temporal/config/dynamicconfig
labels:
kompose.volume.type: configMap
temporal-admin-tools:
container_name: temporal-admin-tools
depends_on:

View File

@@ -45,6 +45,8 @@ services:
- 7233:7233
volumes:
- ./dynamicconfig:/etc/temporal/config/dynamicconfig
labels:
kompose.volume.type: configMap
temporal-admin-tools:
container_name: temporal-admin-tools
depends_on:

View File

@@ -27,6 +27,8 @@ services:
- 7233:7233
volumes:
- ./dynamicconfig:/etc/temporal/config/dynamicconfig
labels:
kompose.volume.type: configMap
temporal-admin-tools:
container_name: temporal-admin-tools
depends_on:

View File

@@ -28,6 +28,8 @@ services:
- 7233:7233
volumes:
- ./dynamicconfig:/etc/temporal/config/dynamicconfig
labels:
kompose.volume.type: configMap
temporal-admin-tools:
container_name: temporal-admin-tools
depends_on:

View File

@@ -45,6 +45,8 @@ services:
- temporal-network
ports:
- 7233:7233
labels:
kompose.volume.type: configMap
volumes:
- ./dynamicconfig:/etc/temporal/config/dynamicconfig
temporal-admin-tools:

374
k8s/temporal-cass-es.yaml Normal file
View File

@@ -0,0 +1,374 @@
apiVersion: v1
items:
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-cass-es.yml -o k8s/temporal-cass-es.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: cassandra
name: cassandra
spec:
ports:
- name: "9042"
port: 9042
targetPort: 9042
selector:
io.kompose.service: cassandra
status:
loadBalancer: {}
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-cass-es.yml -o k8s/temporal-cass-es.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: elasticsearch
name: elasticsearch
spec:
ports:
- name: "9200"
port: 9200
targetPort: 9200
selector:
io.kompose.service: elasticsearch
status:
loadBalancer: {}
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-cass-es.yml -o k8s/temporal-cass-es.yaml
kompose.version: 1.26.1 (1b040dd2)
kompose.volume.type: configMap
creationTimestamp: null
labels:
io.kompose.service: temporal
name: temporal
spec:
ports:
- name: "7233"
port: 7233
targetPort: 7233
selector:
io.kompose.service: temporal
status:
loadBalancer: {}
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-cass-es.yml -o k8s/temporal-cass-es.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: temporal-web
name: temporal-web
spec:
ports:
- name: "8088"
port: 8088
targetPort: 8088
selector:
io.kompose.service: temporal-web
status:
loadBalancer: {}
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-cass-es.yml -o k8s/temporal-cass-es.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: cassandra
name: cassandra
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: cassandra
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-cass-es.yml -o k8s/temporal-cass-es.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.network/temporal-network: "true"
io.kompose.service: cassandra
spec:
containers:
- image: cassandra:3.11.9
name: temporal-cassandra
ports:
- containerPort: 9042
resources: {}
restartPolicy: Always
enableServiceLinks: false
status: {}
- apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
creationTimestamp: null
name: temporal-network
spec:
ingress:
- from:
- podSelector:
matchLabels:
io.kompose.network/temporal-network: "true"
podSelector:
matchLabels:
io.kompose.network/temporal-network: "true"
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-cass-es.yml -o k8s/temporal-cass-es.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: elasticsearch
name: elasticsearch
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: elasticsearch
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-cass-es.yml -o k8s/temporal-cass-es.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.network/temporal-network: "true"
io.kompose.service: elasticsearch
spec:
containers:
- env:
- name: ES_JAVA_OPTS
value: -Xms256m -Xmx256m
- name: cluster.routing.allocation.disk.threshold_enabled
value: "true"
- name: cluster.routing.allocation.disk.watermark.flood_stage
value: 128mb
- name: cluster.routing.allocation.disk.watermark.high
value: 256mb
- name: cluster.routing.allocation.disk.watermark.low
value: 512mb
- name: discovery.type
value: single-node
- name: xpack.security.enabled
value: "false"
image: elasticsearch:7.16.2
name: temporal-elasticsearch
ports:
- containerPort: 9200
resources: {}
restartPolicy: Always
enableServiceLinks: false
status: {}
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-cass-es.yml -o k8s/temporal-cass-es.yaml
kompose.version: 1.26.1 (1b040dd2)
kompose.volume.type: configMap
creationTimestamp: null
labels:
io.kompose.service: temporal
name: temporal
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: temporal
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-cass-es.yml -o k8s/temporal-cass-es.yaml
kompose.version: 1.26.1 (1b040dd2)
kompose.volume.type: configMap
creationTimestamp: null
labels:
io.kompose.network/temporal-network: "true"
io.kompose.service: temporal
spec:
containers:
- env:
- name: CASSANDRA_SEEDS
value: cassandra
- name: DYNAMIC_CONFIG_FILE_PATH
value: config/dynamicconfig/development-cass.yaml
- name: ENABLE_ES
value: "true"
- name: ES_SEEDS
value: elasticsearch
- name: ES_VERSION
value: v7
image: temporalio/auto-setup:1.17.1
name: temporal
ports:
- containerPort: 7233
resources: {}
volumeMounts:
- mountPath: /etc/temporal/config/dynamicconfig
name: temporal-cm0
restartPolicy: Always
volumes:
- configMap:
name: temporal-cm0
name: temporal-cm0
enableServiceLinks: false
status: {}
- apiVersion: v1
data:
README.md: |
Use `docker.yaml` file to override the default dynamic config value (they are specified
when creating the service config).
Each key can have zero or more values and each value can have zero or more
constraints. There are only three types of constraint:
1. `namespace`: `string`
2. `taskQueueName`: `string`
3. `taskType`: `int` (`1`:`Workflow`, `2`:`Activity`)
A value will be selected and returned if all its has exactly the same constraints
as the ones specified in query filters (including the number of constraints).
Please use the following format:
```
testGetBoolPropertyKey:
- value: false
- value: true
constraints:
namespace: "global-samples-namespace"
- value: false
constraints:
namespace: "samples-namespace"
testGetDurationPropertyKey:
- value: "1m"
constraints:
namespace: "samples-namespace"
taskQueueName: "longIdleTimeTaskqueue"
testGetFloat64PropertyKey:
- value: 12.0
constraints:
namespace: "samples-namespace"
testGetMapPropertyKey:
- value:
key1: 1
key2: "value 2"
key3:
- false
- key4: true
key5: 2.0
```
development-cass.yaml: |
system.forceSearchAttributesCacheRefreshOnRead:
- value: true # Dev setup only. Please don't turn this on in production.
constraints: {}
development-sql.yaml: |
limit.maxIDLength:
- value: 255
constraints: {}
system.forceSearchAttributesCacheRefreshOnRead:
- value: true # Dev setup only. Please don't turn this on in production.
constraints: {}
docker.yaml: ""
kind: ConfigMap
metadata:
creationTimestamp: null
labels:
io.kompose.service: temporal
name: temporal-cm0
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-cass-es.yml -o k8s/temporal-cass-es.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: temporal-admin-tools
name: temporal-admin-tools
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: temporal-admin-tools
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-cass-es.yml -o k8s/temporal-cass-es.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.network/temporal-network: "true"
io.kompose.service: temporal-admin-tools
spec:
containers:
- env:
- name: TEMPORAL_CLI_ADDRESS
value: temporal:7233
image: temporalio/admin-tools:1.17.1
name: temporal-admin-tools
resources: {}
stdin: true
tty: true
restartPolicy: Always
enableServiceLinks: false
status: {}
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-cass-es.yml -o k8s/temporal-cass-es.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: temporal-web
name: temporal-web
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: temporal-web
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-cass-es.yml -o k8s/temporal-cass-es.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.network/temporal-network: "true"
io.kompose.service: temporal-web
spec:
containers:
- env:
- name: TEMPORAL_GRPC_ENDPOINT
value: temporal:7233
- name: TEMPORAL_PERMIT_WRITE_API
value: "true"
image: temporalio/web:1.15.0
name: temporal-web
ports:
- containerPort: 8088
resources: {}
restartPolicy: Always
enableServiceLinks: false
status: {}
kind: List
metadata: {}

299
k8s/temporal-cass.yaml Normal file
View File

@@ -0,0 +1,299 @@
apiVersion: v1
items:
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-cass.yml -o k8s/temporal-cass.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: cassandra
name: cassandra
spec:
ports:
- name: "9042"
port: 9042
targetPort: 9042
selector:
io.kompose.service: cassandra
status:
loadBalancer: {}
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-cass.yml -o k8s/temporal-cass.yaml
kompose.version: 1.26.1 (1b040dd2)
kompose.volume.type: configMap
creationTimestamp: null
labels:
io.kompose.service: temporal
name: temporal
spec:
ports:
- name: "7233"
port: 7233
targetPort: 7233
selector:
io.kompose.service: temporal
status:
loadBalancer: {}
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-cass.yml -o k8s/temporal-cass.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: temporal-web
name: temporal-web
spec:
ports:
- name: "8088"
port: 8088
targetPort: 8088
selector:
io.kompose.service: temporal-web
status:
loadBalancer: {}
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-cass.yml -o k8s/temporal-cass.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: cassandra
name: cassandra
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: cassandra
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-cass.yml -o k8s/temporal-cass.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.network/temporal-network: "true"
io.kompose.service: cassandra
spec:
containers:
- image: cassandra:3.11.9
name: temporal-cassandra
ports:
- containerPort: 9042
resources: {}
restartPolicy: Always
enableServiceLinks: false
status: {}
- apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
creationTimestamp: null
name: temporal-network
spec:
ingress:
- from:
- podSelector:
matchLabels:
io.kompose.network/temporal-network: "true"
podSelector:
matchLabels:
io.kompose.network/temporal-network: "true"
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-cass.yml -o k8s/temporal-cass.yaml
kompose.version: 1.26.1 (1b040dd2)
kompose.volume.type: configMap
creationTimestamp: null
labels:
io.kompose.service: temporal
name: temporal
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: temporal
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-cass.yml -o k8s/temporal-cass.yaml
kompose.version: 1.26.1 (1b040dd2)
kompose.volume.type: configMap
creationTimestamp: null
labels:
io.kompose.network/temporal-network: "true"
io.kompose.service: temporal
spec:
containers:
- env:
- name: CASSANDRA_SEEDS
value: cassandra
- name: DYNAMIC_CONFIG_FILE_PATH
value: config/dynamicconfig/development-cass.yaml
image: temporalio/auto-setup:1.17.1
name: temporal
ports:
- containerPort: 7233
resources: {}
volumeMounts:
- mountPath: /etc/temporal/config/dynamicconfig
name: temporal-cm0
restartPolicy: Always
volumes:
- configMap:
name: temporal-cm0
name: temporal-cm0
enableServiceLinks: false
status: {}
- apiVersion: v1
data:
README.md: |
Use `docker.yaml` file to override the default dynamic config value (they are specified
when creating the service config).
Each key can have zero or more values and each value can have zero or more
constraints. There are only three types of constraint:
1. `namespace`: `string`
2. `taskQueueName`: `string`
3. `taskType`: `int` (`1`:`Workflow`, `2`:`Activity`)
A value will be selected and returned if all its has exactly the same constraints
as the ones specified in query filters (including the number of constraints).
Please use the following format:
```
testGetBoolPropertyKey:
- value: false
- value: true
constraints:
namespace: "global-samples-namespace"
- value: false
constraints:
namespace: "samples-namespace"
testGetDurationPropertyKey:
- value: "1m"
constraints:
namespace: "samples-namespace"
taskQueueName: "longIdleTimeTaskqueue"
testGetFloat64PropertyKey:
- value: 12.0
constraints:
namespace: "samples-namespace"
testGetMapPropertyKey:
- value:
key1: 1
key2: "value 2"
key3:
- false
- key4: true
key5: 2.0
```
development-cass.yaml: |
system.forceSearchAttributesCacheRefreshOnRead:
- value: true # Dev setup only. Please don't turn this on in production.
constraints: {}
development-sql.yaml: |
limit.maxIDLength:
- value: 255
constraints: {}
system.forceSearchAttributesCacheRefreshOnRead:
- value: true # Dev setup only. Please don't turn this on in production.
constraints: {}
docker.yaml: ""
kind: ConfigMap
metadata:
creationTimestamp: null
labels:
io.kompose.service: temporal
name: temporal-cm0
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-cass.yml -o k8s/temporal-cass.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: temporal-admin-tools
name: temporal-admin-tools
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: temporal-admin-tools
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-cass.yml -o k8s/temporal-cass.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.network/temporal-network: "true"
io.kompose.service: temporal-admin-tools
spec:
containers:
- env:
- name: TEMPORAL_CLI_ADDRESS
value: temporal:7233
image: temporalio/admin-tools:1.17.1
name: temporal-admin-tools
resources: {}
stdin: true
tty: true
restartPolicy: Always
enableServiceLinks: false
status: {}
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-cass.yml -o k8s/temporal-cass.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: temporal-web
name: temporal-web
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: temporal-web
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-cass.yml -o k8s/temporal-cass.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.network/temporal-network: "true"
io.kompose.service: temporal-web
spec:
containers:
- env:
- name: TEMPORAL_GRPC_ENDPOINT
value: temporal:7233
- name: TEMPORAL_PERMIT_WRITE_API
value: "true"
image: temporalio/web:1.15.0
name: temporal-web
ports:
- containerPort: 8088
resources: {}
restartPolicy: Always
enableServiceLinks: false
status: {}
kind: List
metadata: {}

381
k8s/temporal-mysql-es.yaml Normal file
View File

@@ -0,0 +1,381 @@
apiVersion: v1
items:
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-mysql-es.yml -o k8s/temporal-mysql-es.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: elasticsearch
name: elasticsearch
spec:
ports:
- name: "9200"
port: 9200
targetPort: 9200
selector:
io.kompose.service: elasticsearch
status:
loadBalancer: {}
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-mysql-es.yml -o k8s/temporal-mysql-es.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: mysql
name: mysql
spec:
ports:
- name: "3306"
port: 3306
targetPort: 3306
selector:
io.kompose.service: mysql
status:
loadBalancer: {}
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-mysql-es.yml -o k8s/temporal-mysql-es.yaml
kompose.version: 1.26.1 (1b040dd2)
kompose.volume.type: configMap
creationTimestamp: null
labels:
io.kompose.service: temporal
name: temporal
spec:
ports:
- name: "7233"
port: 7233
targetPort: 7233
selector:
io.kompose.service: temporal
status:
loadBalancer: {}
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-mysql-es.yml -o k8s/temporal-mysql-es.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: temporal-web
name: temporal-web
spec:
ports:
- name: "8088"
port: 8088
targetPort: 8088
selector:
io.kompose.service: temporal-web
status:
loadBalancer: {}
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-mysql-es.yml -o k8s/temporal-mysql-es.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: elasticsearch
name: elasticsearch
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: elasticsearch
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-mysql-es.yml -o k8s/temporal-mysql-es.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.network/temporal-network: "true"
io.kompose.service: elasticsearch
spec:
containers:
- env:
- name: ES_JAVA_OPTS
value: -Xms256m -Xmx256m
- name: cluster.routing.allocation.disk.threshold_enabled
value: "true"
- name: cluster.routing.allocation.disk.watermark.flood_stage
value: 128mb
- name: cluster.routing.allocation.disk.watermark.high
value: 256mb
- name: cluster.routing.allocation.disk.watermark.low
value: 512mb
- name: discovery.type
value: single-node
- name: xpack.security.enabled
value: "false"
image: elasticsearch:7.16.2
name: temporal-elasticsearch
ports:
- containerPort: 9200
resources: {}
restartPolicy: Always
enableServiceLinks: false
status: {}
- apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
creationTimestamp: null
name: temporal-network
spec:
ingress:
- from:
- podSelector:
matchLabels:
io.kompose.network/temporal-network: "true"
podSelector:
matchLabels:
io.kompose.network/temporal-network: "true"
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-mysql-es.yml -o k8s/temporal-mysql-es.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: mysql
name: mysql
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: mysql
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-mysql-es.yml -o k8s/temporal-mysql-es.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.network/temporal-network: "true"
io.kompose.service: mysql
spec:
containers:
- env:
- name: MYSQL_ROOT_PASSWORD
value: root
image: mysql:8
name: temporal-mysql
ports:
- containerPort: 3306
resources: {}
restartPolicy: Always
enableServiceLinks: false
status: {}
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-mysql-es.yml -o k8s/temporal-mysql-es.yaml
kompose.version: 1.26.1 (1b040dd2)
kompose.volume.type: configMap
creationTimestamp: null
labels:
io.kompose.service: temporal
name: temporal
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: temporal
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-mysql-es.yml -o k8s/temporal-mysql-es.yaml
kompose.version: 1.26.1 (1b040dd2)
kompose.volume.type: configMap
creationTimestamp: null
labels:
io.kompose.network/temporal-network: "true"
io.kompose.service: temporal
spec:
containers:
- env:
- name: DB
value: mysql
- name: DYNAMIC_CONFIG_FILE_PATH
value: config/dynamicconfig/development-sql.yaml
- name: ENABLE_ES
value: "true"
- name: ES_SEEDS
value: elasticsearch
- name: ES_VERSION
value: v7
- name: MYSQL_PWD
value: root
- name: MYSQL_SEEDS
value: mysql
- name: MYSQL_USER
value: root
image: temporalio/auto-setup:1.17.1
name: temporal
ports:
- containerPort: 7233
resources: {}
volumeMounts:
- mountPath: /etc/temporal/config/dynamicconfig
name: temporal-cm0
restartPolicy: Always
volumes:
- configMap:
name: temporal-cm0
name: temporal-cm0
enableServiceLinks: false
status: {}
- apiVersion: v1
data:
README.md: |
Use `docker.yaml` file to override the default dynamic config value (they are specified
when creating the service config).
Each key can have zero or more values and each value can have zero or more
constraints. There are only three types of constraint:
1. `namespace`: `string`
2. `taskQueueName`: `string`
3. `taskType`: `int` (`1`:`Workflow`, `2`:`Activity`)
A value will be selected and returned if all its has exactly the same constraints
as the ones specified in query filters (including the number of constraints).
Please use the following format:
```
testGetBoolPropertyKey:
- value: false
- value: true
constraints:
namespace: "global-samples-namespace"
- value: false
constraints:
namespace: "samples-namespace"
testGetDurationPropertyKey:
- value: "1m"
constraints:
namespace: "samples-namespace"
taskQueueName: "longIdleTimeTaskqueue"
testGetFloat64PropertyKey:
- value: 12.0
constraints:
namespace: "samples-namespace"
testGetMapPropertyKey:
- value:
key1: 1
key2: "value 2"
key3:
- false
- key4: true
key5: 2.0
```
development-cass.yaml: |
system.forceSearchAttributesCacheRefreshOnRead:
- value: true # Dev setup only. Please don't turn this on in production.
constraints: {}
development-sql.yaml: |
limit.maxIDLength:
- value: 255
constraints: {}
system.forceSearchAttributesCacheRefreshOnRead:
- value: true # Dev setup only. Please don't turn this on in production.
constraints: {}
docker.yaml: ""
kind: ConfigMap
metadata:
creationTimestamp: null
labels:
io.kompose.service: temporal
name: temporal-cm0
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-mysql-es.yml -o k8s/temporal-mysql-es.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: temporal-admin-tools
name: temporal-admin-tools
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: temporal-admin-tools
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-mysql-es.yml -o k8s/temporal-mysql-es.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.network/temporal-network: "true"
io.kompose.service: temporal-admin-tools
spec:
containers:
- env:
- name: TEMPORAL_CLI_ADDRESS
value: temporal:7233
image: temporalio/admin-tools:1.17.1
name: temporal-admin-tools
resources: {}
stdin: true
tty: true
restartPolicy: Always
enableServiceLinks: false
status: {}
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-mysql-es.yml -o k8s/temporal-mysql-es.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: temporal-web
name: temporal-web
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: temporal-web
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-mysql-es.yml -o k8s/temporal-mysql-es.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.network/temporal-network: "true"
io.kompose.service: temporal-web
spec:
containers:
- env:
- name: TEMPORAL_GRPC_ENDPOINT
value: temporal:7233
image: temporalio/web:1.15.0
name: temporal-web
ports:
- containerPort: 8088
resources: {}
restartPolicy: Always
enableServiceLinks: false
status: {}
kind: List
metadata: {}

310
k8s/temporal-mysql.yaml Normal file
View File

@@ -0,0 +1,310 @@
apiVersion: v1
items:
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-mysql.yml -o k8s/temporal-mysql.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: mysql
name: mysql
spec:
ports:
- name: "3306"
port: 3306
targetPort: 3306
selector:
io.kompose.service: mysql
status:
loadBalancer: {}
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-mysql.yml -o k8s/temporal-mysql.yaml
kompose.version: 1.26.1 (1b040dd2)
kompose.volume.type: configMap
creationTimestamp: null
labels:
io.kompose.service: temporal
name: temporal
spec:
ports:
- name: "7233"
port: 7233
targetPort: 7233
selector:
io.kompose.service: temporal
status:
loadBalancer: {}
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-mysql.yml -o k8s/temporal-mysql.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: temporal-web
name: temporal-web
spec:
ports:
- name: "8088"
port: 8088
targetPort: 8088
selector:
io.kompose.service: temporal-web
status:
loadBalancer: {}
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-mysql.yml -o k8s/temporal-mysql.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: mysql
name: mysql
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: mysql
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-mysql.yml -o k8s/temporal-mysql.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.network/temporal-network: "true"
io.kompose.service: mysql
spec:
containers:
- env:
- name: MYSQL_ROOT_PASSWORD
value: root
image: mysql:8
name: temporal-mysql
ports:
- containerPort: 3306
resources: {}
restartPolicy: Always
enableServiceLinks: false
status: {}
- apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
creationTimestamp: null
name: temporal-network
spec:
ingress:
- from:
- podSelector:
matchLabels:
io.kompose.network/temporal-network: "true"
podSelector:
matchLabels:
io.kompose.network/temporal-network: "true"
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-mysql.yml -o k8s/temporal-mysql.yaml
kompose.version: 1.26.1 (1b040dd2)
kompose.volume.type: configMap
creationTimestamp: null
labels:
io.kompose.service: temporal
name: temporal
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: temporal
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-mysql.yml -o k8s/temporal-mysql.yaml
kompose.version: 1.26.1 (1b040dd2)
kompose.volume.type: configMap
creationTimestamp: null
labels:
io.kompose.network/temporal-network: "true"
io.kompose.service: temporal
spec:
containers:
- env:
- name: DB
value: mysql
- name: DB_PORT
value: "3306"
- name: DYNAMIC_CONFIG_FILE_PATH
value: config/dynamicconfig/development-sql.yaml
- name: MYSQL_PWD
value: root
- name: MYSQL_SEEDS
value: mysql
- name: MYSQL_USER
value: root
image: temporalio/auto-setup:1.17.1
name: temporal
ports:
- containerPort: 7233
resources: {}
volumeMounts:
- mountPath: /etc/temporal/config/dynamicconfig
name: temporal-cm0
restartPolicy: Always
volumes:
- configMap:
name: temporal-cm0
name: temporal-cm0
enableServiceLinks: false
status: {}
- apiVersion: v1
data:
README.md: |
Use `docker.yaml` file to override the default dynamic config value (they are specified
when creating the service config).
Each key can have zero or more values and each value can have zero or more
constraints. There are only three types of constraint:
1. `namespace`: `string`
2. `taskQueueName`: `string`
3. `taskType`: `int` (`1`:`Workflow`, `2`:`Activity`)
A value will be selected and returned if all its has exactly the same constraints
as the ones specified in query filters (including the number of constraints).
Please use the following format:
```
testGetBoolPropertyKey:
- value: false
- value: true
constraints:
namespace: "global-samples-namespace"
- value: false
constraints:
namespace: "samples-namespace"
testGetDurationPropertyKey:
- value: "1m"
constraints:
namespace: "samples-namespace"
taskQueueName: "longIdleTimeTaskqueue"
testGetFloat64PropertyKey:
- value: 12.0
constraints:
namespace: "samples-namespace"
testGetMapPropertyKey:
- value:
key1: 1
key2: "value 2"
key3:
- false
- key4: true
key5: 2.0
```
development-cass.yaml: |
system.forceSearchAttributesCacheRefreshOnRead:
- value: true # Dev setup only. Please don't turn this on in production.
constraints: {}
development-sql.yaml: |
limit.maxIDLength:
- value: 255
constraints: {}
system.forceSearchAttributesCacheRefreshOnRead:
- value: true # Dev setup only. Please don't turn this on in production.
constraints: {}
docker.yaml: ""
kind: ConfigMap
metadata:
creationTimestamp: null
labels:
io.kompose.service: temporal
name: temporal-cm0
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-mysql.yml -o k8s/temporal-mysql.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: temporal-admin-tools
name: temporal-admin-tools
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: temporal-admin-tools
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-mysql.yml -o k8s/temporal-mysql.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.network/temporal-network: "true"
io.kompose.service: temporal-admin-tools
spec:
containers:
- env:
- name: TEMPORAL_CLI_ADDRESS
value: temporal:7233
image: temporalio/admin-tools:1.17.1
name: temporal-admin-tools
resources: {}
stdin: true
tty: true
restartPolicy: Always
enableServiceLinks: false
status: {}
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-mysql.yml -o k8s/temporal-mysql.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: temporal-web
name: temporal-web
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: temporal-web
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-mysql.yml -o k8s/temporal-mysql.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.network/temporal-network: "true"
io.kompose.service: temporal-web
spec:
containers:
- env:
- name: TEMPORAL_GRPC_ENDPOINT
value: temporal:7233
- name: TEMPORAL_PERMIT_WRITE_API
value: "true"
image: temporalio/web:1.15.0
name: temporal-web
ports:
- containerPort: 8088
resources: {}
restartPolicy: Always
enableServiceLinks: false
status: {}
kind: List
metadata: {}

312
k8s/temporal-postgres.yaml Normal file
View File

@@ -0,0 +1,312 @@
apiVersion: v1
items:
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-postgres.yml -o k8s/temporal-postgres.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: postgresql
name: postgresql
spec:
ports:
- name: "5432"
port: 5432
targetPort: 5432
selector:
io.kompose.service: postgresql
status:
loadBalancer: {}
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-postgres.yml -o k8s/temporal-postgres.yaml
kompose.version: 1.26.1 (1b040dd2)
kompose.volume.type: configMap
creationTimestamp: null
labels:
io.kompose.service: temporal
name: temporal
spec:
ports:
- name: "7233"
port: 7233
targetPort: 7233
selector:
io.kompose.service: temporal
status:
loadBalancer: {}
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-postgres.yml -o k8s/temporal-postgres.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: temporal-web
name: temporal-web
spec:
ports:
- name: "8088"
port: 8088
targetPort: 8088
selector:
io.kompose.service: temporal-web
status:
loadBalancer: {}
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-postgres.yml -o k8s/temporal-postgres.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: postgresql
name: postgresql
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: postgresql
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-postgres.yml -o k8s/temporal-postgres.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.network/temporal-network: "true"
io.kompose.service: postgresql
spec:
containers:
- env:
- name: POSTGRES_PASSWORD
value: temporal
- name: POSTGRES_USER
value: temporal
image: postgres:13
name: temporal-postgresql
ports:
- containerPort: 5432
resources: {}
restartPolicy: Always
enableServiceLinks: false
status: {}
- apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
creationTimestamp: null
name: temporal-network
spec:
ingress:
- from:
- podSelector:
matchLabels:
io.kompose.network/temporal-network: "true"
podSelector:
matchLabels:
io.kompose.network/temporal-network: "true"
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-postgres.yml -o k8s/temporal-postgres.yaml
kompose.version: 1.26.1 (1b040dd2)
kompose.volume.type: configMap
creationTimestamp: null
labels:
io.kompose.service: temporal
name: temporal
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: temporal
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-postgres.yml -o k8s/temporal-postgres.yaml
kompose.version: 1.26.1 (1b040dd2)
kompose.volume.type: configMap
creationTimestamp: null
labels:
io.kompose.network/temporal-network: "true"
io.kompose.service: temporal
spec:
containers:
- env:
- name: DB
value: postgresql
- name: DB_PORT
value: "5432"
- name: DYNAMIC_CONFIG_FILE_PATH
value: config/dynamicconfig/development-sql.yaml
- name: POSTGRES_PWD
value: temporal
- name: POSTGRES_SEEDS
value: postgresql
- name: POSTGRES_USER
value: temporal
image: temporalio/auto-setup:1.17.1
name: temporal
ports:
- containerPort: 7233
resources: {}
volumeMounts:
- mountPath: /etc/temporal/config/dynamicconfig
name: temporal-cm0
restartPolicy: Always
volumes:
- configMap:
name: temporal-cm0
name: temporal-cm0
enableServiceLinks: false
status: {}
- apiVersion: v1
data:
README.md: |
Use `docker.yaml` file to override the default dynamic config value (they are specified
when creating the service config).
Each key can have zero or more values and each value can have zero or more
constraints. There are only three types of constraint:
1. `namespace`: `string`
2. `taskQueueName`: `string`
3. `taskType`: `int` (`1`:`Workflow`, `2`:`Activity`)
A value will be selected and returned if all its has exactly the same constraints
as the ones specified in query filters (including the number of constraints).
Please use the following format:
```
testGetBoolPropertyKey:
- value: false
- value: true
constraints:
namespace: "global-samples-namespace"
- value: false
constraints:
namespace: "samples-namespace"
testGetDurationPropertyKey:
- value: "1m"
constraints:
namespace: "samples-namespace"
taskQueueName: "longIdleTimeTaskqueue"
testGetFloat64PropertyKey:
- value: 12.0
constraints:
namespace: "samples-namespace"
testGetMapPropertyKey:
- value:
key1: 1
key2: "value 2"
key3:
- false
- key4: true
key5: 2.0
```
development-cass.yaml: |
system.forceSearchAttributesCacheRefreshOnRead:
- value: true # Dev setup only. Please don't turn this on in production.
constraints: {}
development-sql.yaml: |
limit.maxIDLength:
- value: 255
constraints: {}
system.forceSearchAttributesCacheRefreshOnRead:
- value: true # Dev setup only. Please don't turn this on in production.
constraints: {}
docker.yaml: ""
kind: ConfigMap
metadata:
creationTimestamp: null
labels:
io.kompose.service: temporal
name: temporal-cm0
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-postgres.yml -o k8s/temporal-postgres.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: temporal-admin-tools
name: temporal-admin-tools
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: temporal-admin-tools
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-postgres.yml -o k8s/temporal-postgres.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.network/temporal-network: "true"
io.kompose.service: temporal-admin-tools
spec:
containers:
- env:
- name: TEMPORAL_CLI_ADDRESS
value: temporal:7233
image: temporalio/admin-tools:1.17.1
name: temporal-admin-tools
resources: {}
stdin: true
tty: true
restartPolicy: Always
enableServiceLinks: false
status: {}
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-postgres.yml -o k8s/temporal-postgres.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: temporal-web
name: temporal-web
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: temporal-web
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose-postgres.yml -o k8s/temporal-postgres.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.network/temporal-network: "true"
io.kompose.service: temporal-web
spec:
containers:
- env:
- name: TEMPORAL_GRPC_ENDPOINT
value: temporal:7233
- name: TEMPORAL_PERMIT_WRITE_API
value: "true"
image: temporalio/web:1.15.0
name: temporal-web
ports:
- containerPort: 8088
resources: {}
restartPolicy: Always
enableServiceLinks: false
status: {}
kind: List
metadata: {}

446
k8s/temporal.yaml Normal file
View File

@@ -0,0 +1,446 @@
apiVersion: v1
items:
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yml -o k8s/temporal.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: elasticsearch
name: elasticsearch
spec:
ports:
- name: "9200"
port: 9200
targetPort: 9200
selector:
io.kompose.service: elasticsearch
status:
loadBalancer: {}
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yml -o k8s/temporal.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: postgresql
name: postgresql
spec:
ports:
- name: "5432"
port: 5432
targetPort: 5432
selector:
io.kompose.service: postgresql
status:
loadBalancer: {}
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yml -o k8s/temporal.yaml
kompose.version: 1.26.1 (1b040dd2)
kompose.volume.type: configMap
creationTimestamp: null
labels:
io.kompose.service: temporal
name: temporal
spec:
ports:
- name: "7233"
port: 7233
targetPort: 7233
selector:
io.kompose.service: temporal
status:
loadBalancer: {}
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yml -o k8s/temporal.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: temporal-ui
name: temporal-ui
spec:
ports:
- name: "8080"
port: 8080
targetPort: 8080
selector:
io.kompose.service: temporal-ui
status:
loadBalancer: {}
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yml -o k8s/temporal.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: temporal-web
name: temporal-web
spec:
ports:
- name: "8088"
port: 8088
targetPort: 8088
selector:
io.kompose.service: temporal-web
status:
loadBalancer: {}
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yml -o k8s/temporal.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: elasticsearch
name: elasticsearch
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: elasticsearch
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yml -o k8s/temporal.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.network/temporal-network: "true"
io.kompose.service: elasticsearch
spec:
containers:
- env:
- name: ES_JAVA_OPTS
value: -Xms256m -Xmx256m
- name: cluster.routing.allocation.disk.threshold_enabled
value: "true"
- name: cluster.routing.allocation.disk.watermark.flood_stage
value: 128mb
- name: cluster.routing.allocation.disk.watermark.high
value: 256mb
- name: cluster.routing.allocation.disk.watermark.low
value: 512mb
- name: discovery.type
value: single-node
- name: xpack.security.enabled
value: "false"
image: elasticsearch:7.16.2
name: temporal-elasticsearch
ports:
- containerPort: 9200
resources: {}
restartPolicy: Always
enableServiceLinks: false
status: {}
- apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
creationTimestamp: null
name: temporal-network
spec:
ingress:
- from:
- podSelector:
matchLabels:
io.kompose.network/temporal-network: "true"
podSelector:
matchLabels:
io.kompose.network/temporal-network: "true"
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yml -o k8s/temporal.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: postgresql
name: postgresql
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: postgresql
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yml -o k8s/temporal.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.network/temporal-network: "true"
io.kompose.service: postgresql
spec:
containers:
- env:
- name: POSTGRES_PASSWORD
value: temporal
- name: POSTGRES_USER
value: temporal
image: postgres:13
name: temporal-postgresql
ports:
- containerPort: 5432
resources: {}
restartPolicy: Always
enableServiceLinks: false
status: {}
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yml -o k8s/temporal.yaml
kompose.version: 1.26.1 (1b040dd2)
kompose.volume.type: configMap
creationTimestamp: null
labels:
io.kompose.service: temporal
name: temporal
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: temporal
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yml -o k8s/temporal.yaml
kompose.version: 1.26.1 (1b040dd2)
kompose.volume.type: configMap
creationTimestamp: null
labels:
io.kompose.network/temporal-network: "true"
io.kompose.service: temporal
spec:
containers:
- env:
- name: DB
value: postgresql
- name: DB_PORT
value: "5432"
- name: DYNAMIC_CONFIG_FILE_PATH
value: config/dynamicconfig/development-sql.yaml
- name: ENABLE_ES
value: "true"
- name: ES_SEEDS
value: elasticsearch
- name: ES_VERSION
value: v7
- name: POSTGRES_PWD
value: temporal
- name: POSTGRES_SEEDS
value: postgresql
- name: POSTGRES_USER
value: temporal
image: temporalio/auto-setup:1.17.1
name: temporal
ports:
- containerPort: 7233
resources: {}
volumeMounts:
- mountPath: /etc/temporal/config/dynamicconfig
name: temporal-cm0
restartPolicy: Always
volumes:
- configMap:
name: temporal-cm0
name: temporal-cm0
enableServiceLinks: false
status: {}
- apiVersion: v1
data:
README.md: |
Use `docker.yaml` file to override the default dynamic config value (they are specified
when creating the service config).
Each key can have zero or more values and each value can have zero or more
constraints. There are only three types of constraint:
1. `namespace`: `string`
2. `taskQueueName`: `string`
3. `taskType`: `int` (`1`:`Workflow`, `2`:`Activity`)
A value will be selected and returned if all its has exactly the same constraints
as the ones specified in query filters (including the number of constraints).
Please use the following format:
```
testGetBoolPropertyKey:
- value: false
- value: true
constraints:
namespace: "global-samples-namespace"
- value: false
constraints:
namespace: "samples-namespace"
testGetDurationPropertyKey:
- value: "1m"
constraints:
namespace: "samples-namespace"
taskQueueName: "longIdleTimeTaskqueue"
testGetFloat64PropertyKey:
- value: 12.0
constraints:
namespace: "samples-namespace"
testGetMapPropertyKey:
- value:
key1: 1
key2: "value 2"
key3:
- false
- key4: true
key5: 2.0
```
development-cass.yaml: |
system.forceSearchAttributesCacheRefreshOnRead:
- value: true # Dev setup only. Please don't turn this on in production.
constraints: {}
development-sql.yaml: |
limit.maxIDLength:
- value: 255
constraints: {}
system.forceSearchAttributesCacheRefreshOnRead:
- value: true # Dev setup only. Please don't turn this on in production.
constraints: {}
docker.yaml: ""
kind: ConfigMap
metadata:
creationTimestamp: null
labels:
io.kompose.service: temporal
name: temporal-cm0
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yml -o k8s/temporal.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: temporal-admin-tools
name: temporal-admin-tools
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: temporal-admin-tools
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yml -o k8s/temporal.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.network/temporal-network: "true"
io.kompose.service: temporal-admin-tools
spec:
containers:
- env:
- name: TEMPORAL_CLI_ADDRESS
value: temporal:7233
image: temporalio/admin-tools:1.17.1
name: temporal-admin-tools
resources: {}
stdin: true
tty: true
restartPolicy: Always
enableServiceLinks: false
status: {}
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yml -o k8s/temporal.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: temporal-ui
name: temporal-ui
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: temporal-ui
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yml -o k8s/temporal.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.network/temporal-network: "true"
io.kompose.service: temporal-ui
spec:
containers:
- env:
- name: TEMPORAL_ADDRESS
value: temporal:7233
- name: TEMPORAL_CORS_ORIGINS
value: http://localhost:3000
image: temporalio/ui:2.2.3
name: temporal-ui
ports:
- containerPort: 8080
resources: {}
restartPolicy: Always
enableServiceLinks: false
status: {}
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yml -o k8s/temporal.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.service: temporal-web
name: temporal-web
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: temporal-web
strategy: {}
template:
metadata:
annotations:
kompose.cmd: kompose convert -f docker-compose.yml -o k8s/temporal.yaml
kompose.version: 1.26.1 (1b040dd2)
creationTimestamp: null
labels:
io.kompose.network/temporal-network: "true"
io.kompose.service: temporal-web
spec:
containers:
- env:
- name: TEMPORAL_GRPC_ENDPOINT
value: temporal:7233
- name: TEMPORAL_PERMIT_WRITE_API
value: "true"
image: temporalio/web:1.15.0
name: temporal-web
ports:
- containerPort: 8088
resources: {}
restartPolicy: Always
enableServiceLinks: false
status: {}
kind: List
metadata: {}