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

Bug 1868976: jsonnet: configure SCCs #981

Merged
merged 3 commits into from Nov 23, 2020

Conversation

s-urbaniak
Copy link
Contributor

  • I added CHANGELOG entry for this change.
  • No user facing changes, so no entry in CHANGELOG was needed.

@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 16, 2020
@s-urbaniak s-urbaniak changed the title WIP: Bug1868976: jsonnet: configure SCCs WIP: Bug 1868976: jsonnet: configure SCCs Nov 16, 2020
@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. label Nov 16, 2020
@openshift-ci-robot
Copy link
Contributor

@s-urbaniak: This pull request references Bugzilla bug 1868976, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

WIP: Bug 1868976: jsonnet: configure SCCs

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.

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Nov 16, 2020
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 16, 2020
@s-urbaniak s-urbaniak changed the title WIP: Bug 1868976: jsonnet: configure SCCs Bug 1868976: jsonnet: configure SCCs Nov 18, 2020
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 18, 2020
@lilic
Copy link
Contributor

lilic commented Nov 18, 2020

/retest

doesn't seem related.

@s-urbaniak
Copy link
Contributor Author

/cc @openshift/openshift-team-monitoring

side note: i am in parallel working out where to place a sensible upgrade test for this in origin/e2e. I guess we cannot do an upgrade test here.

@openshift-ci-robot openshift-ci-robot requested a review from a team November 18, 2020 14:17
@s-urbaniak
Copy link
Contributor Author

/retest

@s-urbaniak
Copy link
Contributor Author

fwiw we already have an e2e test that at least tests Prometheus PVC:

func TestPrometheusVolumeClaim(t *testing.T) {
err := f.OperatorClient.WaitForStatefulsetRollout(&appsv1.StatefulSet{
ObjectMeta: metav1.ObjectMeta{
Name: "prometheus-k8s",
Namespace: f.Ns,
},
})
if err != nil {
t.Fatal(err)
}
cm := &v1.ConfigMap{
ObjectMeta: metav1.ObjectMeta{
Name: "cluster-monitoring-config",
Namespace: f.Ns,
},
Data: map[string]string{
"config.yaml": `prometheusK8s:
volumeClaimTemplate:
spec:
storageClassName: gp2
resources:
requests:
storage: 2Gi
`,
},
}
if err := f.OperatorClient.CreateOrUpdateConfigMap(cm); err != nil {
t.Fatal(err)
}
var lastErr error
// Wait for persistent volume claim
err = wait.Poll(time.Second, 5*time.Minute, func() (bool, error) {
_, err := f.KubeClient.CoreV1().PersistentVolumeClaims(f.Ns).Get(context.TODO(), "prometheus-k8s-db-prometheus-k8s-0", metav1.GetOptions{})
lastErr = errors.Wrap(err, "getting prometheus persistent volume claim failed")
if err != nil {
return false, nil
}
return true, nil
})
if err != nil {
if err == wait.ErrWaitTimeout && lastErr != nil {
err = lastErr
}
t.Fatal(err)
}
err = f.OperatorClient.WaitForStatefulsetRollout(&appsv1.StatefulSet{
ObjectMeta: metav1.ObjectMeta{
Name: "prometheus-k8s",
Namespace: f.Ns,
},
})
if err != nil {
t.Fatal(err)
}
}

do you think it makes sense to add more PVC tests here, i.e. for alertmanager and user-workload-prometheus?

Copy link
Contributor

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree that additional tests for Alertmanager and UWM would be good to have.

jsonnet/alertmanager.jsonnet Show resolved Hide resolved
jsonnet/prometheus-user-workload.jsonnet Show resolved Hide resolved
@s-urbaniak
Copy link
Contributor Author

@simonpasquier thanks for the suggestion! ptal if the place/wording lgty. I would submit the additional e2e tests as a follow-up if possible.

@s-urbaniak
Copy link
Contributor Author

looking into the e2e failure, it seems to be related.

    --- FAIL: TestUserWorkloadMonitoring/enable_user_workload_monitoring,_assert_prometheus_rollout#01 (0.01s)

@s-urbaniak
Copy link
Contributor Author

failure does seem to be unrelated, the failing test function fails at creating the configmap to turn on user workload monitoring:

    user_workload_monitoring_test.go:139: retrieving ConfigMap object failed: Get "https://api.ci-op-w6vf2c6m-a317e.origin-ci-int-aws.dev.rhcloud.com:6443/api/v1/namespaces/openshift-monitoring/configmaps/cluster-monitoring-config": dial tcp 54.243.39.215:6443: connect: connection refused
=== CONT  TestUserWorkloadMonitoring
    user_workload_monitoring_test.go:96: scenario "enable user workload monitoring, assert prometheus rollout" failed
...

@s-urbaniak
Copy link
Contributor Author

/retest

@s-urbaniak
Copy link
Contributor Author

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 20, 2020
@s-urbaniak
Copy link
Contributor Author

thanos ruler is missing, thank you @simonpasquier for the OOB catch 👍

@s-urbaniak
Copy link
Contributor Author

the more i think about it though, the more i believe we should add those e2e tests here 🤔 we are adding quite some settings to those statefulsets here, so let me amend the tests in this very PR.

@s-urbaniak
Copy link
Contributor Author

/retest

@s-urbaniak
Copy link
Contributor Author

I just found we already have PVC tests for alertmanager 😅

@s-urbaniak
Copy link
Contributor Author

And we have also PVC tests for UWM Prometheus, adding a dedicated one for Thanos Ruler.

@s-urbaniak
Copy link
Contributor Author

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 23, 2020
Copy link
Contributor

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: s-urbaniak, simonpasquier

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:
  • OWNERS [s-urbaniak,simonpasquier]

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

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 23, 2020
@s-urbaniak
Copy link
Contributor Author

/test e2e-agnostic

@openshift-merge-robot openshift-merge-robot merged commit 29cc99b into openshift:master Nov 23, 2020
@openshift-ci-robot
Copy link
Contributor

@s-urbaniak: All pull requests linked via external trackers have merged:

Bugzilla bug 1868976 has been moved to the MODIFIED state.

In response to this:

Bug 1868976: jsonnet: configure SCCs

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.

@s-urbaniak s-urbaniak deleted the bz-1868976 branch November 24, 2020 07:54
@s-urbaniak
Copy link
Contributor Author

/cherry-pick release-4.6

@openshift-cherrypick-robot

@s-urbaniak: #981 failed to apply on top of branch "release-4.6":

Applying: jsonnet: configure SCCs
Using index info to reconstruct a base tree...
M	jsonnet/prometheus-user-workload.jsonnet
M	jsonnet/prometheus.jsonnet
Falling back to patching base and 3-way merge...
Auto-merging jsonnet/prometheus.jsonnet
CONFLICT (content): Merge conflict in jsonnet/prometheus.jsonnet
Auto-merging jsonnet/prometheus-user-workload.jsonnet
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 jsonnet: configure SCCs
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:

/cherry-pick release-4.6

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
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants