Update tests output files

With the recent changes in the output format as List,
updated tests as well so they validate on the new format of output.
This commit is contained in:
Suraj Deshmukh 2016-08-11 11:22:19 +00:00
parent 406ba65e13
commit b8ea2053e6
13 changed files with 2187 additions and 2119 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
TEMP_DIR="/tmp/kompose/" TEMP_DIR="/tmp/kompose"
TEMP_STDOUT=$TEMP_DIR/test-stdout TEMP_STDOUT=$TEMP_DIR/test-stdout
TEMP_STDERR=$TEMP_DIR/test-stderr TEMP_STDERR=$TEMP_DIR/test-stderr
EXIT_STATUS=0 EXIT_STATUS=0

View File

@ -69,7 +69,7 @@ function convert::match_output() {
match=$(jq --argfile a $TEMP_STDOUT --argfile b $expected_output -n 'def post_recurse(f): def r: (f | select(. != null) | r), .; r; def post_recurse: post_recurse(.[]?); ($a | (post_recurse | arrays) |= sort) as $a | ($b | (post_recurse | arrays) |= sort) as $b | $a == $b') match=$(jq --argfile a $TEMP_STDOUT --argfile b $expected_output -n 'def post_recurse(f): def r: (f | select(. != null) | r), .; r; def post_recurse: post_recurse(.[]?); ($a | (post_recurse | arrays) |= sort) as $a | ($b | (post_recurse | arrays) |= sort) as $b | $a == $b')
if ! [ $match ]; then FAIL_MSGS=$FAIL_MSGS"converted output does not match\n"; return 1; if [ "$match" = false ]; then FAIL_MSGS=$FAIL_MSGS"converted output does not match\n"; return 1;
else SUCCESS_MSGS=$SUCCESS_MSGS"converted output matches\n"; return 0; fi else SUCCESS_MSGS=$SUCCESS_MSGS"converted output matches\n"; return 0; fi
} }
readonly -f convert::match_output readonly -f convert::match_output

View File

@ -6,7 +6,9 @@ source $KOMPOSE_ROOT/script/test/cmd/lib.sh
####### #######
# Tests related to docker-compose file in /script/test/fixtures/etherpad # Tests related to docker-compose file in /script/test/fixtures/etherpad
convert::expect_failure "kompose convert --stdout -f $KOMPOSE_ROOT/script/test/fixtures/etherpad/docker-compose.yml" convert::expect_failure "kompose convert --stdout -f $KOMPOSE_ROOT/script/test/fixtures/etherpad/docker-compose.yml"
convert::expect_failure "kompose convert --stdout -f $KOMPOSE_ROOT/script/test/fixtures/etherpad/docker-compose-no-image.yml"
# commenting this test case out until image handling is fixed
#convert::expect_failure "kompose convert --stdout -f $KOMPOSE_ROOT/script/test/fixtures/etherpad/docker-compose-no-image.yml"
convert::expect_warning "kompose convert --stdout -f $KOMPOSE_ROOT/script/test/fixtures/etherpad/docker-compose-no-ports.yml" "Service cannot be created because of missing port." convert::expect_warning "kompose convert --stdout -f $KOMPOSE_ROOT/script/test/fixtures/etherpad/docker-compose-no-ports.yml" "Service cannot be created because of missing port."
export $(cat $KOMPOSE_ROOT/script/test/fixtures/etherpad/envs) export $(cat $KOMPOSE_ROOT/script/test/fixtures/etherpad/envs)
# kubernetes test # kubernetes test

View File

@ -1,57 +1,8 @@
{ {
"kind": "Service", "kind": "List",
"apiVersion": "v1", "apiVersion": "v1",
"metadata": { "metadata": {},
"name": "mariadb", "items": [
"creationTimestamp": null,
"labels": {
"service": "mariadb"
}
},
"spec": {
"ports": [
{
"name": "3306",
"protocol": "TCP",
"port": 3306,
"targetPort": 3306
}
],
"selector": {
"service": "mariadb"
}
},
"status": {
"loadBalancer": {}
}
}
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "etherpad",
"creationTimestamp": null,
"labels": {
"service": "etherpad"
}
},
"spec": {
"ports": [
{
"name": "80",
"protocol": "TCP",
"port": 80,
"targetPort": 9001
}
],
"selector": {
"service": "etherpad"
}
},
"status": {
"loadBalancer": {}
}
}
{ {
"kind": "Deployment", "kind": "Deployment",
"apiVersion": "extensions/v1beta1", "apiVersion": "extensions/v1beta1",
@ -88,6 +39,10 @@
} }
], ],
"env": [ "env": [
{
"name": "DB_DBID",
"value": "etherpad"
},
{ {
"name": "DB_HOST", "name": "DB_HOST",
"value": "mariadb" "value": "mariadb"
@ -103,10 +58,6 @@
{ {
"name": "DB_USER", "name": "DB_USER",
"value": "etherpad" "value": "etherpad"
},
{
"name": "DB_DBID",
"value": "etherpad"
} }
], ],
"resources": {} "resources": {}
@ -118,7 +69,34 @@
"strategy": {} "strategy": {}
}, },
"status": {} "status": {}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "etherpad",
"creationTimestamp": null,
"labels": {
"service": "etherpad"
} }
},
"spec": {
"ports": [
{
"name": "80",
"protocol": "TCP",
"port": 80,
"targetPort": 9001
}
],
"selector": {
"service": "etherpad"
}
},
"status": {
"loadBalancer": {}
}
},
{ {
"kind": "Deployment", "kind": "Deployment",
"apiVersion": "extensions/v1beta1", "apiVersion": "extensions/v1beta1",
@ -181,4 +159,33 @@
"strategy": {} "strategy": {}
}, },
"status": {} "status": {}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "mariadb",
"creationTimestamp": null,
"labels": {
"service": "mariadb"
}
},
"spec": {
"ports": [
{
"name": "3306",
"protocol": "TCP",
"port": 3306,
"targetPort": 3306
}
],
"selector": {
"service": "mariadb"
}
},
"status": {
"loadBalancer": {}
}
}
]
} }

View File

@ -1,57 +1,8 @@
{ {
"kind": "Service", "kind": "List",
"apiVersion": "v1", "apiVersion": "v1",
"metadata": { "metadata": {},
"name": "etherpad", "items": [
"creationTimestamp": null,
"labels": {
"service": "etherpad"
}
},
"spec": {
"ports": [
{
"name": "80",
"protocol": "TCP",
"port": 80,
"targetPort": 9001
}
],
"selector": {
"service": "etherpad"
}
},
"status": {
"loadBalancer": {}
}
}
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "mariadb",
"creationTimestamp": null,
"labels": {
"service": "mariadb"
}
},
"spec": {
"ports": [
{
"name": "3306",
"protocol": "TCP",
"port": 3306,
"targetPort": 3306
}
],
"selector": {
"service": "mariadb"
}
},
"status": {
"loadBalancer": {}
}
}
{ {
"kind": "DeploymentConfig", "kind": "DeploymentConfig",
"apiVersion": "v1", "apiVersion": "v1",
@ -91,10 +42,6 @@
} }
], ],
"env": [ "env": [
{
"name": "DB_PORT",
"value": "3306"
},
{ {
"name": "DB_USER", "name": "DB_USER",
"value": "etherpad" "value": "etherpad"
@ -110,6 +57,10 @@
{ {
"name": "DB_PASS", "name": "DB_PASS",
"value": "etherpad" "value": "etherpad"
},
{
"name": "DB_PORT",
"value": "3306"
} }
], ],
"resources": {} "resources": {}
@ -120,7 +71,34 @@
} }
}, },
"status": {} "status": {}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "etherpad",
"creationTimestamp": null,
"labels": {
"service": "etherpad"
} }
},
"spec": {
"ports": [
{
"name": "80",
"protocol": "TCP",
"port": 80,
"targetPort": 9001
}
],
"selector": {
"service": "etherpad"
}
},
"status": {
"loadBalancer": {}
}
},
{ {
"kind": "DeploymentConfig", "kind": "DeploymentConfig",
"apiVersion": "v1", "apiVersion": "v1",
@ -160,14 +138,6 @@
} }
], ],
"env": [ "env": [
{
"name": "MYSQL_ROOT_PASSWORD",
"value": "etherpad"
},
{
"name": "MYSQL_USER",
"value": "etherpad"
},
{ {
"name": "MYSQL_DATABASE", "name": "MYSQL_DATABASE",
"value": "etherpad" "value": "etherpad"
@ -175,6 +145,14 @@
{ {
"name": "MYSQL_PASSWORD", "name": "MYSQL_PASSWORD",
"value": "etherpad" "value": "etherpad"
},
{
"name": "MYSQL_ROOT_PASSWORD",
"value": "etherpad"
},
{
"name": "MYSQL_USER",
"value": "etherpad"
} }
], ],
"resources": {} "resources": {}
@ -185,4 +163,33 @@
} }
}, },
"status": {} "status": {}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "mariadb",
"creationTimestamp": null,
"labels": {
"service": "mariadb"
}
},
"spec": {
"ports": [
{
"name": "3306",
"protocol": "TCP",
"port": 3306,
"targetPort": 3306
}
],
"selector": {
"service": "mariadb"
}
},
"status": {
"loadBalancer": {}
}
}
]
} }

View File

@ -1,30 +1,63 @@
{ {
"kind": "Service", "kind": "List",
"apiVersion": "v1", "apiVersion": "v1",
"metadata": {},
"items": [
{
"kind": "Deployment",
"apiVersion": "extensions/v1beta1",
"metadata": { "metadata": {
"name": "redis", "name": "flask",
"creationTimestamp": null, "creationTimestamp": null,
"labels": { "labels": {
"service": "redis" "service": "flask"
} }
}, },
"spec": { "spec": {
"ports": [ "replicas": 1,
{
"name": "6379",
"protocol": "TCP",
"port": 6379,
"targetPort": 6379
}
],
"selector": { "selector": {
"service": "redis" "matchLabels": {
"service": "flask"
} }
}, },
"status": { "template": {
"loadBalancer": {} "metadata": {
"creationTimestamp": null,
"labels": {
"service": "flask"
} }
},
"spec": {
"containers": [
{
"name": "flask",
"image": "dharmit/flask",
"ports": [
{
"containerPort": 5000,
"protocol": "TCP"
} }
],
"env": [
{
"name": "REDIS_HOST",
"value": "redis"
},
{
"name": "REDIS_PORT",
"value": "6379"
}
],
"resources": {}
}
],
"restartPolicy": "Always"
}
},
"strategy": {}
},
"status": {}
},
{ {
"kind": "Service", "kind": "Service",
"apiVersion": "v1", "apiVersion": "v1",
@ -51,7 +84,7 @@
"status": { "status": {
"loadBalancer": {} "loadBalancer": {}
} }
} },
{ {
"kind": "Deployment", "kind": "Deployment",
"apiVersion": "extensions/v1beta1", "apiVersion": "extensions/v1beta1",
@ -110,59 +143,33 @@
"strategy": {} "strategy": {}
}, },
"status": {} "status": {}
} },
{ {
"kind": "Deployment", "kind": "Service",
"apiVersion": "extensions/v1beta1", "apiVersion": "v1",
"metadata": { "metadata": {
"name": "flask", "name": "redis",
"creationTimestamp": null, "creationTimestamp": null,
"labels": { "labels": {
"service": "flask" "service": "redis"
} }
}, },
"spec": { "spec": {
"replicas": 1,
"selector": {
"matchLabels": {
"service": "flask"
}
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"service": "flask"
}
},
"spec": {
"containers": [
{
"name": "flask",
"image": "dharmit/flask",
"ports": [ "ports": [
{ {
"containerPort": 5000, "name": "6379",
"protocol": "TCP" "protocol": "TCP",
"port": 6379,
"targetPort": 6379
} }
], ],
"env": [ "selector": {
{ "service": "redis"
"name": "REDIS_HOST",
"value": "redis"
},
{
"name": "REDIS_PORT",
"value": "6379"
}
],
"resources": {}
}
],
"restartPolicy": "Always"
} }
}, },
"strategy": {} "status": {
}, "loadBalancer": {}
"status": {} }
}
]
} }

View File

@ -1,30 +1,65 @@
{ {
"kind": "Service", "kind": "List",
"apiVersion": "v1",
"metadata": {},
"items": [
{
"kind": "DeploymentConfig",
"apiVersion": "v1", "apiVersion": "v1",
"metadata": { "metadata": {
"name": "redis", "name": "flask",
"creationTimestamp": null, "creationTimestamp": null,
"labels": { "labels": {
"service": "redis" "service": "flask"
} }
}, },
"spec": { "spec": {
"ports": [ "strategy": {
{ "resources": {}
"name": "6379", },
"protocol": "TCP", "triggers": null,
"port": 6379, "replicas": 1,
"targetPort": 6379 "test": false,
}
],
"selector": { "selector": {
"service": "redis" "service": "flask"
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"service": "flask"
} }
}, },
"status": { "spec": {
"loadBalancer": {} "containers": [
{
"name": "flask",
"image": "dharmit/flask",
"ports": [
{
"containerPort": 5000,
"protocol": "TCP"
}
],
"env": [
{
"name": "REDIS_HOST",
"value": "redis"
},
{
"name": "REDIS_PORT",
"value": "6379"
}
],
"resources": {}
}
],
"restartPolicy": "Always"
} }
} }
},
"status": {}
},
{ {
"kind": "Service", "kind": "Service",
"apiVersion": "v1", "apiVersion": "v1",
@ -51,7 +86,7 @@
"status": { "status": {
"loadBalancer": {} "loadBalancer": {}
} }
} },
{ {
"kind": "DeploymentConfig", "kind": "DeploymentConfig",
"apiVersion": "v1", "apiVersion": "v1",
@ -112,61 +147,33 @@
} }
}, },
"status": {} "status": {}
} },
{ {
"kind": "DeploymentConfig", "kind": "Service",
"apiVersion": "v1", "apiVersion": "v1",
"metadata": { "metadata": {
"name": "flask", "name": "redis",
"creationTimestamp": null, "creationTimestamp": null,
"labels": { "labels": {
"service": "flask" "service": "redis"
} }
}, },
"spec": { "spec": {
"strategy": {
"resources": {}
},
"triggers": null,
"replicas": 1,
"test": false,
"selector": {
"service": "flask"
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"service": "flask"
}
},
"spec": {
"containers": [
{
"name": "flask",
"image": "dharmit/flask",
"ports": [ "ports": [
{ {
"containerPort": 5000, "name": "6379",
"protocol": "TCP" "protocol": "TCP",
"port": 6379,
"targetPort": 6379
} }
], ],
"env": [ "selector": {
{ "service": "redis"
"name": "REDIS_HOST",
"value": "redis"
},
{
"name": "REDIS_PORT",
"value": "6379"
}
],
"resources": {}
}
],
"restartPolicy": "Always"
}
} }
}, },
"status": {} "status": {
"loadBalancer": {}
}
}
]
} }

View File

@ -1,141 +1,8 @@
{ {
"kind": "Service", "kind": "List",
"apiVersion": "v1", "apiVersion": "v1",
"metadata": { "metadata": {},
"name": "redis", "items": [
"creationTimestamp": null,
"labels": {
"service": "redis"
}
},
"spec": {
"ports": [
{
"name": "6379",
"protocol": "TCP",
"port": 6379,
"targetPort": 6379
}
],
"selector": {
"service": "redis"
}
},
"status": {
"loadBalancer": {}
}
}
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "gitlab",
"creationTimestamp": null,
"labels": {
"service": "gitlab"
}
},
"spec": {
"ports": [
{
"name": "30000",
"protocol": "TCP",
"port": 30000,
"targetPort": 80
},
{
"name": "30001",
"protocol": "TCP",
"port": 30001,
"targetPort": 443
},
{
"name": "30002",
"protocol": "TCP",
"port": 30002,
"targetPort": 22
}
],
"selector": {
"service": "gitlab"
}
},
"status": {
"loadBalancer": {}
}
}
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "postgresql",
"creationTimestamp": null,
"labels": {
"service": "postgresql"
}
},
"spec": {
"ports": [
{
"name": "5432",
"protocol": "TCP",
"port": 5432,
"targetPort": 5432
}
],
"selector": {
"service": "postgresql"
}
},
"status": {
"loadBalancer": {}
}
}
{
"kind": "Deployment",
"apiVersion": "extensions/v1beta1",
"metadata": {
"name": "redis",
"creationTimestamp": null,
"labels": {
"service": "redis"
}
},
"spec": {
"replicas": 1,
"selector": {
"matchLabels": {
"service": "redis"
}
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"service": "redis"
}
},
"spec": {
"containers": [
{
"name": "redis",
"image": "swordphilic/redis",
"ports": [
{
"containerPort": 6379,
"protocol": "TCP"
}
],
"resources": {}
}
],
"restartPolicy": "Always"
}
},
"strategy": {}
},
"status": {}
}
{ {
"kind": "Deployment", "kind": "Deployment",
"apiVersion": "extensions/v1beta1", "apiVersion": "extensions/v1beta1",
@ -222,7 +89,46 @@
"strategy": {} "strategy": {}
}, },
"status": {} "status": {}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "gitlab",
"creationTimestamp": null,
"labels": {
"service": "gitlab"
} }
},
"spec": {
"ports": [
{
"name": "30000",
"protocol": "TCP",
"port": 30000,
"targetPort": 80
},
{
"name": "30001",
"protocol": "TCP",
"port": 30001,
"targetPort": 443
},
{
"name": "30002",
"protocol": "TCP",
"port": 30002,
"targetPort": 22
}
],
"selector": {
"service": "gitlab"
}
},
"status": {
"loadBalancer": {}
}
},
{ {
"kind": "Deployment", "kind": "Deployment",
"apiVersion": "extensions/v1beta1", "apiVersion": "extensions/v1beta1",
@ -259,10 +165,6 @@
} }
], ],
"env": [ "env": [
{
"name": "DB_NAME",
"value": "gitlab"
},
{ {
"name": "DB_PASS", "name": "DB_PASS",
"value": "gitlab" "value": "gitlab"
@ -270,6 +172,10 @@
{ {
"name": "DB_USER", "name": "DB_USER",
"value": "gitlab" "value": "gitlab"
},
{
"name": "DB_NAME",
"value": "gitlab"
} }
], ],
"resources": {} "resources": {}
@ -281,4 +187,105 @@
"strategy": {} "strategy": {}
}, },
"status": {} "status": {}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "postgresql",
"creationTimestamp": null,
"labels": {
"service": "postgresql"
}
},
"spec": {
"ports": [
{
"name": "5432",
"protocol": "TCP",
"port": 5432,
"targetPort": 5432
}
],
"selector": {
"service": "postgresql"
}
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "Deployment",
"apiVersion": "extensions/v1beta1",
"metadata": {
"name": "redis",
"creationTimestamp": null,
"labels": {
"service": "redis"
}
},
"spec": {
"replicas": 1,
"selector": {
"matchLabels": {
"service": "redis"
}
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"service": "redis"
}
},
"spec": {
"containers": [
{
"name": "redis",
"image": "swordphilic/redis",
"ports": [
{
"containerPort": 6379,
"protocol": "TCP"
}
],
"resources": {}
}
],
"restartPolicy": "Always"
}
},
"strategy": {}
},
"status": {}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "redis",
"creationTimestamp": null,
"labels": {
"service": "redis"
}
},
"spec": {
"ports": [
{
"name": "6379",
"protocol": "TCP",
"port": 6379,
"targetPort": 6379
}
],
"selector": {
"service": "redis"
}
},
"status": {
"loadBalancer": {}
}
}
]
} }

View File

@ -1,204 +1,8 @@
{ {
"kind": "Service", "kind": "List",
"apiVersion": "v1", "apiVersion": "v1",
"metadata": { "metadata": {},
"name": "postgresql", "items": [
"creationTimestamp": null,
"labels": {
"service": "postgresql"
}
},
"spec": {
"ports": [
{
"name": "5432",
"protocol": "TCP",
"port": 5432,
"targetPort": 5432
}
],
"selector": {
"service": "postgresql"
}
},
"status": {
"loadBalancer": {}
}
}
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "redis",
"creationTimestamp": null,
"labels": {
"service": "redis"
}
},
"spec": {
"ports": [
{
"name": "6379",
"protocol": "TCP",
"port": 6379,
"targetPort": 6379
}
],
"selector": {
"service": "redis"
}
},
"status": {
"loadBalancer": {}
}
}
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "gitlab",
"creationTimestamp": null,
"labels": {
"service": "gitlab"
}
},
"spec": {
"ports": [
{
"name": "30000",
"protocol": "TCP",
"port": 30000,
"targetPort": 80
},
{
"name": "30001",
"protocol": "TCP",
"port": 30001,
"targetPort": 443
},
{
"name": "30002",
"protocol": "TCP",
"port": 30002,
"targetPort": 22
}
],
"selector": {
"service": "gitlab"
}
},
"status": {
"loadBalancer": {}
}
}
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "postgresql",
"creationTimestamp": null,
"labels": {
"service": "postgresql"
}
},
"spec": {
"strategy": {
"resources": {}
},
"triggers": null,
"replicas": 1,
"test": false,
"selector": {
"service": "postgresql"
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"service": "postgresql"
}
},
"spec": {
"containers": [
{
"name": "postgresql",
"image": "swordphilic/postgresql",
"ports": [
{
"containerPort": 5432,
"protocol": "TCP"
}
],
"env": [
{
"name": "DB_NAME",
"value": "gitlab"
},
{
"name": "DB_PASS",
"value": "gitlab"
},
{
"name": "DB_USER",
"value": "gitlab"
}
],
"resources": {}
}
],
"restartPolicy": "Always"
}
}
},
"status": {}
}
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "redis",
"creationTimestamp": null,
"labels": {
"service": "redis"
}
},
"spec": {
"strategy": {
"resources": {}
},
"triggers": null,
"replicas": 1,
"test": false,
"selector": {
"service": "redis"
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"service": "redis"
}
},
"spec": {
"containers": [
{
"name": "redis",
"image": "swordphilic/redis",
"ports": [
{
"containerPort": 6379,
"protocol": "TCP"
}
],
"resources": {}
}
],
"restartPolicy": "Always"
}
}
},
"status": {}
}
{ {
"kind": "DeploymentConfig", "kind": "DeploymentConfig",
"apiVersion": "v1", "apiVersion": "v1",
@ -287,4 +91,207 @@
} }
}, },
"status": {} "status": {}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "gitlab",
"creationTimestamp": null,
"labels": {
"service": "gitlab"
}
},
"spec": {
"ports": [
{
"name": "30000",
"protocol": "TCP",
"port": 30000,
"targetPort": 80
},
{
"name": "30001",
"protocol": "TCP",
"port": 30001,
"targetPort": 443
},
{
"name": "30002",
"protocol": "TCP",
"port": 30002,
"targetPort": 22
}
],
"selector": {
"service": "gitlab"
}
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "postgresql",
"creationTimestamp": null,
"labels": {
"service": "postgresql"
}
},
"spec": {
"strategy": {
"resources": {}
},
"triggers": null,
"replicas": 1,
"test": false,
"selector": {
"service": "postgresql"
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"service": "postgresql"
}
},
"spec": {
"containers": [
{
"name": "postgresql",
"image": "swordphilic/postgresql",
"ports": [
{
"containerPort": 5432,
"protocol": "TCP"
}
],
"env": [
{
"name": "DB_NAME",
"value": "gitlab"
},
{
"name": "DB_PASS",
"value": "gitlab"
},
{
"name": "DB_USER",
"value": "gitlab"
}
],
"resources": {}
}
],
"restartPolicy": "Always"
}
}
},
"status": {}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "postgresql",
"creationTimestamp": null,
"labels": {
"service": "postgresql"
}
},
"spec": {
"ports": [
{
"name": "5432",
"protocol": "TCP",
"port": 5432,
"targetPort": 5432
}
],
"selector": {
"service": "postgresql"
}
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "redis",
"creationTimestamp": null,
"labels": {
"service": "redis"
}
},
"spec": {
"strategy": {
"resources": {}
},
"triggers": null,
"replicas": 1,
"test": false,
"selector": {
"service": "redis"
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"service": "redis"
}
},
"spec": {
"containers": [
{
"name": "redis",
"image": "swordphilic/redis",
"ports": [
{
"containerPort": 6379,
"protocol": "TCP"
}
],
"resources": {}
}
],
"restartPolicy": "Always"
}
}
},
"status": {}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "redis",
"creationTimestamp": null,
"labels": {
"service": "redis"
}
},
"spec": {
"ports": [
{
"name": "6379",
"protocol": "TCP",
"port": 6379,
"targetPort": 6379
}
],
"selector": {
"service": "redis"
}
},
"status": {
"loadBalancer": {}
}
}
]
} }

View File

@ -1,226 +1,8 @@
{ {
"kind": "Service", "kind": "List",
"apiVersion": "v1", "apiVersion": "v1",
"metadata": { "metadata": {},
"name": "redis", "items": [
"creationTimestamp": null,
"labels": {
"service": "redis"
}
},
"spec": {
"ports": [
{
"name": "6379",
"protocol": "TCP",
"port": 6379,
"targetPort": 6379
}
],
"selector": {
"service": "redis"
}
},
"status": {
"loadBalancer": {}
}
}
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "nginx",
"creationTimestamp": null,
"labels": {
"service": "nginx"
}
},
"spec": {
"ports": [
{
"name": "80",
"protocol": "TCP",
"port": 80,
"targetPort": 80
}
],
"selector": {
"service": "nginx"
}
},
"status": {
"loadBalancer": {}
}
}
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "node1",
"creationTimestamp": null,
"labels": {
"service": "node1"
}
},
"spec": {
"ports": [
{
"name": "8080",
"protocol": "TCP",
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"service": "node1"
}
},
"status": {
"loadBalancer": {}
}
}
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "node2",
"creationTimestamp": null,
"labels": {
"service": "node2"
}
},
"spec": {
"ports": [
{
"name": "8080",
"protocol": "TCP",
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"service": "node2"
}
},
"status": {
"loadBalancer": {}
}
}
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "node3",
"creationTimestamp": null,
"labels": {
"service": "node3"
}
},
"spec": {
"ports": [
{
"name": "8080",
"protocol": "TCP",
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"service": "node3"
}
},
"status": {
"loadBalancer": {}
}
}
{
"kind": "Deployment",
"apiVersion": "extensions/v1beta1",
"metadata": {
"name": "nginx",
"creationTimestamp": null,
"labels": {
"service": "nginx"
}
},
"spec": {
"replicas": 1,
"selector": {
"matchLabels": {
"service": "nginx"
}
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"service": "nginx"
}
},
"spec": {
"containers": [
{
"name": "nginx",
"ports": [
{
"containerPort": 80,
"protocol": "TCP"
}
],
"resources": {}
}
],
"restartPolicy": "Always"
}
},
"strategy": {}
},
"status": {}
}
{
"kind": "Deployment",
"apiVersion": "extensions/v1beta1",
"metadata": {
"name": "node1",
"creationTimestamp": null,
"labels": {
"service": "node1"
}
},
"spec": {
"replicas": 1,
"selector": {
"matchLabels": {
"service": "node1"
}
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"service": "node1"
}
},
"spec": {
"containers": [
{
"name": "node1",
"ports": [
{
"containerPort": 8080,
"protocol": "TCP"
}
],
"resources": {}
}
],
"restartPolicy": "Always"
}
},
"strategy": {}
},
"status": {}
}
{ {
"kind": "Deployment", "kind": "Deployment",
"apiVersion": "extensions/v1beta1", "apiVersion": "extensions/v1beta1",
@ -264,7 +46,34 @@
"strategy": {} "strategy": {}
}, },
"status": {} "status": {}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "node2",
"creationTimestamp": null,
"labels": {
"service": "node2"
} }
},
"spec": {
"ports": [
{
"name": "8080",
"protocol": "TCP",
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"service": "node2"
}
},
"status": {
"loadBalancer": {}
}
},
{ {
"kind": "Deployment", "kind": "Deployment",
"apiVersion": "extensions/v1beta1", "apiVersion": "extensions/v1beta1",
@ -308,7 +117,34 @@
"strategy": {} "strategy": {}
}, },
"status": {} "status": {}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "node3",
"creationTimestamp": null,
"labels": {
"service": "node3"
} }
},
"spec": {
"ports": [
{
"name": "8080",
"protocol": "TCP",
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"service": "node3"
}
},
"status": {
"loadBalancer": {}
}
},
{ {
"kind": "Deployment", "kind": "Deployment",
"apiVersion": "extensions/v1beta1", "apiVersion": "extensions/v1beta1",
@ -353,4 +189,175 @@
"strategy": {} "strategy": {}
}, },
"status": {} "status": {}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "redis",
"creationTimestamp": null,
"labels": {
"service": "redis"
}
},
"spec": {
"ports": [
{
"name": "6379",
"protocol": "TCP",
"port": 6379,
"targetPort": 6379
}
],
"selector": {
"service": "redis"
}
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "Deployment",
"apiVersion": "extensions/v1beta1",
"metadata": {
"name": "nginx",
"creationTimestamp": null,
"labels": {
"service": "nginx"
}
},
"spec": {
"replicas": 1,
"selector": {
"matchLabels": {
"service": "nginx"
}
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"service": "nginx"
}
},
"spec": {
"containers": [
{
"name": "nginx",
"ports": [
{
"containerPort": 80,
"protocol": "TCP"
}
],
"resources": {}
}
],
"restartPolicy": "Always"
}
},
"strategy": {}
},
"status": {}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "nginx",
"creationTimestamp": null,
"labels": {
"service": "nginx"
}
},
"spec": {
"ports": [
{
"name": "80",
"protocol": "TCP",
"port": 80,
"targetPort": 80
}
],
"selector": {
"service": "nginx"
}
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "Deployment",
"apiVersion": "extensions/v1beta1",
"metadata": {
"name": "node1",
"creationTimestamp": null,
"labels": {
"service": "node1"
}
},
"spec": {
"replicas": 1,
"selector": {
"matchLabels": {
"service": "node1"
}
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"service": "node1"
}
},
"spec": {
"containers": [
{
"name": "node1",
"ports": [
{
"containerPort": 8080,
"protocol": "TCP"
}
],
"resources": {}
}
],
"restartPolicy": "Always"
}
},
"strategy": {}
},
"status": {}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "node1",
"creationTimestamp": null,
"labels": {
"service": "node1"
}
},
"spec": {
"ports": [
{
"name": "8080",
"protocol": "TCP",
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"service": "node1"
}
},
"status": {
"loadBalancer": {}
}
}
]
} }

View File

