forked from LaconicNetwork/kompose
Merge pull request #600 from cdrage/add-v3-support
Add v3 support of Docker Compose
This commit is contained in:
@@ -249,4 +249,29 @@ convert::expect_success "kompose --provider=openshift convert --stdout -j" "$KOM
|
||||
# Return back to the original path
|
||||
cd $CURRENT_DIR
|
||||
|
||||
# Test V3 Support of Docker Compose
|
||||
|
||||
# Test volumes are passed correctly
|
||||
convert::expect_success "kompose convert --stdout -j -f $KOMPOSE_ROOT/script/test/fixtures/v3/docker-compose-volumes.yaml" "$KOMPOSE_ROOT/script/test/fixtures/v3/output-volumes-k8s.json"
|
||||
|
||||
# Test environment variables are passed correctly
|
||||
convert::expect_success "kompose convert --stdout -j -f $KOMPOSE_ROOT/script/test/fixtures/v3/docker-compose-env.yaml" "$KOMPOSE_ROOT/script/test/fixtures/v3/output-env-k8s.json"
|
||||
|
||||
# Test that two files that are different versions fail
|
||||
convert::expect_failure "kompose convert --stdout -j -f $KOMPOSE_ROOT/script/test/fixtures/v3/docker-compose.yaml -f $KOMPOSE_ROOT/script/test/fixtures/etherpad/docker-compose.yml"
|
||||
|
||||
# Kubernetes
|
||||
convert::expect_success "kompose convert --stdout -j -f $KOMPOSE_ROOT/script/test/fixtures/v3/docker-compose.yaml" "$KOMPOSE_ROOT/script/test/fixtures/v3/output-k8s.json"
|
||||
|
||||
# OpenShift
|
||||
convert::expect_success "kompose convert --provider=openshift --stdout -j -f $KOMPOSE_ROOT/script/test/fixtures/v3/docker-compose.yaml" "$KOMPOSE_ROOT/script/test/fixtures/v3/output-os.json"
|
||||
|
||||
# Test the "full example" from https://raw.githubusercontent.com/aanand/compose-file/master/loader/example1.env
|
||||
|
||||
# Kubernetes
|
||||
convert::expect_success_and_warning "kompose convert --stdout -j -f $KOMPOSE_ROOT/script/test/fixtures/v3/docker-compose-full-example.yaml" "$KOMPOSE_ROOT/script/test/fixtures/v3/output-k8s-full-example.json"
|
||||
|
||||
# Openshift
|
||||
convert::expect_success_and_warning "kompose convert --provider=openshift --stdout -j -f $KOMPOSE_ROOT/script/test/fixtures/v3/docker-compose-full-example.yaml" "$KOMPOSE_ROOT/script/test/fixtures/v3/output-os-full-example.json"
|
||||
|
||||
exit $EXIT_STATUS
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
version: '3'
|
||||
services:
|
||||
foo:
|
||||
image: foo/bar:latest
|
||||
environment:
|
||||
FOO: foo
|
||||
@@ -0,0 +1,268 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
foo:
|
||||
cap_add:
|
||||
- ALL
|
||||
|
||||
cap_drop:
|
||||
- NET_ADMIN
|
||||
- SYS_ADMIN
|
||||
|
||||
cgroup_parent: m-executor-abcd
|
||||
|
||||
# String or list
|
||||
command: bundle exec thin -p 3000
|
||||
# command: ["bundle", "exec", "thin", "-p", "3000"]
|
||||
|
||||
container_name: my-web-container
|
||||
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 6
|
||||
labels: [FOO=BAR]
|
||||
update_config:
|
||||
parallelism: 3
|
||||
delay: 10s
|
||||
failure_action: continue
|
||||
monitor: 60s
|
||||
max_failure_ratio: 0.3
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.001'
|
||||
memory: 50M
|
||||
reservations:
|
||||
cpus: '0.0001'
|
||||
memory: 20M
|
||||
restart_policy:
|
||||
condition: on_failure
|
||||
delay: 5s
|
||||
max_attempts: 3
|
||||
window: 120s
|
||||
placement:
|
||||
constraints: [node=foo]
|
||||
|
||||
devices:
|
||||
- "/dev/ttyUSB0:/dev/ttyUSB0"
|
||||
|
||||
# String or list
|
||||
# dns: 8.8.8.8
|
||||
dns:
|
||||
- 8.8.8.8
|
||||
- 9.9.9.9
|
||||
|
||||
# String or list
|
||||
# dns_search: example.com
|
||||
dns_search:
|
||||
- dc1.example.com
|
||||
- dc2.example.com
|
||||
|
||||
domainname: foo.com
|
||||
|
||||
# String or list
|
||||
# entrypoint: /code/entrypoint.sh -p 3000
|
||||
entrypoint: ["/code/entrypoint.sh", "-p", "3000"]
|
||||
|
||||
# Items can be strings or numbers
|
||||
expose:
|
||||
- "3000"
|
||||
- 8000
|
||||
|
||||
external_links:
|
||||
- redis_1
|
||||
- project_db_1:mysql
|
||||
- project_db_1:postgresql
|
||||
|
||||
# Mapping or list
|
||||
# Mapping values must be strings
|
||||
# extra_hosts:
|
||||
# somehost: "162.242.195.82"
|
||||
# otherhost: "50.31.209.229"
|
||||
extra_hosts:
|
||||
- "somehost:162.242.195.82"
|
||||
- "otherhost:50.31.209.229"
|
||||
|
||||
hostname: foo
|
||||
|
||||
healthcheck:
|
||||
test: echo "hello world"
|
||||
interval: 10s
|
||||
timeout: 1s
|
||||
retries: 5
|
||||
|
||||
# Any valid image reference - repo, tag, id, sha
|
||||
image: redis
|
||||
# image: ubuntu:14.04
|
||||
# image: tutum/influxdb
|
||||
# image: example-registry.com:4000/postgresql
|
||||
# image: a4bc65fd
|
||||
# image: busybox@sha256:38a203e1986cf79639cfb9b2e1d6e773de84002feea2d4eb006b52004ee8502d
|
||||
|
||||
ipc: host
|
||||
|
||||
# Mapping or list
|
||||
# Mapping values can be strings, numbers or null
|
||||
labels:
|
||||
com.example.description: "Accounting webapp"
|
||||
com.example.number: 42
|
||||
com.example.empty-label:
|
||||
# labels:
|
||||
# - "com.example.description=Accounting webapp"
|
||||
# - "com.example.number=42"
|
||||
# - "com.example.empty-label"
|
||||
|
||||
links:
|
||||
- db
|
||||
- db:database
|
||||
- redis
|
||||
|
||||
logging:
|
||||
driver: syslog
|
||||
options:
|
||||
syslog-address: "tcp://192.168.0.42:123"
|
||||
|
||||
mac_address: 02:42:ac:11:65:43
|
||||
|
||||
# network_mode: "bridge"
|
||||
# network_mode: "host"
|
||||
# network_mode: "none"
|
||||
# Use the network mode of an arbitrary container from another service
|
||||
# network_mode: "service:db"
|
||||
# Use the network mode of another container, specified by name or id
|
||||
# network_mode: "container:some-container"
|
||||
network_mode: "container:0cfeab0f748b9a743dc3da582046357c6ef497631c1a016d28d2bf9b4f899f7b"
|
||||
|
||||
networks:
|
||||
some-network:
|
||||
aliases:
|
||||
- alias1
|
||||
- alias3
|
||||
other-network:
|
||||
ipv4_address: 172.16.238.10
|
||||
ipv6_address: 2001:3984:3989::10
|
||||
other-other-network:
|
||||
|
||||
pid: "host"
|
||||
|
||||
ports:
|
||||
- 3000
|
||||
- "3000-3005"
|
||||
- "8000:8000"
|
||||
- "9090-9091:8080-8081"
|
||||
- "49100:22"
|
||||
- "127.0.0.1:8001:8001"
|
||||
- "127.0.0.1:5000-5010:5000-5010"
|
||||
|
||||
privileged: true
|
||||
|
||||
read_only: true
|
||||
|
||||
restart: always
|
||||
|
||||
security_opt:
|
||||
- label=level:s0:c100,c200
|
||||
- label=type:svirt_apache_t
|
||||
|
||||
stdin_open: true
|
||||
|
||||
stop_grace_period: 20s
|
||||
|
||||
stop_signal: SIGUSR1
|
||||
|
||||
# String or list
|
||||
# tmpfs: /run
|
||||
tmpfs:
|
||||
- /run
|
||||
- /tmp
|
||||
|
||||
tty: true
|
||||
|
||||
ulimits:
|
||||
# Single number or mapping with soft + hard limits
|
||||
nproc: 65535
|
||||
nofile:
|
||||
soft: 20000
|
||||
hard: 40000
|
||||
|
||||
user: someone
|
||||
|
||||
volumes:
|
||||
# Just specify a path and let the Engine create a volume
|
||||
- /var/lib/mysql
|
||||
# Specify an absolute path mapping
|
||||
- /opt/data:/var/lib/mysql
|
||||
# Path on the host, relative to the Compose file
|
||||
- .:/code
|
||||
- ./static:/var/www/html
|
||||
# User-relative path
|
||||
- ~/configs:/etc/configs/:ro
|
||||
# Named volume
|
||||
- datavolume:/var/lib/mysql
|
||||
|
||||
working_dir: /code
|
||||
|
||||
networks:
|
||||
# Entries can be null, which specifies simply that a network
|
||||
# called "{project name}_some-network" should be created and
|
||||
# use the default driver
|
||||
some-network:
|
||||
|
||||
other-network:
|
||||
driver: overlay
|
||||
|
||||
driver_opts:
|
||||
# Values can be strings or numbers
|
||||
foo: "bar"
|
||||
baz: 1
|
||||
|
||||
ipam:
|
||||
driver: overlay
|
||||
# driver_opts:
|
||||
# # Values can be strings or numbers
|
||||
# com.docker.network.enable_ipv6: "true"
|
||||
# com.docker.network.numeric_value: 1
|
||||
config:
|
||||
- subnet: 172.16.238.0/24
|
||||
# gateway: 172.16.238.1
|
||||
- subnet: 2001:3984:3989::/64
|
||||
# gateway: 2001:3984:3989::1
|
||||
|
||||
external-network:
|
||||
# Specifies that a pre-existing network called "external-network"
|
||||
# can be referred to within this file as "external-network"
|
||||
external: true
|
||||
|
||||
other-external-network:
|
||||
# Specifies that a pre-existing network called "my-cool-network"
|
||||
# can be referred to within this file as "other-external-network"
|
||||
external:
|
||||
name: my-cool-network
|
||||
|
||||
volumes:
|
||||
# Entries can be null, which specifies simply that a volume
|
||||
# called "{project name}_some-volume" should be created and
|
||||
# use the default driver
|
||||
some-volume:
|
||||
|
||||
other-volume:
|
||||
driver: flocker
|
||||
|
||||
driver_opts:
|
||||
# Values can be strings or numbers
|
||||
foo: "bar"
|
||||
baz: 1
|
||||
|
||||
external-volume:
|
||||
# Specifies that a pre-existing volume called "external-volume"
|
||||
# can be referred to within this file as "external-volume"
|
||||
external: true
|
||||
|
||||
other-external-volume:
|
||||
# Specifies that a pre-existing volume called "my-cool-volume"
|
||||
# can be referred to within this file as "other-external-volume"
|
||||
external:
|
||||
name: my-cool-volume
|
||||
@@ -0,0 +1,8 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
|
||||
foobar:
|
||||
image: foo/bar:latest
|
||||
volumes:
|
||||
- /tmp/foo/bar
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
|
||||
redis-master:
|
||||
image: gcr.io/google_containers/redis:e2e
|
||||
ports:
|
||||
- "6379"
|
||||
|
||||
redis-slave:
|
||||
image: gcr.io/google_samples/gb-redisslave:v1
|
||||
ports:
|
||||
- "6379"
|
||||
environment:
|
||||
- GET_HOSTS_FROM=dns
|
||||
|
||||
frontend:
|
||||
image: gcr.io/google-samples/gb-frontend:v4
|
||||
ports:
|
||||
- "80:80"
|
||||
environment:
|
||||
- GET_HOSTS_FROM=dns
|
||||
labels:
|
||||
kompose.service.type: LoadBalancer
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
# passed through
|
||||
FOO=1
|
||||
|
||||
# overridden in example2.env
|
||||
BAR=1
|
||||
|
||||
# overridden in full-example.yml
|
||||
BAZ=1
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
BAR=2
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "foo",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "headless",
|
||||
"port": 55555,
|
||||
"targetPort": 0
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "foo"
|
||||
},
|
||||
"clusterIP": "None"
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "extensions/v1beta1",
|
||||
"metadata": {
|
||||
"name": "foo",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "foo",
|
||||
"image": "foo/bar:latest",
|
||||
"env": [
|
||||
{
|
||||
"name": "FOO",
|
||||
"value": "foo"
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"strategy": {}
|
||||
},
|
||||
"status": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,509 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "foo",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo"
|
||||
},
|
||||
"annotations": {
|
||||
"com.example.description": "Accounting webapp",
|
||||
"com.example.empty-label": "",
|
||||
"com.example.number": "42"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "3000",
|
||||
"port": 3000,
|
||||
"targetPort": 3000
|
||||
},
|
||||
{
|
||||
"name": "3000",
|
||||
"port": 3000,
|
||||
"targetPort": 3000
|
||||
},
|
||||
{
|
||||
"name": "3001",
|
||||
"port": 3001,
|
||||
"targetPort": 3001
|
||||
},
|
||||
{
|
||||
"name": "3002",
|
||||
"port": 3002,
|
||||
"targetPort": 3002
|
||||
},
|
||||
{
|
||||
"name": "3003",
|
||||
"port": 3003,
|
||||
"targetPort": 3003
|
||||
},
|
||||
{
|
||||
"name": "3004",
|
||||
"port": 3004,
|
||||
"targetPort": 3004
|
||||
},
|
||||
{
|
||||
"name": "3005",
|
||||
"port": 3005,
|
||||
"targetPort": 3005
|
||||
},
|
||||
{
|
||||
"name": "8000",
|
||||
"port": 8000,
|
||||
"targetPort": 8000
|
||||
},
|
||||
{
|
||||
"name": "9090",
|
||||
"port": 9090,
|
||||
"targetPort": 8080
|
||||
},
|
||||
{
|
||||
"name": "9091",
|
||||
"port": 9091,
|
||||
"targetPort": 8081
|
||||
},
|
||||
{
|
||||
"name": "49100",
|
||||
"port": 49100,
|
||||
"targetPort": 22
|
||||
},
|
||||
{
|
||||
"name": "8001",
|
||||
"port": 8001,
|
||||
"targetPort": 8001
|
||||
},
|
||||
{
|
||||
"name": "5000",
|
||||
"port": 5000,
|
||||
"targetPort": 5000
|
||||
},
|
||||
{
|
||||
"name": "5001",
|
||||
"port": 5001,
|
||||
"targetPort": 5001
|
||||
},
|
||||
{
|
||||
"name": "5002",
|
||||
"port": 5002,
|
||||
"targetPort": 5002
|
||||
},
|
||||
{
|
||||
"name": "5003",
|
||||
"port": 5003,
|
||||
"targetPort": 5003
|
||||
},
|
||||
{
|
||||
"name": "5004",
|
||||
"port": 5004,
|
||||
"targetPort": 5004
|
||||
},
|
||||
{
|
||||
"name": "5005",
|
||||
"port": 5005,
|
||||
"targetPort": 5005
|
||||
},
|
||||
{
|
||||
"name": "5006",
|
||||
"port": 5006,
|
||||
"targetPort": 5006
|
||||
},
|
||||
{
|
||||
"name": "5007",
|
||||
"port": 5007,
|
||||
"targetPort": 5007
|
||||
},
|
||||
{
|
||||
"name": "5008",
|
||||
"port": 5008,
|
||||
"targetPort": 5008
|
||||
},
|
||||
{
|
||||
"name": "5009",
|
||||
"port": 5009,
|
||||
"targetPort": 5009
|
||||
},
|
||||
{
|
||||
"name": "5010",
|
||||
"port": 5010,
|
||||
"targetPort": 5010
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "foo"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "extensions/v1beta1",
|
||||
"metadata": {
|
||||
"name": "foo",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo"
|
||||
},
|
||||
"annotations": {
|
||||
"com.example.description": "Accounting webapp",
|
||||
"com.example.empty-label": "",
|
||||
"com.example.number": "42"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"volumes": [
|
||||
{
|
||||
"name": "foo-claim0",
|
||||
"persistentVolumeClaim": {
|
||||
"claimName": "foo-claim0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "foo-claim1",
|
||||
"persistentVolumeClaim": {
|
||||
"claimName": "foo-claim1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "foo-claim2",
|
||||
"persistentVolumeClaim": {
|
||||
"claimName": "foo-claim2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "foo-claim3",
|
||||
"persistentVolumeClaim": {
|
||||
"claimName": "foo-claim3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "foo-claim4",
|
||||
"persistentVolumeClaim": {
|
||||
"claimName": "foo-claim4",
|
||||
"readOnly": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "datavolume",
|
||||
"persistentVolumeClaim": {
|
||||
"claimName": "datavolume"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "foo-tmpfs0",
|
||||
"emptyDir": {
|
||||
"medium": "Memory"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "foo-tmpfs1",
|
||||
"emptyDir": {
|
||||
"medium": "Memory"
|
||||
}
|
||||
}
|
||||
],
|
||||
"containers": [
|
||||
{
|
||||
"name": "my-web-container",
|
||||
"image": "redis",
|
||||
"command": [
|
||||
"/code/entrypoint.sh",
|
||||
"-p",
|
||||
"3000"
|
||||
],
|
||||
"args": [
|
||||
"bundle",
|
||||
"exec",
|
||||
"thin",
|
||||
"-p",
|
||||
"3000"
|
||||
],
|
||||
"workingDir": "/code",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 3000
|
||||
},
|
||||
{
|
||||
"containerPort": 3000
|
||||
},
|
||||
{
|
||||
"containerPort": 3001
|
||||
},
|
||||
{
|
||||
"containerPort": 3002
|
||||
},
|
||||
{
|
||||
"containerPort": 3003
|
||||
},
|
||||
{
|
||||
"containerPort": 3004
|
||||
},
|
||||
{
|
||||
"containerPort": 3005
|
||||
},
|
||||
{
|
||||
"containerPort": 8000
|
||||
},
|
||||
{
|
||||
"containerPort": 8080
|
||||
},
|
||||
{
|
||||
"containerPort": 8081
|
||||
},
|
||||
{
|
||||
"containerPort": 22
|
||||
},
|
||||
{
|
||||
"containerPort": 8001
|
||||
},
|
||||
{
|
||||
"containerPort": 5000
|
||||
},
|
||||
{
|
||||
"containerPort": 5001
|
||||
},
|
||||
{
|
||||
"containerPort": 5002
|
||||
},
|
||||
{
|
||||
"containerPort": 5003
|
||||
},
|
||||
{
|
||||
"containerPort": 5004
|
||||
},
|
||||
{
|
||||
"containerPort": 5005
|
||||
},
|
||||
{
|
||||
"containerPort": 5006
|
||||
},
|
||||
{
|
||||
"containerPort": 5007
|
||||
},
|
||||
{
|
||||
"containerPort": 5008
|
||||
},
|
||||
{
|
||||
"containerPort": 5009
|
||||
},
|
||||
{
|
||||
"containerPort": 5010
|
||||
}
|
||||
],
|
||||
"resources": {
|
||||
"limits": {
|
||||
"memory": "52428800"
|
||||
}
|
||||
},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "foo-claim0",
|
||||
"mountPath": "/var/lib/mysql"
|
||||
},
|
||||
{
|
||||
"name": "foo-claim1",
|
||||
"mountPath": "/var/lib/mysql"
|
||||
},
|
||||
{
|
||||
"name": "foo-claim2",
|
||||
"mountPath": "/code"
|
||||
},
|
||||
{
|
||||
"name": "foo-claim3",
|
||||
"mountPath": "/var/www/html"
|
||||
},
|
||||
{
|
||||
"name": "foo-claim4",
|
||||
"readOnly": true,
|
||||
"mountPath": "/etc/configs/"
|
||||
},
|
||||
{
|
||||
"name": "datavolume",
|
||||
"mountPath": "/var/lib/mysql"
|
||||
},
|
||||
{
|
||||
"name": "foo-tmpfs0",
|
||||
"mountPath": "/run"
|
||||
},
|
||||
{
|
||||
"name": "foo-tmpfs1",
|
||||
"mountPath": "/tmp"
|
||||
}
|
||||
],
|
||||
"securityContext": {
|
||||
"capabilities": {
|
||||
"add": [
|
||||
"ALL"
|
||||
],
|
||||
"drop": [
|
||||
"NET_ADMIN",
|
||||
"SYS_ADMIN"
|
||||
]
|
||||
},
|
||||
"privileged": true
|
||||
},
|
||||
"stdin": true,
|
||||
"tty": true
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"strategy": {
|
||||
"type": "Recreate"
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "PersistentVolumeClaim",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "foo-claim0",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo-claim0"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"accessModes": [
|
||||
"ReadWriteOnce"
|
||||
],
|
||||
"resources": {
|
||||
"requests": {
|
||||
"storage": "100Mi"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "PersistentVolumeClaim",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "foo-claim1",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo-claim1"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"accessModes": [
|
||||
"ReadWriteOnce"
|
||||
],
|
||||
"resources": {
|
||||
"requests": {
|
||||
"storage": "100Mi"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "PersistentVolumeClaim",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "foo-claim2",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo-claim2"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"accessModes": [
|
||||
"ReadWriteOnce"
|
||||
],
|
||||
"resources": {
|
||||
"requests": {
|
||||
"storage": "100Mi"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "PersistentVolumeClaim",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "foo-claim3",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo-claim3"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"accessModes": [
|
||||
"ReadWriteOnce"
|
||||
],
|
||||
"resources": {
|
||||
"requests": {
|
||||
"storage": "100Mi"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "PersistentVolumeClaim",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "foo-claim4",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo-claim4"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"accessModes": [
|
||||
"ReadOnlyMany"
|
||||
],
|
||||
"resources": {
|
||||
"requests": {
|
||||
"storage": "100Mi"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "PersistentVolumeClaim",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "datavolume",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "datavolume"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"accessModes": [
|
||||
"ReadWriteOnce"
|
||||
],
|
||||
"resources": {
|
||||
"requests": {
|
||||
"storage": "100Mi"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
+221
@@ -0,0 +1,221 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "frontend",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "frontend"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.type": "LoadBalancer"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "80",
|
||||
"port": 80,
|
||||
"targetPort": 80
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "frontend"
|
||||
},
|
||||
"type": "LoadBalancer"
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis-master",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis-master"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "6379",
|
||||
"port": 6379,
|
||||
"targetPort": 6379
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "redis-master"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis-slave",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis-slave"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "6379",
|
||||
"port": 6379,
|
||||
"targetPort": 6379
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "redis-slave"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "extensions/v1beta1",
|
||||
"metadata": {
|
||||
"name": "frontend",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "frontend"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.type": "LoadBalancer"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "frontend"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "frontend",
|
||||
"image": "gcr.io/google-samples/gb-frontend:v4",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 80
|
||||
}
|
||||
],
|
||||
"env": [
|
||||
{
|
||||
"name": "GET_HOSTS_FROM",
|
||||
"value": "dns"
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"strategy": {}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "extensions/v1beta1",
|
||||
"metadata": {
|
||||
"name": "redis-master",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis-master"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis-master"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "redis-master",
|
||||
"image": "gcr.io/google_containers/redis:e2e",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 6379
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"strategy": {}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "extensions/v1beta1",
|
||||
"metadata": {
|
||||
"name": "redis-slave",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis-slave"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis-slave"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "redis-slave",
|
||||
"image": "gcr.io/google_samples/gb-redisslave:v1",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 6379
|
||||
}
|
||||
],
|
||||
"env": [
|
||||
{
|
||||
"name": "GET_HOSTS_FROM",
|
||||
"value": "dns"
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"strategy": {}
|
||||
},
|
||||
"status": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
+560
@@ -0,0 +1,560 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "foo",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo"
|
||||
},
|
||||
"annotations": {
|
||||
"com.example.description": "Accounting webapp",
|
||||
"com.example.empty-label": "",
|
||||
"com.example.number": "42"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "3000",
|
||||
"port": 3000,
|
||||
"targetPort": 3000
|
||||
},
|
||||
{
|
||||
"name": "3000",
|
||||
"port": 3000,
|
||||
"targetPort": 3000
|
||||
},
|
||||
{
|
||||
"name": "3001",
|
||||
"port": 3001,
|
||||
"targetPort": 3001
|
||||
},
|
||||
{
|
||||
"name": "3002",
|
||||
"port": 3002,
|
||||
"targetPort": 3002
|
||||
},
|
||||
{
|
||||
"name": "3003",
|
||||
"port": 3003,
|
||||
"targetPort": 3003
|
||||
},
|
||||
{
|
||||
"name": "3004",
|
||||
"port": 3004,
|
||||
"targetPort": 3004
|
||||
},
|
||||
{
|
||||
"name": "3005",
|
||||
"port": 3005,
|
||||
"targetPort": 3005
|
||||
},
|
||||
{
|
||||
"name": "8000",
|
||||
"port": 8000,
|
||||
"targetPort": 8000
|
||||
},
|
||||
{
|
||||
"name": "9090",
|
||||
"port": 9090,
|
||||
"targetPort": 8080
|
||||
},
|
||||
{
|
||||
"name": "9091",
|
||||
"port": 9091,
|
||||
"targetPort": 8081
|
||||
},
|
||||
{
|
||||
"name": "49100",
|
||||
"port": 49100,
|
||||
"targetPort": 22
|
||||
},
|
||||
{
|
||||
"name": "8001",
|
||||
"port": 8001,
|
||||
"targetPort": 8001
|
||||
},
|
||||
{
|
||||
"name": "5000",
|
||||
"port": 5000,
|
||||
"targetPort": 5000
|
||||
},
|
||||
{
|
||||
"name": "5001",
|
||||
"port": 5001,
|
||||
"targetPort": 5001
|
||||
},
|
||||
{
|
||||
"name": "5002",
|
||||
"port": 5002,
|
||||
"targetPort": 5002
|
||||
},
|
||||
{
|
||||
"name": "5003",
|
||||
"port": 5003,
|
||||
"targetPort": 5003
|
||||
},
|
||||
{
|
||||
"name": "5004",
|
||||
"port": 5004,
|
||||
"targetPort": 5004
|
||||
},
|
||||
{
|
||||
"name": "5005",
|
||||
"port": 5005,
|
||||
"targetPort": 5005
|
||||
},
|
||||
{
|
||||
"name": "5006",
|
||||
"port": 5006,
|
||||
"targetPort": 5006
|
||||
},
|
||||
{
|
||||
"name": "5007",
|
||||
"port": 5007,
|
||||
"targetPort": 5007
|
||||
},
|
||||
{
|
||||
"name": "5008",
|
||||
"port": 5008,
|
||||
"targetPort": 5008
|
||||
},
|
||||
{
|
||||
"name": "5009",
|
||||
"port": 5009,
|
||||
"targetPort": 5009
|
||||
},
|
||||
{
|
||||
"name": "5010",
|
||||
"port": 5010,
|
||||
"targetPort": 5010
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "foo"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "foo",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo"
|
||||
},
|
||||
"annotations": {
|
||||
"com.example.description": "Accounting webapp",
|
||||
"com.example.empty-label": "",
|
||||
"com.example.number": "42"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"type": "Recreate",
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"my-web-container"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "foo:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "foo"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"volumes": [
|
||||
{
|
||||
"name": "foo-claim0",
|
||||
"persistentVolumeClaim": {
|
||||
"claimName": "foo-claim0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "foo-claim1",
|
||||
"persistentVolumeClaim": {
|
||||
"claimName": "foo-claim1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "foo-claim2",
|
||||
"persistentVolumeClaim": {
|
||||
"claimName": "foo-claim2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "foo-claim3",
|
||||
"persistentVolumeClaim": {
|
||||
"claimName": "foo-claim3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "foo-claim4",
|
||||
"persistentVolumeClaim": {
|
||||
"claimName": "foo-claim4",
|
||||
"readOnly": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "datavolume",
|
||||
"persistentVolumeClaim": {
|
||||
"claimName": "datavolume"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "foo-tmpfs0",
|
||||
"emptyDir": {
|
||||
"medium": "Memory"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "foo-tmpfs1",
|
||||
"emptyDir": {
|
||||
"medium": "Memory"
|
||||
}
|
||||
}
|
||||
],
|
||||
"containers": [
|
||||
{
|
||||
"name": "my-web-container",
|
||||
"image": " ",
|
||||
"command": [
|
||||
"/code/entrypoint.sh",
|
||||
"-p",
|
||||
"3000"
|
||||
],
|
||||
"args": [
|
||||
"bundle",
|
||||
"exec",
|
||||
"thin",
|
||||
"-p",
|
||||
"3000"
|
||||
],
|
||||
"workingDir": "/code",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 3000
|
||||
},
|
||||
{
|
||||
"containerPort": 3000
|
||||
},
|
||||
{
|
||||
"containerPort": 3001
|
||||
},
|
||||
{
|
||||
"containerPort": 3002
|
||||
},
|
||||
{
|
||||
"containerPort": 3003
|
||||
},
|
||||
{
|
||||
"containerPort": 3004
|
||||
},
|
||||
{
|
||||
"containerPort": 3005
|
||||
},
|
||||
{
|
||||
"containerPort": 8000
|
||||
},
|
||||
{
|
||||
"containerPort": 8080
|
||||
},
|
||||
{
|
||||
"containerPort": 8081
|
||||
},
|
||||
{
|
||||
"containerPort": 22
|
||||
},
|
||||
{
|
||||
"containerPort": 8001
|
||||
},
|
||||
{
|
||||
"containerPort": 5000
|
||||
},
|
||||
{
|
||||
"containerPort": 5001
|
||||
},
|
||||
{
|
||||
"containerPort": 5002
|
||||
},
|
||||
{
|
||||
"containerPort": 5003
|
||||
},
|
||||
{
|
||||
"containerPort": 5004
|
||||
},
|
||||
{
|
||||
"containerPort": 5005
|
||||
},
|
||||
{
|
||||
"containerPort": 5006
|
||||
},
|
||||
{
|
||||
"containerPort": 5007
|
||||
},
|
||||
{
|
||||
"containerPort": 5008
|
||||
},
|
||||
{
|
||||
"containerPort": 5009
|
||||
},
|
||||
{
|
||||
"containerPort": 5010
|
||||
}
|
||||
],
|
||||
"resources": {
|
||||
"limits": {
|
||||
"memory": "52428800"
|
||||
}
|
||||
},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "foo-claim0",
|
||||
"mountPath": "/var/lib/mysql"
|
||||
},
|
||||
{
|
||||
"name": "foo-claim1",
|
||||
"mountPath": "/var/lib/mysql"
|
||||
},
|
||||
{
|
||||
"name": "foo-claim2",
|
||||
"mountPath": "/code"
|
||||
},
|
||||
{
|
||||
"name": "foo-claim3",
|
||||
"mountPath": "/var/www/html"
|
||||
},
|
||||
{
|
||||
"name": "foo-claim4",
|
||||
"readOnly": true,
|
||||
"mountPath": "/etc/configs/"
|
||||
},
|
||||
{
|
||||
"name": "datavolume",
|
||||
"mountPath": "/var/lib/mysql"
|
||||
},
|
||||
{
|
||||
"name": "foo-tmpfs0",
|
||||
"mountPath": "/run"
|
||||
},
|
||||
{
|
||||
"name": "foo-tmpfs1",
|
||||
"mountPath": "/tmp"
|
||||
}
|
||||
],
|
||||
"securityContext": {
|
||||
"capabilities": {
|
||||
"add": [
|
||||
"ALL"
|
||||
],
|
||||
"drop": [
|
||||
"NET_ADMIN",
|
||||
"SYS_ADMIN"
|
||||
]
|
||||
},
|
||||
"privileged": true
|
||||
},
|
||||
"stdin": true,
|
||||
"tty": true
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "foo",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "redis"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "PersistentVolumeClaim",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "foo-claim0",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo-claim0"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"accessModes": [
|
||||
"ReadWriteOnce"
|
||||
],
|
||||
"resources": {
|
||||
"requests": {
|
||||
"storage": "100Mi"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "PersistentVolumeClaim",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "foo-claim1",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo-claim1"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"accessModes": [
|
||||
"ReadWriteOnce"
|
||||
],
|
||||
"resources": {
|
||||
"requests": {
|
||||
"storage": "100Mi"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "PersistentVolumeClaim",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "foo-claim2",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo-claim2"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"accessModes": [
|
||||
"ReadWriteOnce"
|
||||
],
|
||||
"resources": {
|
||||
"requests": {
|
||||
"storage": "100Mi"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "PersistentVolumeClaim",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "foo-claim3",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo-claim3"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"accessModes": [
|
||||
"ReadWriteOnce"
|
||||
],
|
||||
"resources": {
|
||||
"requests": {
|
||||
"storage": "100Mi"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "PersistentVolumeClaim",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "foo-claim4",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foo-claim4"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"accessModes": [
|
||||
"ReadOnlyMany"
|
||||
],
|
||||
"resources": {
|
||||
"requests": {
|
||||
"storage": "100Mi"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "PersistentVolumeClaim",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "datavolume",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "datavolume"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"accessModes": [
|
||||
"ReadWriteOnce"
|
||||
],
|
||||
"resources": {
|
||||
"requests": {
|
||||
"storage": "100Mi"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
+377
@@ -0,0 +1,377 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "frontend",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "frontend"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.type": "LoadBalancer"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "80",
|
||||
"port": 80,
|
||||
"targetPort": 80
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "frontend"
|
||||
},
|
||||
"type": "LoadBalancer"
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis-master",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis-master"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "6379",
|
||||
"port": 6379,
|
||||
"targetPort": 6379
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "redis-master"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis-slave",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis-slave"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "6379",
|
||||
"port": 6379,
|
||||
"targetPort": 6379
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "redis-slave"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "frontend",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "frontend"
|
||||
},
|
||||
"annotations": {
|
||||
"kompose.service.type": "LoadBalancer"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"frontend"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "frontend:v4"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "frontend"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "frontend"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "frontend",
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 80
|
||||
}
|
||||
],
|
||||
"env": [
|
||||
{
|
||||
"name": "GET_HOSTS_FROM",
|
||||
"value": "dns"
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "frontend",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "frontend"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"tags": [
|
||||
{
|
||||
"name": "v4",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "gcr.io/google-samples/gb-frontend:v4"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis-master",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis-master"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"redis-master"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "redis-master:e2e"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "redis-master"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis-master"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "redis-master",
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 6379
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis-master",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis-master"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"tags": [
|
||||
{
|
||||
"name": "e2e",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "gcr.io/google_containers/redis:e2e"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis-slave",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis-slave"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"redis-slave"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "redis-slave:v1"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "redis-slave"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis-slave"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "redis-slave",
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 6379
|
||||
}
|
||||
],
|
||||
"env": [
|
||||
{
|
||||
"name": "GET_HOSTS_FROM",
|
||||
"value": "dns"
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis-slave",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "redis-slave"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"tags": [
|
||||
{
|
||||
"name": "v1",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "gcr.io/google_samples/gb-redisslave:v1"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+106
@@ -0,0 +1,106 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "foobar",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foobar"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "headless",
|
||||
"port": 55555,
|
||||
"targetPort": 0
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "foobar"
|
||||
},
|
||||
"clusterIP": "None"
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "extensions/v1beta1",
|
||||
"metadata": {
|
||||
"name": "foobar",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foobar"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foobar"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"volumes": [
|
||||
{
|
||||
"name": "foobar-claim0",
|
||||
"persistentVolumeClaim": {
|
||||
"claimName": "foobar-claim0"
|
||||
}
|
||||
}
|
||||
],
|
||||
"containers": [
|
||||
{
|
||||
"name": "foobar",
|
||||
"image": "foo/bar:latest",
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "foobar-claim0",
|
||||
"mountPath": "/tmp/foo/bar"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
},
|
||||
"strategy": {
|
||||
"type": "Recreate"
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "PersistentVolumeClaim",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "foobar-claim0",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "foobar-claim0"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"accessModes": [
|
||||
"ReadWriteOnce"
|
||||
],
|
||||
"resources": {
|
||||
"requests": {
|
||||
"storage": "100Mi"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user