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

Feature/watch owned resources #2

Closed
wants to merge 67 commits into from

Conversation

mxpaspa
Copy link
Contributor

@mxpaspa mxpaspa commented May 4, 2020

This is an alteration of the my other pr which includes some refactoring.
Changes Made:

  • Takes away the watch on the rhm-operator-secret
  • Adds ownership to the razeejob
  • Removes switch/case style since we are no longer accepting requests from different contexts

Remaining Items:

  • Change github references to use github.com/redhat-marketplace

  • Test whether adding ownership to the secret after it's found works

  • Check that I'm returning reconcole.Result{},err in the correct places

  • Issue with updating JobState

  • Make sure that legacy crd values are set to null/accounted for properly

  • Check that the Spec field and Status field descriptors are present and correct after merge with develop

  • Check that updates to: ClusterUUID, RazeeDashUrl, ChildRRS3FileName trigger an update tocorresponding Razee resources

Copy link

@zach-source zach-source left a comment

Choose a reason for hiding this comment

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

Some regression and some feedback. Also the make tests were failing and two tests were commented out from razee. Please add those back and get them working.

deploy/chart/values.yaml Outdated Show resolved Hide resolved
deploy/operator.yaml Outdated Show resolved Hide resolved
pkg/apis/marketplace/v1alpha1/razeedeployment_types.go Outdated Show resolved Hide resolved
Comment on lines +199 to +204
url := fmt.Sprintf("%s/%s/%s/%s", instance.Spec.DeployConfig.IbmCosURL, instance.Spec.DeployConfig.BucketName, instance.Spec.ClusterUUID, instance.Spec.DeployConfig.ChildRSSFIleName)
instance.Spec.ChildUrl = &url
err = r.client.Update(context.TODO(), instance)
if err != nil {
reqLogger.Error(err, "Failed to update Status.RedHatMarketplaceSecretFound")
reqLogger.Error(err, "Failed to update ChildUrl")
return reconcile.Result{}, err

Choose a reason for hiding this comment

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

We can move this logic into the end of the reconcileRhmOperatorSecret.

Copy link
Contributor Author

@mxpaspa mxpaspa May 4, 2020

Choose a reason for hiding this comment

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

Thought about doing that. I was worried about having a partially formed url. As is, I know all the values are there and can create a full url. Is that an issue ?

Choose a reason for hiding this comment

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

If you don't have any missing fields and you recalculate it each time the secret is found then by the time you get here the child url will be complete.

mxpaspa pushed a commit that referenced this pull request May 6, 2020
@zach-source
Copy link

We've moved this work to the /owned PR

@zach-source zach-source closed this May 7, 2020
@mxpaspa mxpaspa deleted the feature/watch-owned-resources branch June 8, 2020 23:51
zach-source added a commit that referenced this pull request Nov 22, 2021
zach-source added a commit that referenced this pull request Nov 22, 2021
chore: updating licenses

chore: fixing cover error

chore: fixing test

chore: fixing test #2

chore: removing focus

chore: fixing another test

chore: fixing another test

chore: fixing another test

chore: adding test debug

fix: making config not crash on bad k8s cfg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants