-
Notifications
You must be signed in to change notification settings - Fork 28
Add documentation for pod-overrides and container-overrides attributes #70
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 documentation for pod-overrides and container-overrides attributes #70
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 45e9d74. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch ✅ Successfully ran 5 targetsSent with 💌 from NxCloud. |
mike-hoang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sidebar also needs to be updated if a new file is added: https://github.com/devfile/devfile-web/tree/main/apps/landing-page#configuring-navigation but otherwise everything else looks good to me
libs/docs/src/docs/2.2.1-alpha/overriding-pod-and-container-attributes.md
Outdated
Show resolved
Hide resolved
libs/docs/src/docs/2.2.1-alpha/overriding-pod-and-container-attributes.md
Outdated
Show resolved
Hide resolved
libs/docs/src/docs/2.2.1-alpha/overriding-pod-and-container-attributes.md
Outdated
Show resolved
Hide resolved
libs/docs/src/docs/2.2.1-alpha/overriding-pod-and-container-attributes.md
Outdated
Show resolved
Hide resolved
libs/docs/src/docs/2.2.1-alpha/overriding-pod-and-container-attributes.md
Outdated
Show resolved
Hide resolved
libs/docs/src/docs/2.2.1-alpha/overriding-pod-and-container-attributes.md
Outdated
Show resolved
Hide resolved
libs/docs/src/docs/2.2.1-alpha/overriding-pod-and-container-attributes.md
Outdated
Show resolved
Hide resolved
libs/docs/src/docs/2.2.1-alpha/overriding-pod-and-container-attributes.md
Outdated
Show resolved
Hide resolved
libs/docs/src/docs/2.2.1-alpha/overriding-pod-and-container-attributes.md
Outdated
Show resolved
Hide resolved
libs/docs/src/docs/2.2.1-alpha/overriding-pod-and-container-attributes.md
Outdated
Show resolved
Hide resolved
69bdf32 to
9a6886c
Compare
|
|
||
| ## container-overrides | ||
|
|
||
| `container-overrides` attributes allow you to override properties of a container in a pod spec such as `securityContext` and `resources`. However, it restricts from overriding properties such as `image`, `name`, `ports`, `env`, `volumesMounts`, `command`, and `args`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have other implementations, like in DevWorkspace Operator, the same restrictions?
If not, than it needs to be mentioned
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the time of implementation, DWO had the same restriction. I'll check again and update the doc.
kadel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be included in 2.2.0, 2.1.0, 2.0.0 as well as in 2.2.1-alpha.
The reason is that this is an attribute that doesn't affect Devfile schema, and we support it in all supported versions.
| The data inside `container-overrides` can also be specified as a JSON. | ||
| ```yaml | ||
| container-overrides: | ||
| securityContext: {"runAsUser": "1001", "runAsGroup":"1001"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not working.
Error occurred on Push - watch command was unable to push component: unable to create or update component: failed to parse container-overrides attribute on component tools: json: cannot unmarshal string into Go struct field SecurityContext.securityContext.runAsGroup of type int64
The uid and guid needs to be number not string
| components: | ||
| - name: maven | ||
| attributes: | ||
| pod-overrides: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to test this, but it doesn't seem to work :-(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. I've created a fix devfile/library#162.
| @@ -0,0 +1,78 @@ | |||
| --- | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just need to add the overriding-pod-and-container-attributes.md file to the corresponding versions of the sidebar navigation and then it's good to go
for example, 2.2.0 would be located here: https://github.com/devfile/devfile-web/blob/main/libs/docs/src/navigation/2.2.0.yaml
Signed-off-by: Parthvi Vala <pvala@redhat.com>
…tributes.md Co-authored-by: Michael Hoang <35011707+mike-hoang@users.noreply.github.com> Signed-off-by: Parthvi Vala <pvala@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
…0 and 2.2.0 Signed-off-by: Parthvi Vala <pvala@redhat.com>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
e4f9bcd to
3136fb4
Compare
Signed-off-by: Michael Hoang <mhoang@redhat.com>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mike-hoang, valaparthvi The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Parthvi Vala pvala@redhat.com
What does this PR do / why we need it
This PR adds documentation for
container-overridesandpod-overridesattributes.Which issue(s) does this PR fix
Fixes devfile/api#1005
PR acceptance criteria
How to test changes / Special notes to the reviewer