You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by Hao t Chang <ht...@us.ibm.com> on 2022/11/19 19:39:45 UTC

[DISCUSS] OLM Bundles for Flink Kubernetes Operator

Hi everyone,



A while ago, we created the OLM bundle for Flink Kubernetes Operator on the OperatorHub [1]; however, the bundle is not endorsed by the Apache Flink community. I would like to ask your opinion how we can make the bundle more official or even as a part of the Flink Kubernetes Operator release. Please look at the document [2] where I have addressed some concerns from the community. I will be happy to answer any questions. Thank you.



For people who are not familiar with OLM(Operator Lifecycle manager), it manages the lifecycle of Operators on Kubernetes clusters and comes by default on the OpenShift Container Platform. The OperatorHub is the online catalog for users to search and install Operators with OLM.



[1] https://operatorhub.io/operator/flink-kubernetes-operator
[2] https://docs.google.com/document/d/1BiLzfPYb3Thzk01H4teB8_Crqs5FydQYS2Utj11HlLs/edit?usp=sharing

--
Best,
Ted Chang | Software Engineer | htchang@us.ibm.com


[DISCUSS] OLM Bundles for Flink Kubernetes Operator

Posted by Hao t Chang <ht...@us.ibm.com>.
Hi Gyula,

This is a good model. I will prepare a PR. Jim and I will help the verification and release process.

--
Best,
Ted Chang | Software Engineer | htchang@us.ibm.com


Re: [DISCUSS] OLM Bundles for Flink Kubernetes Operator

Posted by Gyula Fóra <gy...@gmail.com>.
Hi All!

I think for this first version let's go with the following simple model:

1. We include the OLM bundle generation script in the operator git repo
before the release
2. We add one extra release verification step to the wiki with detailed
instructions on generating and verifying the bundle
3. Once the release is done, we generate the bundle from the release helm
chart and publish it.

This is a relatively lightweight process with minimal burden on the release
managers and hopefully Ted can help out with the verification and release
process!

What do you think?

If there are no major objections, it would be great to have a PR this week
to get it in before the feature freeze.

Gyula

On Tue, Nov 29, 2022 at 3:37 PM Őrhidi Mátyás <ma...@gmail.com>
wrote:

> Hi folks,
>
> I'm going to shepherd the upcoming 1.3.0 release. I'll also try to find
> some time to review the OLM integration proposal, and see how much extra
> effort it would be.
>
> Best,
> Matyas
>
> On Wed, Nov 23, 2022 at 5:45 PM Yang Wang <da...@gmail.com> wrote:
>
> > Improving the visibility of Flink Kubernetes Operator is great. And I
> agree
> > OLM could help with this.
> >
> > I just hope this will not make the whole release process too complicated.
> > Of course, if we want to integrate the OLM into the official release, it
> > should be tested by the users easily.
> >
> > Best,
> > Yang
> >
> > Gyula Fóra <gy...@gmail.com> 于2022年11月24日周四 00:29写道:
> >
> > > Ted, Jim:
> > >
> > > When we create the RC bundle (jars, sources, helm chart) we execute the
> > > following steps:
> > >  1. Push the RC tag to git -> this will generate and publish an image
> > with
> > > the RC git commit tag to ghcr.io
> > >  2. We bake into the helm chart the RC tag as the image tag
> > >  3. We create the source and helm bundle, then publish it
> > >
> > > In step 3 we also need to add the OLM bundle creation and we can bake
> in
> > > the same ghcr.io image tag.
> > >
> > > Gyula
> > >
> > > On Wed, Nov 23, 2022 at 7:13 AM Jim Busche <jb...@us.ibm.com> wrote:
> > >
> > > > I'm curious how the RC automation works now - is it fully automatic?
> > For
> > > > example, a RC Debian image gets created, something like:
> > > > ghcr.io/apache/flink-kubernetes-operator:95128bf<
> > > > http://ghcr.io/apache/flink-kubernetes-operator:95128bf> and is
> pushed
> > > to
> > > > ghcr.io … then that's used in the rc helm chart?
> > > >
> > > > If that's all automated, then that rc candidate operator image value
> > must
> > > > be stored as a variable, and could be utilized to build the OLM
> bundle
> > as
> > > > well with the same rc operator image.  Then the bundle and catalog
> > could
> > > be
> > > > pushed to ghcr.io for testing.
> > > >
> > > >
> > > >
> > > > If it's not automated, then in the manual steps, there could a few
> > steps
> > > > added to set the rc operator image value prior to running the bundle
> > > > creation, then manually pushing the bundle and catalog to ghcr.io
> for
> > > > testing.
> > > >
> > > >
> > > > Thanks, Jim
> > > > --
> > > > James Busche | Sr. Software Engineer, Watson AI and Data Open
> > Technology
> > > |
> > > > 408-460-0737 | jbusche@us.ibm.com<ma...@us.ibm.com>
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > From: Hao t Chang <ht...@us.ibm.com>
> > > > Date: Tuesday, November 22, 2022 at 2:55 PM
> > > > To: dev@flink.apache.org <de...@flink.apache.org>
> > > > Subject: [EXTERNAL] [DISCUSS] OLM Bundles for Flink Kubernetes
> Operator
> > > > Hi Gyula,
> > > >
> > > > Agree, we should include the bundle file and let community inspect
> them
> > > in
> > > > the staging repo. In addition, people can do a few things to test the
> > > > bundle files.
> > > > 1.            Run CI test suits (
> > > >
> https://github.com/tedhtchang/olm#run-ci-test-suits-before-creating-pr
> > )
> > > > with the bundle files directly.
> > > > 2.            Deploy operator with OLM (requires the bundle image in
> a
> > > > registry)
> > > > 3.            Test operators upgrade from the previous version with
> > > > OLM(requires both bundle and catalog image in a registry)
> > > >
> > > > For 2 and 3, it’s better to build a bundle and catalog images as part
> > of
> > > > the staging. For example, during the next release(1.3.0-rc1),
> > temporally
> > > > push the 2 images to
> > > > ghcr.io/apache/flink-kubernetes-operator-bundle:1.3.0-rc1 and
> > > > ghcr.io/apache/flink-kubernetes-opeator-catalog:1.3.0-rc1. Then,
> > > > community can test 2. and 3. easily with the following commands:
> > > > # Deploy the catalog src in default ns
> > > > cat <<EOF | kubectl apply -f -
> > > > apiVersion: operators.coreos.com/v1alpha1
> > > > kind: CatalogSource
> > > > metadata:
> > > >   name: olm-flink-operator-catalog
> > > >   namespace: default
> > > > spec:
> > > >   sourceType: grpc
> > > >   image: ghcr.io/apache/flink-kubernetes-opeator-catalog:1.3.0-rc1
> > > > EOF
> > > >
> > > > # Deploy operator from the catalog
> > > > Cat <<EOF | kubectl apply -f -
> > > > apiVersion: operators.coreos.com/v1alpha2
> > > > kind: OperatorGroup
> > > > metadata:
> > > >   name: default-og
> > > >   namespace: default
> > > > spec:
> > > >   targetNamespaces:
> > > >   - default
> > > > ---
> > > > apiVersion: operators.coreos.com/v1alpha1
> > > > kind: Subscription
> > > > metadata:
> > > >   name: flink-kubernetes-operator
> > > >   namespace: default
> > > > spec:
> > > >   channel: alpha
> > > >   name: flink-kubernetes-operator
> > > >   source: olm-flink-operator-catalog
> > > >   sourceNamespace: default
> > > >   # For testing upgrade from previous version
> > > >   # installPlanApproval: Automatic # Manual
> > > >   # startingCSV: flink-kubernetes-operator.v1.2.0
> > > > EOF
> > > >
> > >
> >
>

Re: [DISCUSS] OLM Bundles for Flink Kubernetes Operator

Posted by Őrhidi Mátyás <ma...@gmail.com>.
Hi folks,

I'm going to shepherd the upcoming 1.3.0 release. I'll also try to find
some time to review the OLM integration proposal, and see how much extra
effort it would be.

Best,
Matyas

On Wed, Nov 23, 2022 at 5:45 PM Yang Wang <da...@gmail.com> wrote:

> Improving the visibility of Flink Kubernetes Operator is great. And I agree
> OLM could help with this.
>
> I just hope this will not make the whole release process too complicated.
> Of course, if we want to integrate the OLM into the official release, it
> should be tested by the users easily.
>
> Best,
> Yang
>
> Gyula Fóra <gy...@gmail.com> 于2022年11月24日周四 00:29写道:
>
> > Ted, Jim:
> >
> > When we create the RC bundle (jars, sources, helm chart) we execute the
> > following steps:
> >  1. Push the RC tag to git -> this will generate and publish an image
> with
> > the RC git commit tag to ghcr.io
> >  2. We bake into the helm chart the RC tag as the image tag
> >  3. We create the source and helm bundle, then publish it
> >
> > In step 3 we also need to add the OLM bundle creation and we can bake in
> > the same ghcr.io image tag.
> >
> > Gyula
> >
> > On Wed, Nov 23, 2022 at 7:13 AM Jim Busche <jb...@us.ibm.com> wrote:
> >
> > > I'm curious how the RC automation works now - is it fully automatic?
> For
> > > example, a RC Debian image gets created, something like:
> > > ghcr.io/apache/flink-kubernetes-operator:95128bf<
> > > http://ghcr.io/apache/flink-kubernetes-operator:95128bf> and is pushed
> > to
> > > ghcr.io … then that's used in the rc helm chart?
> > >
> > > If that's all automated, then that rc candidate operator image value
> must
> > > be stored as a variable, and could be utilized to build the OLM bundle
> as
> > > well with the same rc operator image.  Then the bundle and catalog
> could
> > be
> > > pushed to ghcr.io for testing.
> > >
> > >
> > >
> > > If it's not automated, then in the manual steps, there could a few
> steps
> > > added to set the rc operator image value prior to running the bundle
> > > creation, then manually pushing the bundle and catalog to ghcr.io for
> > > testing.
> > >
> > >
> > > Thanks, Jim
> > > --
> > > James Busche | Sr. Software Engineer, Watson AI and Data Open
> Technology
> > |
> > > 408-460-0737 | jbusche@us.ibm.com<ma...@us.ibm.com>
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > From: Hao t Chang <ht...@us.ibm.com>
> > > Date: Tuesday, November 22, 2022 at 2:55 PM
> > > To: dev@flink.apache.org <de...@flink.apache.org>
> > > Subject: [EXTERNAL] [DISCUSS] OLM Bundles for Flink Kubernetes Operator
> > > Hi Gyula,
> > >
> > > Agree, we should include the bundle file and let community inspect them
> > in
> > > the staging repo. In addition, people can do a few things to test the
> > > bundle files.
> > > 1.            Run CI test suits (
> > > https://github.com/tedhtchang/olm#run-ci-test-suits-before-creating-pr
> )
> > > with the bundle files directly.
> > > 2.            Deploy operator with OLM (requires the bundle image in a
> > > registry)
> > > 3.            Test operators upgrade from the previous version with
> > > OLM(requires both bundle and catalog image in a registry)
> > >
> > > For 2 and 3, it’s better to build a bundle and catalog images as part
> of
> > > the staging. For example, during the next release(1.3.0-rc1),
> temporally
> > > push the 2 images to
> > > ghcr.io/apache/flink-kubernetes-operator-bundle:1.3.0-rc1 and
> > > ghcr.io/apache/flink-kubernetes-opeator-catalog:1.3.0-rc1. Then,
> > > community can test 2. and 3. easily with the following commands:
> > > # Deploy the catalog src in default ns
> > > cat <<EOF | kubectl apply -f -
> > > apiVersion: operators.coreos.com/v1alpha1
> > > kind: CatalogSource
> > > metadata:
> > >   name: olm-flink-operator-catalog
> > >   namespace: default
> > > spec:
> > >   sourceType: grpc
> > >   image: ghcr.io/apache/flink-kubernetes-opeator-catalog:1.3.0-rc1
> > > EOF
> > >
> > > # Deploy operator from the catalog
> > > Cat <<EOF | kubectl apply -f -
> > > apiVersion: operators.coreos.com/v1alpha2
> > > kind: OperatorGroup
> > > metadata:
> > >   name: default-og
> > >   namespace: default
> > > spec:
> > >   targetNamespaces:
> > >   - default
> > > ---
> > > apiVersion: operators.coreos.com/v1alpha1
> > > kind: Subscription
> > > metadata:
> > >   name: flink-kubernetes-operator
> > >   namespace: default
> > > spec:
> > >   channel: alpha
> > >   name: flink-kubernetes-operator
> > >   source: olm-flink-operator-catalog
> > >   sourceNamespace: default
> > >   # For testing upgrade from previous version
> > >   # installPlanApproval: Automatic # Manual
> > >   # startingCSV: flink-kubernetes-operator.v1.2.0
> > > EOF
> > >
> >
>

