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

[release-4.13] OCPBUGS-8525: Rename soaking annotation to ran.openshift.io/soak-seconds #498

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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion controllers/utils/constants.go
Expand Up @@ -145,4 +145,4 @@ const SpaceRequiredForPrecache = "15" // Gigabytes

// SoakAnnotation is the annotation that can be set on policies, which indicates the least number number of seconds
// which policies should be compliant before the cgu moves on from that policy
const SoakAnnotation = "soakSeconds"
const SoakAnnotation = "ran.openshift.io/soak-seconds"
4 changes: 2 additions & 2 deletions controllers/utils/policy_util_test.go
Expand Up @@ -31,7 +31,7 @@ func TestShouldSoak(t *testing.T) {
// annotation present and soak duration is not over
policy := &unstructured.Unstructured{}
policy.SetAnnotations(map[string]string{
"soakSeconds": "10",
SoakAnnotation: "10",
})
res, err = ShouldSoak(policy, v1.Now())
assert.Equal(t, true, res)
Expand All @@ -50,7 +50,7 @@ func TestShouldSoak(t *testing.T) {

// annotation present, soak duration is invalid
policy.SetAnnotations(map[string]string{
"soakSeconds": "-1",
SoakAnnotation: "-1",
})
_, err = ShouldSoak(policy, v1.Now())
assert.Error(t, err)
Expand Down
2 changes: 1 addition & 1 deletion deploy/acm/policies/all_policies/child-policy1-soak.yaml
Expand Up @@ -5,7 +5,7 @@ metadata:
policy.open-cluster-management.io/categories: CM Configuration Management
policy.open-cluster-management.io/controls: CM-2 Baseline Configuration
policy.open-cluster-management.io/standards: NIST SP 800-53
soakSeconds: "5"
ran.openshift.io/soak-seconds: "5"
labels:
policy.open-cluster-management.io/root-policy: policy1-common-cluster-version-policy
name: default.policy1-common-cluster-version-policy
Expand Down
2 changes: 1 addition & 1 deletion deploy/acm/policies/all_policies/policy1-soak.yaml
Expand Up @@ -5,7 +5,7 @@ metadata:
policy.open-cluster-management.io/categories: CM Configuration Management
policy.open-cluster-management.io/controls: CM-2 Baseline Configuration
policy.open-cluster-management.io/standards: NIST SP 800-53
soakSeconds: "5"
ran.openshift.io/soak-seconds: "5"
name: policy1-common-cluster-version-policy
spec:
disabled: false
Expand Down
2 changes: 1 addition & 1 deletion tests/kuttl/tests/soaking/02-wait-and-reconcile.yaml
Expand Up @@ -2,6 +2,6 @@ apiVersion: kuttl.dev/v1beta1
kind: TestStep

commands:
# Wait for the soakSeconds and trigger reconcilation
# Wait for 'ran.openshift.io/soak-seconds' and trigger reconcilation
- command: sleep 5
- command: oc --namespace=default patch clustergroupupgrade.ran.openshift.io/cgu-soaking --patch '{"spec":{"remediationStrategy":{"timeout":240}}}' --type=merge