forked from LaconicNetwork/kompose
Added support for group_add key
This PR will add support for `group_add` key which will map to supplemental group in pod security context.
This commit is contained in:
@@ -174,6 +174,17 @@ convert::expect_success "kompose -f $KOMPOSE_ROOT/script/test/fixtures/tty-true/
|
||||
# openshift test
|
||||
convert::expect_success "kompose --provider openshift -f $KOMPOSE_ROOT/script/test/fixtures/tty-true/docker-compose.yml convert --stdout -j" "$KOMPOSE_ROOT/script/test/fixtures/tty-true/output-oc.json"
|
||||
|
||||
# Test related to "group_add" in docker-compose
|
||||
# kubernetes test
|
||||
convert::expect_success "kompose -f $KOMPOSE_ROOT/script/test/fixtures/group-add/docker-compose.yml convert --stdout -j" "$KOMPOSE_ROOT/script/test/fixtures/group-add/output-k8s.json"
|
||||
# openshift test
|
||||
convert::expect_success "kompose --provider openshift -f $KOMPOSE_ROOT/script/test/fixtures/group-add/docker-compose.yml convert --stdout -j" "$KOMPOSE_ROOT/script/test/fixtures/group-add/output-os.json"
|
||||
|
||||
# Test related to Failing "group_add" in docker-compose
|
||||
# kubernetes test
|
||||
convert::expect_failure "kompose -f $KOMPOSE_ROOT/script/test/fixtures/group-add/docker-compose-fail.yml convert --stdout -j"
|
||||
# openshift test
|
||||
convert::expect_failure "kompose --provider openshift -f $KOMPOSE_ROOT/script/test/fixtures/group-add/docker-compose-fail.yml convert --stdout -j"
|
||||
|
||||
# Test related to kompose.expose.service label in docker compose file to ensure that services are exposed properly
|
||||
#kubernetes tests
|
||||
|
||||
+4
-4
@@ -1047,6 +1047,10 @@
|
||||
"name": "hygieia-udeploy",
|
||||
"image": "hygieia-udeploy-collector:latest",
|
||||
"env": [
|
||||
{
|
||||
"name": "UDEPLOY_PASSWORD",
|
||||
"value": "-s3cr3t"
|
||||
},
|
||||
{
|
||||
"name": "UDEPLOY_URL",
|
||||
"value": "-http://udeploy.company.com"
|
||||
@@ -1054,10 +1058,6 @@
|
||||
{
|
||||
"name": "UDEPLOY_USERNAME",
|
||||
"value": "-bobama"
|
||||
},
|
||||
{
|
||||
"name": "UDEPLOY_PASSWORD",
|
||||
"value": "-s3cr3t"
|
||||
}
|
||||
],
|
||||
"resources": {},
|
||||
|
||||
+8
-8
@@ -110,6 +110,14 @@
|
||||
}
|
||||
],
|
||||
"env": [
|
||||
{
|
||||
"name": "DB_DBID",
|
||||
"value": "etherpad"
|
||||
},
|
||||
{
|
||||
"name": "DB_HOST",
|
||||
"value": "mariadb"
|
||||
},
|
||||
{
|
||||
"name": "DB_PASS",
|
||||
"value": "etherpad"
|
||||
@@ -121,14 +129,6 @@
|
||||
{
|
||||
"name": "DB_USER",
|
||||
"value": "etherpad"
|
||||
},
|
||||
{
|
||||
"name": "DB_DBID",
|
||||
"value": "etherpad"
|
||||
},
|
||||
{
|
||||
"name": "DB_HOST",
|
||||
"value": "mariadb"
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
version: '2'
|
||||
services:
|
||||
myservice:
|
||||
image: alpine
|
||||
group_add:
|
||||
- "mail"
|
||||
@@ -0,0 +1,6 @@
|
||||
version: '2'
|
||||
services:
|
||||
myservice:
|
||||
image: alpine
|
||||
group_add:
|
||||
- "1234"
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "myservice",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "myservice"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "headless",
|
||||
"port": 55555,
|
||||
"targetPort": 0
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "myservice"
|
||||
},
|
||||
"clusterIP": "None"
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Deployment",
|
||||
"apiVersion": "extensions/v1beta1",
|
||||
"metadata": {
|
||||
"name": "myservice",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "myservice"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"replicas": 1,
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "myservice"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "myservice",
|
||||
"image": "alpine",
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always",
|
||||
"securityContext": {
|
||||
"supplementalGroups": [
|
||||
1234
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"strategy": {}
|
||||
},
|
||||
"status": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
+125
@@ -0,0 +1,125 @@
|
||||
{
|
||||
"kind": "List",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "myservice",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "myservice"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "headless",
|
||||
"port": 55555,
|
||||
"targetPort": 0
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"io.kompose.service": "myservice"
|
||||
},
|
||||
"clusterIP": "None"
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "myservice",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "myservice"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"myservice"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "myservice:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"io.kompose.service": "myservice"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "myservice"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "myservice",
|
||||
"image": " ",
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always",
|
||||
"securityContext": {
|
||||
"supplementalGroups": [
|
||||
1234
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "myservice",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"io.kompose.service": "myservice"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "alpine"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -33,4 +33,3 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -105,18 +105,18 @@
|
||||
},
|
||||
"spec": {
|
||||
"volumes": [
|
||||
{
|
||||
"name": "bar-claim1",
|
||||
"persistentVolumeClaim": {
|
||||
"claimName": "bar-claim1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "foo-claim0",
|
||||
"persistentVolumeClaim": {
|
||||
"claimName": "foo-claim0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "bar-claim1",
|
||||
"persistentVolumeClaim": {
|
||||
"claimName": "bar-claim1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "foo-claim1",
|
||||
"persistentVolumeClaim": {
|
||||
@@ -140,14 +140,14 @@
|
||||
],
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "bar-claim1",
|
||||
"mountPath": "/bar"
|
||||
},
|
||||
{
|
||||
"name": "foo-claim0",
|
||||
"mountPath": "/foo1"
|
||||
},
|
||||
{
|
||||
"name": "bar-claim1",
|
||||
"mountPath": "/bar"
|
||||
},
|
||||
{
|
||||
"name": "foo-claim1",
|
||||
"mountPath": "/foo2"
|
||||
|
||||
@@ -131,18 +131,18 @@
|
||||
},
|
||||
"spec": {
|
||||
"volumes": [
|
||||
{
|
||||
"name": "bar-claim1",
|
||||
"persistentVolumeClaim": {
|
||||
"claimName": "bar-claim1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "foo-claim0",
|
||||
"persistentVolumeClaim": {
|
||||
"claimName": "foo-claim0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "bar-claim1",
|
||||
"persistentVolumeClaim": {
|
||||
"claimName": "bar-claim1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "foo-claim1",
|
||||
"persistentVolumeClaim": {
|
||||
@@ -166,14 +166,14 @@
|
||||
],
|
||||
"resources": {},
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "bar-claim1",
|
||||
"mountPath": "/bar"
|
||||
},
|
||||
{
|
||||
"name": "foo-claim0",
|
||||
"mountPath": "/foo1"
|
||||
},
|
||||
{
|
||||
"name": "bar-claim1",
|
||||
"mountPath": "/bar"
|
||||
},
|
||||
{
|
||||
"name": "foo-claim1",
|
||||
"mountPath": "/foo2"
|
||||
|
||||
Reference in New Issue
Block a user