Repository: kubernetes-sigs/security-profiles-operator
Pull request #1147 (2022-09-05 13:44:53)

Update kind and it's k8s image


#### What type of PR is this?

/kind cleanup


#### What this PR does / why we need it:
Update kind to the latest release and therefore it's k8s image.

#### Which issue(s) this PR fixes:

<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.

Fixes #

or

None
-->
None
#### Does this PR have test?
None
<!--
If tests aren't applicable just write N/A.
-->

#### Special notes for your reviewer:
None
#### Does this PR introduce a user-facing change?

<!--
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".

For more information on release notes see: https://git.k8s.io/community/contributors/guide/release-notes.md
-->

```release-note
None
```


k8s-ci-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/kubernetes-sigs/security-profiles-operator/pull/1147#" title="Author self-approved">saschagrunert</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=kubernetes-sigs%2Fsecurity-profiles-operator).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/kubernetes-sigs/security-profiles-operator/blob/main/OWNERS)~~ [saschagrunert]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->
k8s-ci-robot: @saschagrunert: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-security-profiles-operator-test-e2e | bb0fb4865164968366a24bbc06adade89d083281 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_security-profiles-operator/1147/pull-security-profiles-operator-test-e2e/1566791392372461568) | true | `/test pull-security-profiles-operator-test-e2e`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=security-profiles-operator&pr=1147). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Asaschagrunert). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/security-profiles-operator/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
saschagrunert: /retest 
JAORMX: /retest
k8s-ci-robot: @saschagrunert: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-security-profiles-operator-test-e2e | bb0fb4865164968366a24bbc06adade89d083281 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_security-profiles-operator/1147/pull-security-profiles-operator-test-e2e/1567019121881649152) | true | `/test pull-security-profiles-operator-test-e2e`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=security-profiles-operator&pr=1147). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Asaschagrunert). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/security-profiles-operator/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
JAORMX: For the record, the previous run failed with the following issues:
```
    tc_long_profile_name_test.go:58: 
        	Error Trace:	/home/prow/go/src/github.com/kubernetes-sigs/security-profiles-operator/tc_long_profile_name_test.go:58
        	            				/home/prow/go/src/github.com/kubernetes-sigs/security-profiles-operator/e2e_test.go:127
        	            				/home/prow/go/src/github.com/kubernetes-sigs/security-profiles-operator/suite.go:91
        	Error:      	Couldn't list statuses for nodes
        	Test:       	TestSuite/TestSecurityProfilesOperator/cluster-wide:_Seccomp:_make_sure_statuses_for_profiles_with_long_names_can_be_listed
...
    tc_long_profile_name_test.go:58: 
        	Error Trace:	/home/prow/go/src/github.com/kubernetes-sigs/security-profiles-operator/tc_long_profile_name_test.go:58
        	            				/home/prow/go/src/github.com/kubernetes-sigs/security-profiles-operator/e2e_test.go:182
        	            				/home/prow/go/src/github.com/kubernetes-sigs/security-profiles-operator/suite.go:91
        	Error:      	Couldn't list statuses for nodes
...
        --- FAIL: TestSuite/TestSecurityProfilesOperator/cluster-wide:_Seccomp:_make_sure_statuses_for_profiles_with_long_names_can_be_listed (1.63s)

...

        --- FAIL: TestSuite/TestSecurityProfilesOperator/namespaced:_Seccomp:_make_sure_statuses_for_profiles_with_long_names_can_be_listed (1.63s)
```
JAORMX: Gonna retest to see if this is consistent
/test all
k8s-ci-robot: @saschagrunert: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-security-profiles-operator-test-e2e | bb0fb4865164968366a24bbc06adade89d083281 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_security-profiles-operator/1147/pull-security-profiles-operator-test-e2e/1567046981228957696) | true | `/test pull-security-profiles-operator-test-e2e`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=security-profiles-operator&pr=1147). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Asaschagrunert). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/security-profiles-operator/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: New changes are detected. LGTM label has been removed.
codecov-commenter: # [Codecov](https://codecov.io/gh/kubernetes-sigs/security-profiles-operator/pull/1147?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) Report
> Merging [#1147](https://codecov.io/gh/kubernetes-sigs/security-profiles-operator/pull/1147?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) (d42b37c) into [main](https://codecov.io/gh/kubernetes-sigs/security-profiles-operator/commit/9275e0d9109c2940b7204fe5e45503038dda7fd6?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) (9275e0d) will **not change** coverage.
> The diff coverage is `n/a`.

<details><summary>Additional details and impacted files</summary>


```diff
@@           Coverage Diff           @@
##             main    #1147   +/-   ##
=======================================
  Coverage   50.70%   50.70%           
=======================================
  Files          42       42           
  Lines        4753     4753           
=======================================
  Hits         2410     2410           
  Misses       2266     2266           
  Partials       77       77           
```

</details>
saschagrunert: @JAORMX the e2e tests are now green :) 
k8s-ci-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/kubernetes-sigs/security-profiles-operator/pull/1147#pullrequestreview-1097747642" title="LGTM">jhrozek</a>*, *<a href="https://github.com/kubernetes-sigs/security-profiles-operator/pull/1147#" title="Author self-approved">saschagrunert</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=kubernetes-sigs%2Fsecurity-profiles-operator).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/kubernetes-sigs/security-profiles-operator/blob/main/OWNERS)~~ [jhrozek,saschagrunert]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->

