coreos-cincinnati: Move from deprecated DeploymentConfig to Deployment #2629

Merged
ryanlerch merged 1 commit from PR/cincinnati into main 2025-05-20 16:47:56 +00:00
Contributor

As a previous migration attempt wasn't completed successfully, this revised version is aiming to complete the previous steps. First in the first commit I moved all of the yaml templates to j2. In the second commit I am removing the fields which are invalid for the new Deployment, which appeared while running the sudo rbac-playbook -l os_control_stg openshift-apps/coreos-cincinnati.yml command on batcave.

As a previous migration attempt wasn't completed successfully, this revised version is aiming to complete the previous steps. First in the first commit I moved all of the yaml templates to j2. In the second commit I am removing the fields which are invalid for the new Deployment, which appeared while running the `sudo rbac-playbook -l os_control_stg openshift-apps/coreos-cincinnati.yml` command on batcave.
First-time contributor
Build succeeded. https://fedora.softwarefactory-project.io/zuul/buildset/824da687289a4ea18c345cfec194afe9 - [fi-ansible-lint-diff ](https://fedora.softwarefactory-project.io/zuul/build/83e428cb74d245f4a5dcf274c42fa50b) : SUCCESS in 3m 20s - [fi-yamllint-diff ](https://fedora.softwarefactory-project.io/zuul/build/45a8accf1a4f4fec91dd90e1018346f2) : SUCCESS in 2m 22s
Contributor

Did you get a specific error with the templates? or why do we need to rename them?

Is there a way to port the following options to Deployment?
activeDeadlineSeconds
recreateParams
resources
rollingParams

I am not sure how critical they are for the application, @dustymabe can weigh in 😄

Did you get a specific error with the templates? or why do we need to rename them? Is there a way to port the following options to Deployment? activeDeadlineSeconds recreateParams resources rollingParams I am not sure how critical they are for the application, @dustymabe can weigh in :smile:
Contributor

I could be wrong but the reason we needed to convert all the others to .j2 is because they were being treated as templates already (see below where we specify object_template: imagestream.yml.j2.

Here, however, these are just vars and we aren't saying they are templates, so I don't think we should change production and staging yaml files to .j2 here.

I could be wrong but the reason we needed to convert all the others to `.j2` is because they were being treated as templates already (see below where we specify `object_template: imagestream.yml.j2`. Here, however, these are just vars and we aren't saying they are templates, so I don't think we should change production and staging yaml files to `.j2` here.
Contributor

Did you get a specific error with the templates? or why do we need to rename them?

Is there a way to port the following options to Deployment?
activeDeadlineSeconds
recreateParams
resources
rollingParams

I am not sure how critical they are for the application, @dustymabe can weigh in 😄

According to https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/deployment-v1/ none of those options exist anymore. What @c4rt0 has here LGTM, but I will note that the link I posted says that "25%" is the default for maxSurge and maxUnavailable so we could just drop rollingUpdate: from this too.

> Did you get a specific error with the templates? or why do we need to rename them? > > Is there a way to port the following options to Deployment? > activeDeadlineSeconds > recreateParams > resources > rollingParams > > I am not sure how critical they are for the application, @dustymabe can weigh in :smile: > According to https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/deployment-v1/ none of those options exist anymore. What @c4rt0 has here LGTM, but I will note that the link I posted says that "25%" is the default for `maxSurge` and `maxUnavailable` so we could just drop `rollingUpdate:` from this too.
Contributor

Instead of deleting this let's just spacebar it over to be under metadata (i.e. at the same level as labels, not under it).

https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-meta/#ObjectMeta

Instead of deleting this let's just spacebar it over to be under metadata (i.e. at the same level as `labels`, not under it). https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/object-meta/#ObjectMeta
Author
Contributor

Did you get a specific error with the templates? or why do we need to rename them?

I could be wrong but the reason we needed to convert all the others to .j2 is because they were being treated as templates already (see below where we specify object_template: imagestream.yml.j2.

This was my understanding , I didn't realize these were just vars. This is now fixed in the next push.

"25%" is the default for maxSurge and maxUnavailable so we could just drop rollingUpdate: from this too.

Thanks, this is also now amended.

Instead of deleting this let's just spacebar it over to be under metadata (i.e. at the same level as labels, not under it).

Done... the links are quite useful.

> Did you get a specific error with the templates? or why do we need to rename them? >> I could be wrong but the reason we needed to convert all the others to `.j2` is because they were being treated as templates already (see below where we specify `object_template: imagestream.yml.j2`. This was my understanding , I didn't realize these were just vars. This is now fixed in the next push. >> "25%" is the default for maxSurge and maxUnavailable so we could just drop rollingUpdate: from this too. Thanks, this is also now amended. >> Instead of deleting this let's just spacebar it over to be under metadata (i.e. at the same level as labels, not under it). Done... the links are quite useful.
Author
Contributor

rebased onto bcb01c42d6

rebased onto bcb01c42d6a0f4496a5c1bbb60177d428c975fb3
Author
Contributor

rebased onto bcb01c42d6

rebased onto bcb01c42d6a0f4496a5c1bbb60177d428c975fb3
First-time contributor
Build succeeded. https://fedora.softwarefactory-project.io/zuul/buildset/03bca90819144cc49abfaf9b5ab9b8c7 - [fi-ansible-lint-diff ](https://fedora.softwarefactory-project.io/zuul/build/a83e86f677d44d67a85ac8991374c2bc) : SUCCESS in 3m 02s - [fi-yamllint-diff ](https://fedora.softwarefactory-project.io/zuul/build/f7833f54de8a40debe09f7df6426044d) : SUCCESS in 2m 41s
Contributor

Most of your changes look good here.. but I don't think you quite understood me fully when I said:

I could be wrong but the reason we needed to convert all the others to .j2 is because they were being treated as templates already (see below where we specify object_template: imagestream.yml.j2.

Basically anything under roles/openshift-apps/coreos-cincinnati/vars/ should not be considered a template. i.e. you can leave them as production.yml and staging.yml.

Anything under roles/openshift-apps/coreos-cincinnati/templates/ are, well, templates :)

Those need the .j2 on them.

In your most recent upload you switched them all back, which goes too far. I hope my explanation above makes things more clear.

Most of your changes look good here.. but I don't think you quite understood me fully when I said: > I could be wrong but the reason we needed to convert all the others to .j2 is because they were being treated as templates already (see below where we specify object_template: imagestream.yml.j2. Basically anything under `roles/openshift-apps/coreos-cincinnati/vars/` should not be considered a template. i.e. you can leave them as `production.yml` and `staging.yml`. Anything under `roles/openshift-apps/coreos-cincinnati/templates/` are, well, templates :) Those need the `.j2` on them. In your most recent upload you switched them all back, which goes too far. I hope my explanation above makes things more clear.
Author
Contributor

1 new commit added

  • coreos-cincinnati: move templates from yml to j2
**1 new commit added** * ``coreos-cincinnati: move templates from yml to j2``
First-time contributor
Build succeeded. https://fedora.softwarefactory-project.io/zuul/buildset/6b0ffbf25e7d415c9b3951efbd5617ef - [fi-ansible-lint-diff ](https://fedora.softwarefactory-project.io/zuul/build/0a1a87970be44b6f9648d75390e7dac5) : SUCCESS in 2m 56s - [fi-yamllint-diff ](https://fedora.softwarefactory-project.io/zuul/build/8a8b7039b7f24282a2599174c53b29cf) : SUCCESS in 2m 31s
Contributor

LGTM

LGTM
Contributor

rebased onto 24ef980a8a

rebased onto 24ef980a8ad9412d4f9fffcac7aa719e66c7d61a
First-time contributor
Build succeeded. https://fedora.softwarefactory-project.io/zuul/buildset/f896d83586e34b078ef3ca07e421a502 - [fi-ansible-lint-diff ](https://fedora.softwarefactory-project.io/zuul/build/c2ddeeb1a77b45a192c292915351b31e) : SUCCESS in 3m 11s - [fi-yamllint-diff ](https://fedora.softwarefactory-project.io/zuul/build/fa86ee8e8f3344e0ab4db55c44e15e0e) : SUCCESS in 2m 35s
Contributor

Pull-Request has been merged by dustymabe

Pull-Request has been merged by dustymabe
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Infrastructure/ansible#2629
No description provided.