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

updates to the newest version of library-go (context) #345

Merged
merged 5 commits into from Mar 26, 2020

Conversation

p0lyn0mial
Copy link
Contributor

@p0lyn0mial p0lyn0mial commented Mar 25, 2020

this PR should unblock me, planing to add encryption controllers to apiserverclientset

@p0lyn0mial
Copy link
Contributor Author

/assign @mfojtik @sttts

@@ -22,18 +24,20 @@ type OpenshiftDeploymentLatestRevisionClient struct {
var _ revisioncontroller.LatestRevisionClient = OpenshiftDeploymentLatestRevisionClient{}

func (c OpenshiftDeploymentLatestRevisionClient) GetLatestRevisionState() (*operatorv1.OperatorSpec, *operatorv1.OperatorStatus, int32, string, error) {
o, err := c.TypedClient.OpenShiftAPIServers().Get("cluster", metav1.GetOptions{})
ctx := context.TODO() // needs support in library-go
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this requires support in library-go, what's our current plan, is somebody working on it ?

Copy link
Member

Choose a reason for hiding this comment

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

the context exists in starter.go, it has to be passed down.... not urgent, but I haven't seen a plan...

this is post-rebase todo I guess

/cc @sttts @marun

return factory.New().WithInformers(
kubeInformersForTargetNamespace.Core().V1().Pods().Informer(),
kubeInformersForTargetNamespace.Apps().V1().Deployments().Informer(),
).ResyncEvery(time.Minute*5).WithSync(c.sync).ToController(fullname, eventRecorder.WithComponentSuffix("finalizer-controller"))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

adding resync just in case.

return factory.New().WithInformers(
c.podInformer.Informer(),
c.secretInformer.Informer(),
).WithSync(c.sync).ToController("PruneController", eventRecorder.WithComponentSuffix("prune-controller"))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mfojtik do I need a custom resync period ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that sync will also be trigger by the internal informers resync period

@p0lyn0mial
Copy link
Contributor Author

/retest

@p0lyn0mial
Copy link
Contributor Author

Pulling image registry.svc.ci.openshift.org/openshift/release:golang-1.12 ...
Pulled 1/2 layers, 70% complete
Pulled 2/2 layers, 100% complete
Extracting
--> FROM registry.svc.ci.openshift.org/openshift/release:golang-1.12 as builder
--> ENV "foo"="bar"
--> WORKDIR /go/src/github.com/openshift/cluster-openshift-apiserver-operator
--> COPY . .
--> RUN GODEBUG=tls13=1 go build ./cmd/cluster-openshift-apiserver-operator
# github.com/openshift/cluster-openshift-apiserver-operator/vendor/k8s.io/apimachinery/pkg/util/errors
vendor/k8s.io/apimachinery/pkg/util/errors/errors.go:99:10: undefined: errors.Is

seems like we are still on golang-1.12

@p0lyn0mial
Copy link
Contributor Author

/retest

@mfojtik
Copy link
Member

mfojtik commented Mar 26, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 26, 2020
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mfojtik, p0lyn0mial

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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 26, 2020
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@p0lyn0mial
Copy link
Contributor Author

/test e2e-aws

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 2788503 into openshift:master Mar 26, 2020
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants