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

Startup probes #60

Merged
merged 5 commits into from
Jul 11, 2022
Merged

Startup probes #60

merged 5 commits into from
Jul 11, 2022

Conversation

JustinKuli
Copy link
Contributor

The startupProbes will help prevent a slow API discovery from sending
the containers into CrashLoopBackOff. On clusters where startupProbes
might not be available (pre k8s 1.20), we have to use an equivalent
initialDelaySeconds parameter.

In order to restart the pods more quickly on the managed clusters,
especially during testing, this also updates the deployment strategy
to "Recreate". Thus it will not wait for the previous deployment to
become ready before deleting it, which would take a minimum of 5
minutes on older k8s clusters.

Refs:
 - stolostron/backlog#23874

Signed-off-by: Justin Kulikauskas <jkulikau@redhat.com>
(cherry picked from commit 918eeb7739f8db71f386068ac7eb236aac2c3859)
This was somehow missing - now the KinD tests Github Action will run
on multiple kubernetes versions.

Signed-off-by: Justin Kulikauskas <jkulikau@redhat.com>
(cherry picked from commit d4264201d96a70ee529c3cda060331b645aa6aad)
Depending on the k8s version, the chart should render these differently.
The existing KinD tests should exercise both paths (in separate runs).

Signed-off-by: Justin Kulikauskas <jkulikau@redhat.com>
(cherry picked from commit 2b45b54a89c664239cd910f1be1dea27b7d70104)
Some stuff was failing on v1.18, but didn't fail locally with 1.19.

Signed-off-by: Justin Kulikauskas <jkulikau@redhat.com>
(cherry picked from commit d9d1d8883885f26eb06bb7e8f3a5dbc986fe791c)
There were many instances where `unstructured.Nested*` methods could be
used for better safety (preventing panics if types failed to be
converted).

Additionally, this removes the 5 minute wait for the new config-policy
rollout, in favor of an `Eventually` section that doesn't wait for the
pod to become fully Ready. We really only care how it's configured,
which we can check without that wait.

Signed-off-by: Justin Kulikauskas <jkulikau@redhat.com>
(cherry picked from commit 07444da68ca4a8248bec094efdea34539463ea11)
@JustinKuli
Copy link
Contributor Author

Closes #59

@openshift-ci
Copy link

openshift-ci bot commented Jul 11, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JustinKuli, mprahl

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sonarcloud
Copy link

sonarcloud bot commented Jul 11, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@openshift-ci openshift-ci bot merged commit bab1a33 into stolostron:main Jul 11, 2022
@JustinKuli JustinKuli deleted the startup-probes branch July 11, 2022 17:45
@JustinKuli
Copy link
Contributor Author

/cherrypick release-2.5

@openshift-cherrypick-robot

@JustinKuli: #60 failed to apply on top of branch "release-2.5":

Applying: Add startup probes to deployments
Using index info to reconstruct a base tree...
M	pkg/addon/configpolicy/manifests/managedclusterchart/templates/deployment.yaml
Falling back to patching base and 3-way merge...
Auto-merging pkg/addon/configpolicy/manifests/managedclusterchart/templates/deployment.yaml
CONFLICT (content): Merge conflict in pkg/addon/configpolicy/manifests/managedclusterchart/templates/deployment.yaml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Add startup probes to deployments
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-2.5

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants