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

Use newer operator-sdk. #69

Merged
merged 8 commits into from
Sep 29, 2021
Merged

Use newer operator-sdk. #69

merged 8 commits into from
Sep 29, 2021

Conversation

AndrienkoAleksandr
Copy link
Contributor

@AndrienkoAleksandr AndrienkoAleksandr commented Sep 13, 2021

What does this pull request do:

Use newer operator-sdk(v1.7.1)
Use make for development. Most useful make commands you can find in the VSCode tasks.json.
For creation new release, can be used command 'make bundle-pre-release VERSION=0.0.10'. It should create new manifest package in the olm catalog.
Operator deployment for now consist of two containers: first one metrics container protected by auth proxy, and second one operator container. Also if operator was installed via OLM it should have Prometheus servicemonitor. I tested this stuf with prometheus operator. I configured in Prometeus CR service monitor selector to find operator service monitor by labels. After that Prometheus connected to the operator metrics. This metrics feature, that's a new stuff instead of removed

// addMetrics will create the Services and Service Monitors to allow the operator export the metrics by using
Removed stuff was actual only for older operator-sdk.

Referenced issue:

eclipse-che/che#20425
some initial part of the eclipse-che/che#20541

Related issue:

eclipse-che/che#20300

Signed-off-by: Oleksandr Andriienko [email protected]

Signed-off-by: Oleksandr Andriienko <[email protected]>
@github-actions
Copy link

Click here to review and test in web IDE: Contribute

@github-actions
Copy link

Click here to review and test in web IDE: Contribute

@AndrienkoAleksandr AndrienkoAleksandr marked this pull request as ready for review September 14, 2021 08:56
@github-actions
Copy link

Click here to review and test in web IDE: Contribute

@AndrienkoAleksandr
Copy link
Contributor Author

AndrienkoAleksandr commented Sep 14, 2021

@ibuziuk, I updated image in the CR sample: used java11-maven=quay.io/eclipse/che-java11-maven:next instead of java11-maven=quay.io/eclipse/che-java11-maven:nightly, because this image is not present any more on the quay.io... By the way this removed image makes image-puller version 0.0.9 failing, if user used embedded sample to create CR.

@ibuziuk ibuziuk requested a review from dkwon17 September 14, 2021 13:34
Signed-off-by: Oleksandr Andriienko <[email protected]>
@github-actions
Copy link

Click here to review and test in web IDE: Contribute

@ibuziuk
Copy link
Collaborator

ibuziuk commented Sep 14, 2021

By the way this removed image makes image-puller version 0.0.9 failing, if user used embedded sample to create CR.

thanks, actually we have the issue in the current sprint that is related to this problem - eclipse-che/che#20399

Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Signed-off-by: Oleksandr Andriienko <[email protected]>
@github-actions
Copy link

Click here to review and test in web IDE: Contribute

@AndrienkoAleksandr
Copy link
Contributor Author

@dkwon17 , thanks, I handled your feedback.

@dkwon17
Copy link
Collaborator

dkwon17 commented Sep 21, 2021

It would be great if we can also update the readme to mention version v1.7.1 instead of v0.19.4 (recommended):

* Operator SDK `v0.19.4` (recommended)

and also update the commands:

3. Run `operator-sdk generate k8s` and `operator-sdk generate crds --crd-version=v1`

6. Copy the crd generated by `operator-sdk generate crds` into `deploy/olm-catalog/kubernetes-imagepuller-operator/VERSION`

Fix dev commands. Fix release command. Update docs.

Signed-off-by: Oleksandr Andriienko <[email protected]>
@github-actions
Copy link

Click here to review and test in web IDE: Contribute

@AndrienkoAleksandr
Copy link
Contributor Author

AndrienkoAleksandr commented Sep 23, 2021

It would be great if we can also update the readme

Yes, I totally updated README file...

@AndrienkoAleksandr
Copy link
Contributor Author

@dkwon17 , thanks, I think I handled your feedback.

.vscode/tasks.json Outdated Show resolved Hide resolved
.vscode/tasks.json Outdated Show resolved Hide resolved
Signed-off-by: Oleksandr Andriienko <[email protected]>
@github-actions
Copy link

Click here to review and test in web IDE: Contribute

@AndrienkoAleksandr
Copy link
Contributor Author

AndrienkoAleksandr commented Sep 27, 2021

I updated description. This pr is also initial part of the work eclipse-che/che#20541 . But full migration to the new bundle format should be done separately after merge this pr and it is not urgent.

@tolusha
Copy link
Collaborator

tolusha commented Sep 28, 2021

@dkwon17
Could you approve pls?

@dkwon17
Copy link
Collaborator

dkwon17 commented Sep 28, 2021

Sorry for the delay, it seems I do not completely understand the bundle image format properly, but I am having trouble with the
Install operator via OLM task.

After running Build and push custom operator image and Build and push development bundle tasks, I ran the Install operator via OLM task to deploy on CRC.

I am getting this output from the task:

> Executing task: kubectl apply -f config/manager/controller-namespace.yaml; operator-sdk run bundle ${IMAGE_REGISTRY_HOST}/${IMAGE_REGISTRY_USER_NAME}/kubernetes-image-puller-operator-bundle:next --namespace ${NAMESPACE}; kubectl apply -f config/samples/che_v1alpha1_kubernetesimagepuller.yaml -n ${NAMESPACE} <

namespace/kubernetes-image-puller-operator unchanged
INFO[0016] Successfully created registry pod: quay-io-dkwon17-kubernetes-image-puller-operator-bundle-next 
INFO[0016] Created CatalogSource: kubernetes-imagepuller-operator-catalog 
INFO[0016] OperatorGroup "operator-sdk-og" created      
INFO[0016] Created Subscription: kubernetes-imagepuller-operator-v0-0-9-sub 
INFO[0032] Approved InstallPlan install-l2mkw for the Subscription: kubernetes-imagepuller-operator-v0-0-9-sub 
INFO[0032] Waiting for ClusterServiceVersion "kubernetes-image-puller-operator/kubernetes-imagepuller-operator.v0.0.9" to reach 'Succeeded' phase 
INFO[0032]   Waiting for ClusterServiceVersion "kubernetes-image-puller-operator/kubernetes-imagepuller-operator.v0.0.9" to appear 
INFO[0054]   Found ClusterServiceVersion "kubernetes-image-puller-operator/kubernetes-imagepuller-operator.v0.0.9" phase: Pending 
INFO[0057]   Found ClusterServiceVersion "kubernetes-image-puller-operator/kubernetes-imagepuller-operator.v0.0.9" phase: Installing 
FATA[0121] Failed to run bundle: error waiting for CSV to install: deployment kubernetes-image-puller-operator has error: context deadline exceeded
 
kubernetesimagepuller.che.eclipse.org/image-puller created

image

Containers in the kubernetes-image-puller-operator-7bfcd8b9d6-mbbzh pod:
image

Logs in kube-rbac-proxy:

I0928 14:08:33.027103       1 main.go:190] Valid token audiences:
I0928 14:08:33.027278       1 main.go:262] Generating self signed cert as no cert is provided
I0928 14:08:33.570558       1 main.go:311] Starting TCP socket on 0.0.0.0:8443
I0928 14:08:33.572245       1 main.go:318] Listening securely on 0.0.0.0:8443

Is this issue caused by the PR? I just wanted to address this, otherwise, this PR looks great.

@github-actions
Copy link

Click here to review and test in web IDE: Contribute

@AndrienkoAleksandr
Copy link
Contributor Author

@dkwon17 thanks for feedback, fixed. Installation operator via OLM tasks should work.

@dkwon17
Copy link
Collaborator

dkwon17 commented Sep 29, 2021

Thank you for the updates, the PR works great. Please feel free to merge

@AndrienkoAleksandr AndrienkoAleksandr merged commit 0128446 into main Sep 29, 2021
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.

4 participants