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 config/ so make bundle can update bundle/ #216

Merged
merged 8 commits into from
Jun 6, 2023

Conversation

kaovilai
Copy link
Member

@kaovilai kaovilai commented May 1, 2023

👻 simplified tools/tackle-opdev.sh with make bundle
🐛 docker-build, bundle-build fixes for docker where --arch is invalid

🌱 make deploy-olm to run local unpublished changes from source installed with a new bundle.

  • replicate behavior of installing from OperatorHub giving you better idea of what the CSV, CRDs, RBACs, from the bundle/ looks like in the cluster rather than just creating a simple deployment or replacing the deployment image.
  • TL;DR make podman-build podman-push bundle bundle-build bundle-push using ttl.sh registry (no auth required)

Goal: minimize functional changes and allow for make bundle command to work using info from config/

diff <(curl -s https://raw.githubusercontent.com/konveyor/tackle2-operator/main/bundle/manifests/konveyor-operator.clusterserviceversion.yaml | yq -P 'sort_keys(..)') <(curl -s https://raw.githubusercontent.com/kaovilai/tackle2-operator/configmakefile-update/bundle/manifests/konveyor-operator.clusterserviceversion.yaml | yq -P 'sort_keys(..)')

minimal semantic diff when running through https://yamldiff.com/

  • curl https://raw.githubusercontent.com/konveyor/tackle2-operator/main/bundle/manifests/konveyor-operator.clusterserviceversion.yaml | yq -P 'sort_keys(..)'
  • curl https://raw.githubusercontent.com/kaovilai/tackle2-operator/configmakefile-update/bundle/manifests/konveyor-operator.clusterserviceversion.yaml | yq -P 'sort_keys(..)'

noop bundle/ changes

  • side-effect of operator-sdk generate bundle
    • yaml keys are now sorted from a to z
    • long string values are broken up into multiple lines
    • >+ |+ no longer has +

other bundle/ changes

  • 🌱 CSV name change: tackle-operator.v99.0.0 --> konveyor-operator.v99.0.0
  • relatedImages in CSV is now generated from manager Env RELATED_IMAGE_<> with prefix removed, lowercased:
    • new relatedImages:
      • oauth-proxy previously not in CSV.
    • renamed relatedImages:
      • tackle-addon --> addon-admin
      • tackle-addon-windup --> addon-windup
      • tackle-pathfinder --> pathfinder
      • tackle-keycloak --> keycloak-sso
      • tackle-keycloak-init --> keycloak-init
  • 🌱 renamed manager Env:
    • RELATED_IMAGE_TACKLE_POSTGRES replaces
      • RELATED_IMAGE_KEYCLOAK_DATABASE
      • RELATED_IMAGE_PATHFINDER_DATABASE
    • solves
      WARN[0000] warning: multiple related images with the same image ref, "pathfinder-database", and different names found.The image will only be listed once with an empty name.It is recmmended to either remove the duplicate or use the exact same name. 
      

While this is in draft, you may see some deletions in this PR which are a result of outdated config/ and will be resolved before coming out of draft..

Closes #201

Signed-off-by: Tiger Kaovilai [email protected]

@jwmatthews
Copy link
Member

If this ends up being the direction for metadata updates, let's be sure that the info captured in #200 is not lost.

@kaovilai kaovilai force-pushed the configmakefile-update branch 20 times, most recently from 1c276e3 to 0c18e4f Compare May 2, 2023 02:11
@kaovilai kaovilai changed the title Update config/ so it can generate bundle/ ⚠️ Update config/ so it can generate bundle/ May 2, 2023
@kaovilai kaovilai marked this pull request as ready for review May 2, 2023 03:17
@kaovilai kaovilai force-pushed the configmakefile-update branch 2 times, most recently from c61143d to 2e7c5ee Compare May 2, 2023 03:26
@kaovilai kaovilai changed the title ⚠️ Update config/ so it can generate bundle/ ⚠️ Update config/ so make bundle can update bundle/ May 2, 2023
@kaovilai
Copy link
Member Author

kaovilai commented May 2, 2023

rebased with community email update.

ready for review: @jwmatthews @jmontleon @djzager

@jmontleon
Copy link
Member

@fbladilo @rayfordj do you foresee any headache downstream generating the csv in this way. I can't really see why it would matter, but probably worth checking.

@rayfordj
Copy link

rayfordj commented May 8, 2023

@fbladilo @rayfordj do you foresee any headache downstream generating the csv in this way. I can't really see why it would matter, but probably worth checking.

@jmontleon , I don't see anything immediately concerning with the proposed changes. We should be business as usual downstream after a few initial adjustments to account for some of the things being introduced (Tackle -> Konveyor, RELATED_IMAGE, relatedImages, etc.).

In regards to potential downstream headache, I would like @fbladilo to review to ensure I'm not overlooking something he may catch, but I don't think we need to block merging if it's otherwise ready.

Thanks!

@fbladilo
Copy link
Contributor

fbladilo commented May 8, 2023

@jmontleon @rayfordj
Most of the changes seem to be in the realm of operator-sdk , basically "make bundle" work. We would need to reconcile certain VAR name changes , perhaps other minor changes into the CSV which is assembled quite differently downstream but seems Ok to me

@fbladilo
Copy link
Contributor

fbladilo commented May 10, 2023

@kaovilai @jmontleon I'm not sure how operator is being built and published currently but we might want to update the Dockerfile version to match the operator-sdk used to test this (assuming this Dockerfile is being used), right now is v1.22.0 which is quite dated and possibly CVE loaded:

https://github.com/konveyor/tackle2-operator/blob/main/Dockerfile

At some point , a full operator-sdk re-scaffolding of the repo might be appropiate , last time it was v1.22 .

@kaovilai kaovilai requested a review from fbladilo May 11, 2023 15:58
@kaovilai kaovilai force-pushed the configmakefile-update branch 2 times, most recently from 6abcf70 to 43313b1 Compare May 11, 2023 16:00
@kaovilai
Copy link
Member Author

@fbladilo no need to rescaffold.. just follow each migration guide here specific to ansible operator. 43313b1

@kaovilai kaovilai changed the title ⚠️ Update config/ so make bundle can update bundle/ 🌱: Update config/ so make bundle can update bundle/ May 31, 2023
kaovilai and others added 8 commits May 31, 2023 16:22
Signed-off-by: Tiger Kaovilai <[email protected]>
Signed-off-by: Tiger Kaovilai <[email protected]>
Following migration guide from v1.22.0 to v1.28.1
https://sdk.operatorframework.io/docs/upgrading-sdk-version/

- v1.23.0
  - Upgrade kustomize versions from v3.8.7 to v4.5.5
  - In the `molecule/default`, replace `--load_restrictor none .` with `--load-restrictor LoadRestrictionsNone`

- v1.24.0
  In Ansible & Helm-based operators, if you need to support arm64, add the following
  `| sed 's/aarch64/arm64/'`

  on the following line

  `ARCH := $(shell uname -m | sed 's/x86_64/amd64/')`

  The resulting line should look like this

  `ARCH := $(shell uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/')`

- v1.25.0
  Add docker-buildx target

- v1.26.0
  update ansible operator Makefile’s run target

- v1.28.0
  Upgrade kubernetes.core collection to v2.4.0

Signed-off-by: Tiger Kaovilai <[email protected]>
@kaovilai kaovilai changed the title 🌱: Update config/ so make bundle can update bundle/ 🌱 Update config/ so make bundle can update bundle/ May 31, 2023
@jmontleon jmontleon merged commit 5f8babf into konveyor:main Jun 6, 2023
@jmontleon
Copy link
Member

Let's not wait 10 months again @kaovilai, merged!

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.

config/ and Makefile bundle variables are out of date
6 participants