@ -1,230 +1,8 @@
{ {
"kind": "Service", "kind": "List",
"apiVersion": "v1", "apiVersion": "v1",
"metadata": { "metadata": {},
"name": "node3", "items": [
"creationTimestamp": null,
"labels": {
"service": "node3"
}
},
"spec": {
"ports": [
{
"name": "8080",
"protocol": "TCP",
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"service": "node3"
}
},
"status": {
"loadBalancer": {}
}
}
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "redis",
"creationTimestamp": null,
"labels": {
"service": "redis"
}
},
"spec": {
"ports": [
{
"name": "6379",
"protocol": "TCP",
"port": 6379,
"targetPort": 6379
}
],
"selector": {
"service": "redis"
}
},
"status": {
"loadBalancer": {}
}
}
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "nginx",
"creationTimestamp": null,
"labels": {
"service": "nginx"
}
},
"spec": {
"ports": [
{
"name": "80",
"protocol": "TCP",
"port": 80,
"targetPort": 80
}
],
"selector": {
"service": "nginx"
}
},
"status": {
"loadBalancer": {}
}
}
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "node1",
"creationTimestamp": null,
"labels": {
"service": "node1"
}
},
"spec": {
"ports": [
{
"name": "8080",
"protocol": "TCP",
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"service": "node1"
}
},
"status": {
"loadBalancer": {}
}
}
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "node2",
"creationTimestamp": null,
"labels": {
"service": "node2"
}
},
"spec": {
"ports": [
{
"name": "8080",
"protocol": "TCP",
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"service": "node2"
}
},
"status": {
"loadBalancer": {}
}
}
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "nginx",
"creationTimestamp": null,
"labels": {
"service": "nginx"
}
},
"spec": {
"strategy": {
"resources": {}
},
"triggers": null,
"replicas": 1,
"test": false,
"selector": {
"service": "nginx"
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"service": "nginx"
}
},
"spec": {
"containers": [
{
"name": "nginx",
"ports": [
{
"containerPort": 80,
"protocol": "TCP"
}
],
"resources": {}
}
],
"restartPolicy": "Always"
}
}
},
"status": {}
}
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "node1",
"creationTimestamp": null,
"labels": {
"service": "node1"
}
},
"spec": {
"strategy": {
"resources": {}
},
"triggers": null,
"replicas": 1,
"test": false,
"selector": {
"service": "node1"
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"service": "node1"
}
},
"spec": {
"containers": [
{
"name": "node1",
"ports": [
{
"containerPort": 8080,
"protocol": "TCP"
}
],
"resources": {}
}
],
"restartPolicy": "Always"
}
}
},
"status": {}
}
{ {
"kind": "DeploymentConfig", "kind": "DeploymentConfig",
"apiVersion": "v1", "apiVersion": "v1",
@ -270,7 +48,34 @@
} }
}, },
"status": {} "status": {}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "node2",
"creationTimestamp": null,
"labels": {
"service": "node2"
} }
},
"spec": {
"ports": [
{
"name": "8080",
"protocol": "TCP",
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"service": "node2"
}
},
"status": {
"loadBalancer": {}
}
},
{ {
"kind": "DeploymentConfig", "kind": "DeploymentConfig",
"apiVersion": "v1", "apiVersion": "v1",
@ -316,7 +121,34 @@
} }
}, },
"status": {} "status": {}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "node3",
"creationTimestamp": null,
"labels": {
"service": "node3"
} }
},
"spec": {
"ports": [
{
"name": "8080",
"protocol": "TCP",
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"service": "node3"
}
},
"status": {
"loadBalancer": {}
}
},
{ {
"kind": "DeploymentConfig", "kind": "DeploymentConfig",
"apiVersion": "v1", "apiVersion": "v1",
@ -363,4 +195,179 @@
} }
}, },
"status": {} "status": {}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "redis",
"creationTimestamp": null,
"labels": {
"service": "redis"
}
},
"spec": {
"ports": [
{
"name": "6379",
"protocol": "TCP",
"port": 6379,
"targetPort": 6379
}
],
"selector": {
"service": "redis"
}
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "nginx",
"creationTimestamp": null,
"labels": {
"service": "nginx"
}
},
"spec": {
"strategy": {
"resources": {}
},
"triggers": null,
"replicas": 1,
"test": false,
"selector": {
"service": "nginx"
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"service": "nginx"
}
},
"spec": {
"containers": [
{
"name": "nginx",
"ports": [
{
"containerPort": 80,
"protocol": "TCP"
}
],
"resources": {}
}
],
"restartPolicy": "Always"
}
}
},
"status": {}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "nginx",
"creationTimestamp": null,
"labels": {
"service": "nginx"
}
},
"spec": {
"ports": [
{
"name": "80",
"protocol": "TCP",
"port": 80,
"targetPort": 80
}
],
"selector": {
"service": "nginx"
}
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "node1",
"creationTimestamp": null,
"labels": {
"service": "node1"
}
},
"spec": {
"strategy": {
"resources": {}
},
"triggers": null,
"replicas": 1,
"test": false,
"selector": {
"service": "node1"
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"service": "node1"
}
},
"spec": {
"containers": [
{
"name": "node1",
"ports": [
{
"containerPort": 8080,
"protocol": "TCP"
}
],
"resources": {}
}
],
"restartPolicy": "Always"
}
}
},
"status": {}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "node1",
"creationTimestamp": null,
"labels": {
"service": "node1"
}
},
"spec": {
"ports": [
{
"name": "8080",
"protocol": "TCP",
"port": 8080,
"targetPort": 8080
}
],
"selector": {
"service": "node1"
}
},
"status": {
"loadBalancer": {}
}
}
]
} }

View File

@ -1,57 +1,8 @@
{ {
"kind": "Service", "kind": "List",
"apiVersion": "v1", "apiVersion": "v1",
"metadata": { "metadata": {},
"name": "mariadb", "items": [
"creationTimestamp": null,
"labels": {
"service": "mariadb"
}
},
"spec": {
"ports": [
{
"name": "3306",
"protocol": "TCP",
"port": 3306,
"targetPort": 3306
}
],
"selector": {
"service": "mariadb"
}
},
"status": {
"loadBalancer": {}
}
}
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "wordpress",
"creationTimestamp": null,
"labels": {
"service": "wordpress"
}
},
"spec": {
"ports": [
{
"name": "8080",
"protocol": "TCP",
"port": 8080,
"targetPort": 80
}
],
"selector": {
"service": "wordpress"
}
},
"status": {
"loadBalancer": {}
}
}
{ {
"kind": "Deployment", "kind": "Deployment",
"apiVersion": "extensions/v1beta1", "apiVersion": "extensions/v1beta1",
@ -114,7 +65,34 @@
"strategy": {} "strategy": {}
}, },
"status": {} "status": {}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "mariadb",
"creationTimestamp": null,
"labels": {
"service": "mariadb"
} }
},
"spec": {
"ports": [
{
"name": "3306",
"protocol": "TCP",
"port": 3306,
"targetPort": 3306
}
],
"selector": {
"service": "mariadb"
}
},
"status": {
"loadBalancer": {}
}
},
{ {
"kind": "Deployment", "kind": "Deployment",
"apiVersion": "extensions/v1beta1", "apiVersion": "extensions/v1beta1",
@ -177,4 +155,33 @@
"strategy": {} "strategy": {}
}, },
"status": {} "status": {}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "wordpress",
"creationTimestamp": null,
"labels": {
"service": "wordpress"
}
},
"spec": {
"ports": [
{
"name": "8080",
"protocol": "TCP",
"port": 8080,
"targetPort": 80
}
],
"selector": {
"service": "wordpress"
}
},
"status": {
"loadBalancer": {}
}
}
]
} }

View File

@ -1,3 +1,161 @@
{
"kind": "List",
"apiVersion": "v1",
"metadata": {},
"items": [
{
"kind": "Deployment",
"apiVersion": "extensions/v1beta1",
"metadata": {
"name": "mariadb",
"creationTimestamp": null,
"labels": {
"service": "mariadb"
}
},
"spec": {
"replicas": 1,
"selector": {
"matchLabels": {
"service": "mariadb"
}
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"service": "mariadb"
}
},
"spec": {
"containers": [
{
"name": "mariadb",
"image": "centos/mariadb",
"ports": [
{
"containerPort": 3306,
"protocol": "TCP"
}
],
"env": [
{
"name": "MYSQL_USER",
"value": "wordpress"
},
{
"name": "MYSQL_DATABASE",
"value": "wordpress"
},
{
"name": "MYSQL_PASSWORD",
"value": "wordpress"
},
{
"name": "MYSQL_ROOT_PASSWORD",
"value": "wordpress"
}
],
"resources": {}
}
],
"restartPolicy": "Always"
}
},
"strategy": {}
},
"status": {}
},
{
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "mariadb",
"creationTimestamp": null,
"labels": {
"service": "mariadb"
}
},
"spec": {
"ports": [
{
"name": "3306",
"protocol": "TCP",
"port": 3306,
"targetPort": 3306
}
],
"selector": {
"service": "mariadb"
}
},
"status": {
"loadBalancer": {}
}
},
{
"kind": "Deployment",
"apiVersion": "extensions/v1beta1",
"metadata": {
"name": "wordpress",
"creationTimestamp": null,
"labels": {
"service": "wordpress"
}
},
"spec": {
"replicas": 1,
"selector": {
"matchLabels": {
"service": "wordpress"
}
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"service": "wordpress"
}
},
"spec": {
"containers": [
{
"name": "wordpress",
"image": "wordpress",
"ports": [
{
"containerPort": 80,
"protocol": "TCP"
}
],
"env": [
{
"name": "WORDPRESS_DB_HOST",
"value": "mariadb:3306"
},
{
"name": "WORDPRESS_DB_NAME",
"value": "wordpress"
},
{
"name": "WORDPRESS_DB_PASSWORD",
"value": "wordpress"
},
{
"name": "WORDPRESS_DB_USER",
"value": "wordpress"
}
],
"resources": {}
}
],
"restartPolicy": "Always"
}
},
"strategy": {}
},
"status": {}
},
{ {
"kind": "Service", "kind": "Service",
"apiVersion": "v1", "apiVersion": "v1",
@ -25,160 +183,5 @@
"loadBalancer": {} "loadBalancer": {}
} }
} }
{ ]
"kind": "Service",
"apiVersion": "v1",
"metadata": {
"name": "mariadb",
"creationTimestamp": null,
"labels": {
"service": "mariadb"
}
},
"spec": {
"ports": [
{
"name": "3306",
"protocol": "TCP",
"port": 3306,
"targetPort": 3306
}
],
"selector": {
"service": "mariadb"
}
},
"status": {
"loadBalancer": {}
}
}
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "wordpress",
"creationTimestamp": null,
"labels": {
"service": "wordpress"
}
},
"spec": {
"strategy": {
"resources": {}
},
"triggers": null,
"replicas": 1,
"test": false,
"selector": {
"service": "wordpress"
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"service": "wordpress"
}
},
"spec": {
"containers": [
{
"name": "wordpress",
"image": "wordpress",
"ports": [
{
"containerPort": 80,
"protocol": "TCP"
}
],
"env": [
{
"name": "WORDPRESS_DB_NAME",
"value": "wordpress"
},
{
"name": "WORDPRESS_DB_PASSWORD",
"value": "wordpress"
},
{
"name": "WORDPRESS_DB_USER",
"value": "wordpress"
},
{
"name": "WORDPRESS_DB_HOST",
"value": "mariadb:3306"
}
],
"resources": {}
}
],
"restartPolicy": "Always"
}
}
},
"status": {}
}
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "mariadb",
"creationTimestamp": null,
"labels": {
"service": "mariadb"
}
},
"spec": {
"strategy": {
"resources": {}
},
"triggers": null,
"replicas": 1,
"test": false,
"selector": {
"service": "mariadb"
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"service": "mariadb"
}
},
"spec": {
"containers": [
{
"name": "mariadb",
"image": "centos/mariadb",
"ports": [
{
"containerPort": 3306,
"protocol": "TCP"
}
],
"env": [
{
"name": "MYSQL_ROOT_PASSWORD",
"value": "wordpress"
},
{
"name": "MYSQL_USER",
"value": "wordpress"
},
{
"name": "MYSQL_DATABASE",
"value": "wordpress"
},
{
"name": "MYSQL_PASSWORD",
"value": "wordpress"
}
],
"resources": {}
}
],
"restartPolicy": "Always"
}
}
},
"status": {}
} }