Re: [DISCUSS] OLM Bundles for Flink Kubernetes Operator

Posted by Yang Wang <da...@gmail.com>.
Improving the visibility of Flink Kubernetes Operator is great. And I agree
OLM could help with this.

I just hope this will not make the whole release process too complicated.
Of course, if we want to integrate the OLM into the official release, it
should be tested by the users easily.

Best,
Yang

Gyula Fóra <gy...@gmail.com> 于2022年11月24日周四 00:29写道:

> Ted, Jim:
>
> When we create the RC bundle (jars, sources, helm chart) we execute the
> following steps:
>  1. Push the RC tag to git -> this will generate and publish an image with
> the RC git commit tag to ghcr.io
>  2. We bake into the helm chart the RC tag as the image tag
>  3. We create the source and helm bundle, then publish it
>
> In step 3 we also need to add the OLM bundle creation and we can bake in
> the same ghcr.io image tag.
>
> Gyula
>
> On Wed, Nov 23, 2022 at 7:13 AM Jim Busche <jb...@us.ibm.com> wrote:
>
> > I'm curious how the RC automation works now - is it fully automatic?  For
> > example, a RC Debian image gets created, something like:
> > ghcr.io/apache/flink-kubernetes-operator:95128bf<
> > http://ghcr.io/apache/flink-kubernetes-operator:95128bf> and is pushed
> to
> > ghcr.io … then that's used in the rc helm chart?
> >
> > If that's all automated, then that rc candidate operator image value must
> > be stored as a variable, and could be utilized to build the OLM bundle as
> > well with the same rc operator image.  Then the bundle and catalog could
> be
> > pushed to ghcr.io for testing.
> >
> >
> >
> > If it's not automated, then in the manual steps, there could a few steps
> > added to set the rc operator image value prior to running the bundle
> > creation, then manually pushing the bundle and catalog to ghcr.io for
> > testing.
> >
> >
> > Thanks, Jim
> > --
> > James Busche | Sr. Software Engineer, Watson AI and Data Open Technology
> |
> > 408-460-0737 | jbusche@us.ibm.com<ma...@us.ibm.com>
> >
> >
> >
> >
> >
> >
> >
> >
> > From: Hao t Chang <ht...@us.ibm.com>
> > Date: Tuesday, November 22, 2022 at 2:55 PM
> > To: dev@flink.apache.org <de...@flink.apache.org>
> > Subject: [EXTERNAL] [DISCUSS] OLM Bundles for Flink Kubernetes Operator
> > Hi Gyula,
> >
> > Agree, we should include the bundle file and let community inspect them
> in
> > the staging repo. In addition, people can do a few things to test the
> > bundle files.
> > 1.            Run CI test suits (
> > https://github.com/tedhtchang/olm#run-ci-test-suits-before-creating-pr )
> > with the bundle files directly.
> > 2.            Deploy operator with OLM (requires the bundle image in a
> > registry)
> > 3.            Test operators upgrade from the previous version with
> > OLM(requires both bundle and catalog image in a registry)
> >
> > For 2 and 3, it’s better to build a bundle and catalog images as part of
> > the staging. For example, during the next release(1.3.0-rc1), temporally
> > push the 2 images to
> > ghcr.io/apache/flink-kubernetes-operator-bundle:1.3.0-rc1 and
> > ghcr.io/apache/flink-kubernetes-opeator-catalog:1.3.0-rc1. Then,
> > community can test 2. and 3. easily with the following commands:
> > # Deploy the catalog src in default ns
> > cat <<EOF | kubectl apply -f -
> > apiVersion: operators.coreos.com/v1alpha1
> > kind: CatalogSource
> > metadata:
> >   name: olm-flink-operator-catalog
> >   namespace: default
> > spec:
> >   sourceType: grpc
> >   image: ghcr.io/apache/flink-kubernetes-opeator-catalog:1.3.0-rc1
> > EOF
> >
> > # Deploy operator from the catalog
> > Cat <<EOF | kubectl apply -f -
> > apiVersion: operators.coreos.com/v1alpha2
> > kind: OperatorGroup
> > metadata:
> >   name: default-og
> >   namespace: default
> > spec:
> >   targetNamespaces:
> >   - default
> > ---
> > apiVersion: operators.coreos.com/v1alpha1
> > kind: Subscription
> > metadata:
> >   name: flink-kubernetes-operator
> >   namespace: default
> > spec:
> >   channel: alpha
> >   name: flink-kubernetes-operator
> >   source: olm-flink-operator-catalog
> >   sourceNamespace: default
> >   # For testing upgrade from previous version
> >   # installPlanApproval: Automatic # Manual
> >   # startingCSV: flink-kubernetes-operator.v1.2.0
> > EOF
> >
>

Re: [DISCUSS] OLM Bundles for Flink Kubernetes Operator

Posted by Gyula Fóra <gy...@gmail.com>.
Ted, Jim:

When we create the RC bundle (jars, sources, helm chart) we execute the
following steps:
 1. Push the RC tag to git -> this will generate and publish an image with
the RC git commit tag to ghcr.io
 2. We bake into the helm chart the RC tag as the image tag
 3. We create the source and helm bundle, then publish it

In step 3 we also need to add the OLM bundle creation and we can bake in
the same ghcr.io image tag.

Gyula

On Wed, Nov 23, 2022 at 7:13 AM Jim Busche <jb...@us.ibm.com> wrote:

> I'm curious how the RC automation works now - is it fully automatic?  For
> example, a RC Debian image gets created, something like:
> ghcr.io/apache/flink-kubernetes-operator:95128bf<
> http://ghcr.io/apache/flink-kubernetes-operator:95128bf> and is pushed to
> ghcr.io … then that's used in the rc helm chart?
>
> If that's all automated, then that rc candidate operator image value must
> be stored as a variable, and could be utilized to build the OLM bundle as
> well with the same rc operator image.  Then the bundle and catalog could be
> pushed to ghcr.io for testing.
>
>
>
> If it's not automated, then in the manual steps, there could a few steps
> added to set the rc operator image value prior to running the bundle
> creation, then manually pushing the bundle and catalog to ghcr.io for
> testing.
>
>
> Thanks, Jim
> --
> James Busche | Sr. Software Engineer, Watson AI and Data Open Technology |
> 408-460-0737 | jbusche@us.ibm.com<ma...@us.ibm.com>
>
>
>
>
>
>
>
>
> From: Hao t Chang <ht...@us.ibm.com>
> Date: Tuesday, November 22, 2022 at 2:55 PM
> To: dev@flink.apache.org <de...@flink.apache.org>
> Subject: [EXTERNAL] [DISCUSS] OLM Bundles for Flink Kubernetes Operator
> Hi Gyula,
>
> Agree, we should include the bundle file and let community inspect them in
> the staging repo. In addition, people can do a few things to test the
> bundle files.
> 1.            Run CI test suits (
> https://github.com/tedhtchang/olm#run-ci-test-suits-before-creating-pr )
> with the bundle files directly.
> 2.            Deploy operator with OLM (requires the bundle image in a
> registry)
> 3.            Test operators upgrade from the previous version with
> OLM(requires both bundle and catalog image in a registry)
>
> For 2 and 3, it’s better to build a bundle and catalog images as part of
> the staging. For example, during the next release(1.3.0-rc1), temporally
> push the 2 images to
> ghcr.io/apache/flink-kubernetes-operator-bundle:1.3.0-rc1 and
> ghcr.io/apache/flink-kubernetes-opeator-catalog:1.3.0-rc1. Then,
> community can test 2. and 3. easily with the following commands:
> # Deploy the catalog src in default ns
> cat <<EOF | kubectl apply -f -
> apiVersion: operators.coreos.com/v1alpha1
> kind: CatalogSource
> metadata:
>   name: olm-flink-operator-catalog
>   namespace: default
> spec:
>   sourceType: grpc
>   image: ghcr.io/apache/flink-kubernetes-opeator-catalog:1.3.0-rc1
> EOF
>
> # Deploy operator from the catalog
> Cat <<EOF | kubectl apply -f -
> apiVersion: operators.coreos.com/v1alpha2
> kind: OperatorGroup
> metadata:
>   name: default-og
>   namespace: default
> spec:
>   targetNamespaces:
>   - default
> ---
> apiVersion: operators.coreos.com/v1alpha1
> kind: Subscription
> metadata:
>   name: flink-kubernetes-operator
>   namespace: default
> spec:
>   channel: alpha
>   name: flink-kubernetes-operator
>   source: olm-flink-operator-catalog
>   sourceNamespace: default
>   # For testing upgrade from previous version
>   # installPlanApproval: Automatic # Manual
>   # startingCSV: flink-kubernetes-operator.v1.2.0
> EOF
>

Re: [DISCUSS] OLM Bundles for Flink Kubernetes Operator

Posted by Jim Busche <jb...@us.ibm.com>.
I'm curious how the RC automation works now - is it fully automatic?  For example, a RC Debian image gets created, something like:
ghcr.io/apache/flink-kubernetes-operator:95128bf<http://ghcr.io/apache/flink-kubernetes-operator:95128bf> and is pushed to ghcr.io … then that's used in the rc helm chart?

If that's all automated, then that rc candidate operator image value must be stored as a variable, and could be utilized to build the OLM bundle as well with the same rc operator image.  Then the bundle and catalog could be pushed to ghcr.io for testing.



If it's not automated, then in the manual steps, there could a few steps added to set the rc operator image value prior to running the bundle creation, then manually pushing the bundle and catalog to ghcr.io for testing.


Thanks, Jim
--
James Busche | Sr. Software Engineer, Watson AI and Data Open Technology | 408-460-0737 | jbusche@us.ibm.com<ma...@us.ibm.com>








From: Hao t Chang <ht...@us.ibm.com>
Date: Tuesday, November 22, 2022 at 2:55 PM
To: dev@flink.apache.org <de...@flink.apache.org>
Subject: [EXTERNAL] [DISCUSS] OLM Bundles for Flink Kubernetes Operator
Hi Gyula,

Agree, we should include the bundle file and let community inspect them in the staging repo. In addition, people can do a few things to test the bundle files.
1.            Run CI test suits (https://github.com/tedhtchang/olm#run-ci-test-suits-before-creating-pr ) with the bundle files directly.
2.            Deploy operator with OLM (requires the bundle image in a registry)
3.            Test operators upgrade from the previous version with OLM(requires both bundle and catalog image in a registry)

For 2 and 3, it’s better to build a bundle and catalog images as part of the staging. For example, during the next release(1.3.0-rc1), temporally push the 2 images to ghcr.io/apache/flink-kubernetes-operator-bundle:1.3.0-rc1 and ghcr.io/apache/flink-kubernetes-opeator-catalog:1.3.0-rc1. Then, community can test 2. and 3. easily with the following commands:
# Deploy the catalog src in default ns
cat <<EOF | kubectl apply -f -
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: olm-flink-operator-catalog
  namespace: default
spec:
  sourceType: grpc
  image: ghcr.io/apache/flink-kubernetes-opeator-catalog:1.3.0-rc1
EOF

# Deploy operator from the catalog
Cat <<EOF | kubectl apply -f -
apiVersion: operators.coreos.com/v1alpha2
kind: OperatorGroup
metadata:
  name: default-og
  namespace: default
spec:
  targetNamespaces:
  - default
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: flink-kubernetes-operator
  namespace: default
spec:
  channel: alpha
  name: flink-kubernetes-operator
  source: olm-flink-operator-catalog
  sourceNamespace: default
  # For testing upgrade from previous version
  # installPlanApproval: Automatic # Manual
  # startingCSV: flink-kubernetes-operator.v1.2.0
EOF

[DISCUSS] OLM Bundles for Flink Kubernetes Operator

Posted by Hao t Chang <ht...@us.ibm.com>.
Hi Gyula,

Agree, we should include the bundle file and let community inspect them in the staging repo. In addition, people can do a few things to test the bundle files.
1.            Run CI test suits (https://github.com/tedhtchang/olm#run-ci-test-suits-before-creating-pr) with the bundle files directly.
2.            Deploy operator with OLM (requires the bundle image in a registry)
3.            Test operators upgrade from the previous version with OLM(requires both bundle and catalog image in a registry)

For 2 and 3, it’s better to build a bundle and catalog images as part of the staging. For example, during the next release(1.3.0-rc1), temporally push the 2 images to ghcr.io/apache/flink-kubernetes-operator-bundle:1.3.0-rc1 and ghcr.io/apache/flink-kubernetes-opeator-catalog:1.3.0-rc1. Then, community can test 2. and 3. easily with the following commands:
# Deploy the catalog src in default ns
cat <<EOF | kubectl apply -f -
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: olm-flink-operator-catalog
  namespace: default
spec:
  sourceType: grpc
  image: ghcr.io/apache/flink-kubernetes-opeator-catalog:1.3.0-rc1
EOF

# Deploy operator from the catalog
Cat <<EOF | kubectl apply -f -
apiVersion: operators.coreos.com/v1alpha2
kind: OperatorGroup
metadata:
  name: default-og
  namespace: default
spec:
  targetNamespaces:
  - default
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: flink-kubernetes-operator
  namespace: default
spec:
  channel: alpha
  name: flink-kubernetes-operator
  source: olm-flink-operator-catalog
  sourceNamespace: default
  # For testing upgrade from previous version
  # installPlanApproval: Automatic # Manual
  # startingCSV: flink-kubernetes-operator.v1.2.0
EOF


Re: [DISCUSS] OLM Bundles for Flink Kubernetes Operator

Posted by Gyula Fóra <gy...@gmail.com>.
Hi Ted!

My main concern here is how do we ensure that the bundle uploaded to the
OLM registry is vetted by the community and corresponds to the latest
release.

I think we definitely should not upload anything until the release process
is complete and the community actually tested the bundle.
So my question is, is it possible to test the OLM bundle if we simply tar
it like the helm / source release and put it in the staging repo?

If so then we should test it from there, and once the release is approved,
uploading to the OLM repo should be a similar finalization step as to
uploading the docker containers to Dockerhub.

Cheers,
Gyula

On Mon, Nov 21, 2022 at 6:54 PM Hao t Chang <ht...@us.ibm.com> wrote:

> Hi Gyula,
>
> We will let you decide the bundle should be an artifact or not.  In my
> opinion, the easiest way people may test the bundle is that the catalog and
> bundle images are already in a registry. This way, people only need to
> apply the catsrc, og, and sub(
> https://github.com/tedhtchang/olm/blob/5e147d6223c0056b87f26f55e24d14aac37ed12a/AutomatedOLMBuildAndDeploy.sh#L18-L60)
> to install the operator. They don’t really touch the bundle files unless
> they are going to modify the bundle.
>
> --
> Best,
> Ted Chang | Software Engineer | htchang@us.ibm.com
>
>
>

[DISCUSS] OLM Bundles for Flink Kubernetes Operator

Posted by Hao t Chang <ht...@us.ibm.com>.
Hi Gyula,

We will let you decide the bundle should be an artifact or not.  In my opinion, the easiest way people may test the bundle is that the catalog and bundle images are already in a registry. This way, people only need to apply the catsrc, og, and sub(https://github.com/tedhtchang/olm/blob/5e147d6223c0056b87f26f55e24d14aac37ed12a/AutomatedOLMBuildAndDeploy.sh#L18-L60) to install the operator. They don’t really touch the bundle files unless they are going to modify the bundle.

--
Best,
Ted Chang | Software Engineer | htchang@us.ibm.com



Re: [DISCUSS] OLM Bundles for Flink Kubernetes Operator

Posted by Gyula Fóra <gy...@gmail.com>.
Hi Ted!

Thank you for the proposal. I think it would be great to have an official
OLM bundle similar to the Helm chart especially if we can generate the
bundle during the release process.

Do you think it would make sense to generate the bundle as part of the
release artifacts so that it could be tested by the community?
Also should we include the bundle with the official release artifacts? (
https://dist.apache.org/repos/dist/release/flink/flink-kubernetes-operator-1.2.0/
)

Thanks,
Gyula




On Sun, Nov 20, 2022 at 5:18 PM Hao t Chang <ht...@us.ibm.com> wrote:

> Hi Mark,
> I got 404 too. Try this if you were installing OLM:
> curl -sL
> https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.22.0/install.sh
> | bash -s v0.22.0
>

答复: [DISCUSS] OLM Bundles for Flink Kubernetes Operator

Posted by Hao t Chang <ht...@us.ibm.com>.
Hi Mark,
I got 404 too. Try this if you were installing OLM:
curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.22.0/install.sh | bash -s v0.22.0

答复: [DISCUSS] OLM Bundles for Flink Kubernetes Operator

Posted by Mark Lee <li...@126.com>.
Hi Chang,
   The olm download url in install.sh is 404(url:
https://github.com/operator-framework/operator-lifecycle-manager/releases/ta
g/v0.22.0). 
default_base_url=https://github.com/operator-framework/operator-lifecycle-ma
nager/releases/download

-----邮件原件-----
发件人: dev-return-65502-lifuqiong00=126.com@flink.apache.org
<de...@flink.apache.org> 代表 Hao t Chang
发送时间: 2022年11月20日 3:40
收件人: dev@flink.apache.org
主题: [DISCUSS] OLM Bundles for Flink Kubernetes Operator

Hi everyone,



A while ago, we created the OLM bundle for Flink Kubernetes Operator on the
OperatorHub [1]; however, the bundle is not endorsed by the Apache Flink
community. I would like to ask your opinion how we can make the bundle more
official or even as a part of the Flink Kubernetes Operator release. Please
look at the document [2] where I have addressed some concerns from the
community. I will be happy to answer any questions. Thank you.



For people who are not familiar with OLM(Operator Lifecycle manager), it
manages the lifecycle of Operators on Kubernetes clusters and comes by
default on the OpenShift Container Platform. The OperatorHub is the online
catalog for users to search and install Operators with OLM.



[1] https://operatorhub.io/operator/flink-kubernetes-operator
[2]
https://docs.google.com/document/d/1BiLzfPYb3Thzk01H4teB8_Crqs5FydQYS2Utj11H
lLs/edit?usp=sharing

--
Best,
Ted Chang | Software Engineer | htchang@us.ibm.com