Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Init Containers to common definitions #19855

Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
}
}
},
"Container": {
"description": "Container App container definition.",
"InitContainer": {
p-bouchon marked this conversation as resolved.
Show resolved Hide resolved
"description": "Container App init container definition.",
"type": "object",
"properties": {
"image": {
Expand Down Expand Up @@ -74,16 +74,6 @@
"$ref": "#/definitions/ContainerResources",
"description": "Container resource requirements."
},
"probes": {
"description": "List of probes for the container.",
"type": "array",
"items": {
"$ref": "#/definitions/ContainerAppProbe"
},
"x-ms-identifiers": [
"type"
]
},
"volumeMounts": {
"description": "Container volume mounts.",
"type": "array",
Expand All @@ -96,6 +86,29 @@
}
}
},
"Container": {
"allOf": [
{
"$ref": "#/definitions/InitContainer"
},
{
p-bouchon marked this conversation as resolved.
Show resolved Hide resolved
"description": "Container App container definition.",
"type": "object",
"properties": {
"probes": {
"description": "List of probes for the container.",
"type": "array",
"items": {
"$ref": "#/definitions/ContainerAppProbe"
},
"x-ms-identifiers": [
"type"
]
}
}
}
]
},
"ContainerResources": {
"description": "Container App container resource requirements.",
"type": "object",
Expand Down Expand Up @@ -468,6 +481,16 @@
"description": "User friendly suffix that is appended to the revision name",
"type": "string"
},
"initContainers": {
p-bouchon marked this conversation as resolved.
Show resolved Hide resolved
"description": "List of specialized containers that run before app containers.",
"type": "array",
"items": {
"$ref": "#/definitions/InitContainer"
},
"x-ms-identifiers": [
"name"
]
},
"containers": {
"description": "List of container definitions for the Container App.",
"type": "array",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,23 @@
]
}
],
"initContainers": [
{
"image": "repo/testcontainerApp0:v4",
"name": "testinitcontainerApp0",
"resources": {
"cpu": 0.2,
"memory": "100Mi"
},
"command": [
"/bin/sh"
],
"args": [
"-c",
"while true; do echo hello; sleep 10;done"
]
}
],
"scale": {
"minReplicas": 1,
"maxReplicas": 5,
Expand Down Expand Up @@ -159,6 +176,23 @@
]
}
],
"initContainers": [
{
"image": "repo/testcontainerApp0:v4",
"name": "testinitcontainerApp0",
"resources": {
"cpu": 0.2,
"memory": "100Mi"
},
"command": [
"/bin/sh"
],
"args": [
"-c",
"while true; do echo hello; sleep 10;done"
]
}
],
"scale": {
"minReplicas": 1,
"maxReplicas": 5,
Expand Down Expand Up @@ -241,6 +275,23 @@
]
}
],
"initContainers": [
{
"image": "repo/testcontainerApp0:v4",
"name": "testinitcontainerApp0",
"resources": {
"cpu": 0.2,
"memory": "100Mi"
},
"command": [
"/bin/sh"
],
"args": [
"-c",
"while true; do echo hello; sleep 10;done"
]
}
],
"scale": {
"minReplicas": 1,
"maxReplicas": 5,
Expand Down