Skip to content

Conversation

@deads2k
Copy link
Contributor

@deads2k deads2k commented Apr 24, 2018

Adds a simple operator that creates a webconsole deployment. It manages conflicts with the workload controller by actively stomping it when the generation doesn't match. Errors appear on the status of the subresource

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Apr 24, 2018
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k

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

The pull request process is described here

Details 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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 24, 2018
}
existing.Spec = *required.Spec.DeepCopy()

actual, err := client.Deployments(required.Namespace).Update(existing)
Copy link
Contributor

Choose a reason for hiding this comment

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

where do we handle conflicts? does the controller just re-apply on next sync?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

where do we handle conflicts? does the controller just re-apply on next sync?

Yes, and it is logged and put into the CRD status.

}

func ReadConfigMapOrDie(objBytes []byte) *corev1.ConfigMap {
requiredObj, err := runtime.Decode(coreCodecs.UniversalDecoder(corev1.SchemeGroupVersion), []byte(objBytes))
Copy link
Contributor

Choose a reason for hiding this comment

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

[]byte(objByte) is a noop here right?

if err != nil {
panic(err)
}
return requiredObj.(*corev1.ConfigMap)
Copy link
Contributor

Choose a reason for hiding this comment

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

can we also panic when requiredObj != corev1.ConfigMap ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

can we also panic when requiredObj != corev1.ConfigMap ?

Yeah. it's a coding error.

webconsole: "true"
spec:
strategy:
type: Recreate
Copy link
Contributor

Choose a reason for hiding this comment

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

is there reason this is Recreate and not Rollout ?

Copy link
Contributor

Choose a reason for hiding this comment

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

It was discussed some time ago, web-console switched to recreate some time ago, iirc.

@deads2k deads2k changed the title [WIP] add logic for openshift webconsole operator add logic for openshift webconsole operator May 2, 2018
@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 May 2, 2018
@deads2k
Copy link
Contributor Author

deads2k commented May 2, 2018

@mfojtik @jpeeler any known problems with service catalog? Doesn't immediately look related to my changes.

@jpeeler
Copy link

jpeeler commented May 3, 2018

@deads2k There is, this PR needs to be merged: #19568. I really expected for it to land overnight. ..
Btw, what link are you looking at for failing catalog tests? Reporting has been disabled temporarily until the above PR merges.

@deads2k
Copy link
Contributor Author

deads2k commented May 3, 2018

@deads2k There is, this PR needs to be merged: #19568. I really expected for it to land overnight. ..
Btw, what link are you looking at for failing catalog tests? Reporting has been disabled temporarily until the above PR merges.

Cluster up tests when you modify cluster up indicate it here: https://openshift-gce-devel.appspot.com/build/origin-ci-test/pr-logs/pull/19498/test_pull_request_origin_extended_clusterup/1021/

@deads2k
Copy link
Contributor Author

deads2k commented May 5, 2018

/retest

@jpeeler
Copy link

jpeeler commented May 7, 2018

/retest
I saw the same error with catalog, then pulled/updated everything and now it seems to have gone away.

@jpeeler
Copy link

jpeeler commented May 7, 2018

I can't figure out why catalog is failing to start in the extended clusterup test. Other PRs seem to be successfully passing.

@mfojtik
Copy link
Contributor

mfojtik commented May 9, 2018

/retest

// TODO wait until the webconsole is up
// wait until the webconsole to an available endpoint
WaitCondition: func() (bool, error) {
glog.V(2).Infof("polling for service catalog api server endpoint availability")
Copy link
Contributor

Choose a reason for hiding this comment

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

polling for webconsole availability?

@mfojtik
Copy link
Contributor

mfojtik commented May 9, 2018

@deads2k I think this is failing because you use the Always as the OPENSHIFT_PULL_POLICY which means the hypershift does not have the experimental subcommand (at least that is the case for my locally when I will get the same timeout...). Will make a PR against your PR.

@openshift-ci-robot openshift-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels May 9, 2018
@deads2k
Copy link
Contributor Author

deads2k commented May 9, 2018

ah, image layout changed

@deads2k
Copy link
Contributor Author

deads2k commented May 9, 2018

/retest

@mfojtik
Copy link
Contributor

mfojtik commented May 10, 2018

/lgtm

this is a good starting point

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 10, 2018
@openshift-merge-robot openshift-merge-robot merged commit 9fd7944 into openshift:master May 10, 2018
@deads2k deads2k deleted the op-05-no-merge branch July 3, 2018 17:48
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. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants