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

Update operator-sdk and Go version #184

Merged

Conversation

VaishnaviHire
Copy link
Member

@VaishnaviHire VaishnaviHire commented Oct 25, 2022

Fixes #176

Description

  • Update Operator to run with latest SDK and Go version 1.17
  • Remove support for Kfdef v1alpha1, v1beta1

How Has This Been Tested?

  1. Openshift cluster 4.11
  2. Deployment instructions:

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

@shalberd
Copy link

shalberd commented Nov 4, 2022

so neat, thank you for making that change, @VaishnaviHire . Now, with config/manager/manager.yaml present and OCP 4.10, it becomes much easier to make an operator bundle supporting a set of relatedImages, and without having to manually find out the sha256 digests. See https://docs.openshift.com/container-platform/4.10/operators/operator_sdk/osdk-generating-csvs.html#olm-enabling-operator-for-restricted-network_osdk-generating-csvs @Jooho

@openshift-ci
Copy link

openshift-ci bot commented Dec 23, 2022

@VaishnaviHire: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/operator-e2e 619b3cf link true /test operator-e2e
ci/prow/unit-tests 619b3cf link true /test unit-tests
ci/prow/ci-index 619b3cf link true /test ci-index
ci/prow/images 619b3cf link true /test images

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@VaishnaviHire VaishnaviHire changed the title [WIP] Update operator-sdk and Go version Update operator-sdk and Go version Dec 23, 2022
@VaishnaviHire
Copy link
Member Author

Note: This PR is ready for reviews

Dockerfile Outdated
COPY go.mod .
COPY go.sum .
# Build the manager binary
FROM golang:1.18 as builder
Copy link
Member

Choose a reason for hiding this comment

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

Can we use one of the one of the ubi8/golang tool images?
I'm seeing a bunch at

❯ skopeo list-tags docker://registry.access.redhat.com/ubi8/go-toolset | grep 1.18
        "1.18",
        "1.18.4",
        "1.14.12-17.1618436992-source",
        "1.18.4-8.1669838000-source",
        "1.14.12-17.1618436992",
        "1.18.4-8-source",
        "1.18.4-8.1669838000",
        "1.18.4-8",

Copy link
Contributor

Choose a reason for hiding this comment

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

@VaishnaviHire Can you make the version a docker ARG? Do we need to add the z-stream (1.18.9) to minimize any rebuilds from breaking due to a go version update.

Copy link
Member

Choose a reason for hiding this comment

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

Could you actually use registry.redhat.io/ubi8/go-toolset instead?

Copy link
Member Author

@VaishnaviHire VaishnaviHire Jan 10, 2023

Choose a reason for hiding this comment

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

Updated the Dockerfile with registry.redhat.io/ubi8/go-toolset image with Go version as a docker ARG

Copy link
Contributor

Choose a reason for hiding this comment

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

@VaishnaviHire We will have to use registry.access.redhat.com/ubi8/go-toolset for unauthenticated pulls.

@VaishnaviHire VaishnaviHire changed the base branch from master to feature/update-sdk January 4, 2023 15:05
@VaishnaviHire
Copy link
Member Author

Note: Updated the base branch to feature/update-sdk

Dockerfile Outdated
COPY go.mod .
COPY go.sum .
# Build the manager binary
FROM golang:1.18 as builder
Copy link
Contributor

Choose a reason for hiding this comment

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

@VaishnaviHire Can you make the version a docker ARG? Do we need to add the z-stream (1.18.9) to minimize any rebuilds from breaking due to a go version update.

README.md Outdated Show resolved Hide resolved
@VaishnaviHire
Copy link
Member Author

Updated the PR with instructions to deploy Operator using OLM

Dockerfile Show resolved Hide resolved
Makefile Outdated

.PHONY: docker-build
docker-build: manifests generate fmt vet ## Build docker image with the manager.
docker build -t ${IMG} .
Copy link
Contributor

Choose a reason for hiding this comment

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

I can do this in a follow-up PR but we should move use an IMG_BUILDER variable to allow someone to choose podman or docker

Copy link
Member

Choose a reason for hiding this comment

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

We should also default to podman.

Copy link
Contributor

Choose a reason for hiding this comment

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

@VaishnaviHire I can make this change in a follow-up PR if you want

Dockerfile Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@LaVLaS LaVLaS left a comment

Choose a reason for hiding this comment

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

/lgtm

Build and deploy worked perfectly for me without any issues. I created a new kfdef and the operator deployed the pods without any noticeable issues

@openshift-ci
Copy link

openshift-ci bot commented Jan 17, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: LaVLaS

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-merge-robot openshift-merge-robot merged commit 30f6503 into opendatahub-io:feature/update-sdk Jan 17, 2023
VaishnaviHire added a commit that referenced this pull request Mar 29, 2023
* Initialize operator-sdk 1.23

* Add apis from kfctl

* Add KfDef controller

* Add 'pkg' folder

* Add Secret Generator controller

* Update go modules and depricated methods

* Remove b2ndcontroller, update watch functions

* Update 'Apply()' to initalize ApplyOptions

* Update manifests config

* Update Dockerfile, Makefile & README

Update dockerfile

* Add Dashboard CRDs

* Add OLM Bundle
maroroman pushed a commit to maroroman/opendatahub-operator that referenced this pull request Mar 31, 2023
* Initialize operator-sdk 1.23

* Add apis from kfctl

* Add KfDef controller

* Add 'pkg' folder

* Add Secret Generator controller

* Update go modules and depricated methods

* Remove b2ndcontroller, update watch functions

* Update 'Apply()' to initalize ApplyOptions

* Update manifests config

* Update Dockerfile, Makefile & README

Update dockerfile

* Add Dashboard CRDs

* Add OLM Bundle
VaishnaviHire pushed a commit to VaishnaviHire/opendatahub-operator that referenced this pull request Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Operator SDK and Go version
5 participants