Patch:
diff --git a/dependencies.yaml b/dependencies.yaml
index 73ba52056..663feb058 100644
--- a/dependencies.yaml
+++ b/dependencies.yaml
@@ -64,13 +64,13 @@ dependencies:
       match: cert-manager/cert-manager
 
   - name: kind
-    version: 0.14.0
+    version: 0.15.0
     refPaths:
     - path: test/suite_test.go
       match: kindVersion
 
   - name: kind-image
-    version: 1.23.4
+    version: 1.25.0
     refPaths:
     - path: test/suite_test.go
       match: kindImage


Test patch:
diff --git a/.github/workflows/olm_tests.yaml b/.github/workflows/olm_tests.yaml
index 24acad750..3f598d282 100644
--- a/.github/workflows/olm_tests.yaml
+++ b/.github/workflows/olm_tests.yaml
@@ -6,7 +6,7 @@ on:
   pull_request:
 env:
   GO_VERSION: '1.19'
-  KIND_IMG_TAG: v1.23.4
+  KIND_IMG_TAG: v1.25.0
 permissions:
   actions: none
   checks: none
diff --git a/test/suite_test.go b/test/suite_test.go
index ff176755d..04274aefc 100644
--- a/test/suite_test.go
+++ b/test/suite_test.go
@@ -39,10 +39,10 @@ import (
 )
 
 const (
-	kindVersion      = "v0.14.0"
-	kindImage        = "kindest/node:v1.23.4@sha256:0e34f0d0fd448aa2f2819cfd74e99fe5793a6e4938b328f657c8e3f81ee0dfb9"
-	kindDarwinSHA512 = "d85adec9a4ebdee086a5971b540970e0be01ebf5304092d006fdc226d7cc1b0f4d26abc8384ffcd4277f1580d0b98ef7e2e1c2e4ccae351cfae3722578412a44" //nolint:lll // full length SHA
-	kindLinuxSHA512  = "068ad6bc6506f8b90e38e0e8288a5d8cd83eac6b5bcb7ba972256241a64f9d335dcd2a70e8a08eab129816b0cf3bc722988601da603638d4a4933ded5ee6d763" //nolint:lll // full length SHA
+	kindVersion      = "v0.15.0"
+	kindImage        = "kindest/node:v1.25.0@sha256:428aaa17ec82ccde0131cb2d1ca6547d13cf5fdabcc0bbecf749baa935387cbf"
+	kindDarwinSHA512 = "f9b4e1ef345d831c19014cce1db42949ff68452590759b4802d183063e5280dfb1c92fd9626d9c952c60d9e440e9872c97525bd9a3b4ba53e43c00762d1e9980" //nolint:lll // full length SHA
+	kindLinuxSHA512  = "9c397eb7cc64f7fb0ac8d686ebf3836aaf485a1a480baa23b91a5167aa1d30b16a730de32910f9463d2028e01d56412bbfb3e9afdaa94b7eb19eef21c650e973" //nolint:lll // full length SHA
 )
 
 var (
diff --git a/test/tc_long_profile_name_test.go b/test/tc_long_profile_name_test.go
index c0d9d6600..7a20370aa 100644
--- a/test/tc_long_profile_name_test.go
+++ b/test/tc_long_profile_name_test.go
@@ -19,6 +19,7 @@ package e2e_test
 import (
 	"encoding/json"
 	"fmt"
+	"time"
 
 	secprofnodestatusv1alpha1 "sigs.k8s.io/security-profiles-operator/api/secprofnodestatus/v1alpha1"
 )
@@ -38,7 +39,7 @@ const (
 func (e *e2e) testCaseLongSeccompProfileName(nodes []string) {
 	e.logf("List node statuses for a policy with a very long name")
 
-	e.logf("creating policy")
+	e.logf("Creating policy")
 	deleteFn := e.writeAndCreate(longNamePolicy, "longname-policy.yml")
 	defer deleteFn()
 
@@ -49,12 +50,25 @@ func (e *e2e) testCaseLongSeccompProfileName(nodes []string) {
 	id := e.getSeccompPolicyID(policyName)
 	namespace := e.getCurrentContextNamespace(defaultNamespace)
 	selector := fmt.Sprintf("spo.x-k8s.io/profile-id=%s", id)
-	seccompProfileNodeStatusJSON := e.kubectl(
-		"-n", namespace, "get", "securityprofilenodestatus", "-l", selector, "-o", "json",
-	)
-	secpolNodeStatusList := &secprofnodestatusv1alpha1.SecurityProfileNodeStatusList{}
-	e.Nil(json.Unmarshal([]byte(seccompProfileNodeStatusJSON), secpolNodeStatusList))
-	if len(nodes) > len(secpolNodeStatusList.Items) {
-		e.Fail("Couldn't list statuses for nodes")
+
+	const maxTries = 10
+	for i := 0; i < maxTries; i++ {
+		e.logf("Comparing node status items with node length (try %d)", i+1)
+
+		seccompProfileNodeStatusJSON := e.kubectl(
+			"-n", namespace, "get", "securityprofilenodestatus", "-l", selector, "-o", "json",
+		)
+
+		secpolNodeStatusList := &secprofnodestatusv1alpha1.SecurityProfileNodeStatusList{}
+		e.Nil(json.Unmarshal([]byte(seccompProfileNodeStatusJSON), secpolNodeStatusList))
+
+		if len(nodes) == len(secpolNodeStatusList.Items) {
+			e.logf("Node status successfully reconciled")
+			return
+		}
+
+		time.Sleep(3 * time.Second)
 	}
+
+	e.Fail("Node status has not been reconciled successfully")
 }