Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

Introduce non-main package repo's #403

Merged
merged 20 commits into from
Apr 30, 2021
Merged

Conversation

seemiller
Copy link
Contributor

What this PR does / why we need it:
We are currently using a single repo, main, for our packages. We need to provide our users with a stable repository of packages while still being able to further develop TCE. This change will introduce non-main repos. Think of these as alpha or beta repos where engineers can make changes to packages and continue development of new features without impacting existing users/clusters.

Which issue(s) this PR fixes:

Fixes #385

Describe testing done for PR:

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


@seemiller
Copy link
Contributor Author

So my first take on this is to introduce an "environment" file, such as alpha.yaml. This file will act as the values file for ytt. As you can see in the file below, you can specify values for the repo and specific version information for each plugin. In this case I've declared a new name for a package repo and a URL with a new tag. This repo then has a cert-manager with referencing an alpha version and image tag.

@data/values
 ---

 repo:
   #! The name of the Package Repository
   name: tce-alpha.tanzu.vmware

   #! The URL for the repo image
   url: projects.registry.vmware.com/tce/main:alpha

 cert_manager:
   metadata:
     name: cert-manager.1.1.0-vmware-alpha
   spec:
     version: 1.1.0-vmware-alpha
     image: projects.registry.vmware.com/tce/cert-manager-package:alpha

You would use ytt to transform the existing repo and package manifests to update with values specific to the new "environment" file. This creates a repo with all the version information of your new environment.

ytt --ignore-unknown-comments -f addons/repos/main.yaml -f addons/repos/config/alpha.yaml -f addons/repos/config/overlays -f addons/repos/main/packages 

@joshrosso
Copy link
Contributor

joshrosso commented Apr 1, 2021

@seemiller Looks great!

I'm wondering about the value of addons/repos/config/alpha.yaml.

The addons/repos/main.yaml would be the "official" declaration of our main repo.
A addons/repos/beta.yaml could then be the "official" declaration of our beta repo.

This would make it easy for users to look in one location for the declaration of our repos.

"Overrides" like addons/repos/config/alpha.yaml are fine for package/repo developers to declare, but I think i'd want declarations of our repos to be flat.

Let me know your thoughts on this.

Some notes:

* if we made the above change, I think we could move `addons/repos/config/overlays` to `addons/repos/overlays`.
* With this change, we should set every package to reference `:latest` and assume in real usage, it'll get rendered via overlay.

@joshrosso joshrosso changed the title WIP - Introduce non-main repo's WIP - Introduce non-main package repo's Apr 1, 2021
@joshrosso joshrosso added the owner/packages Work executed by a package's maintainer label Apr 5, 2021
@joshrosso joshrosso added this to the v0.4.0 milestone Apr 5, 2021
@seemiller seemiller force-pushed the non-main-package-repos-385 branch 3 times, most recently from 77b5966 to c5e3c39 Compare April 13, 2021 14:47
@seemiller seemiller force-pushed the non-main-package-repos-385 branch 3 times, most recently from cee458a to ff72df9 Compare April 16, 2021 15:41
@seemiller seemiller requested review from joshrosso and stmcginnis and removed request for joshrosso and stmcginnis April 16, 2021 15:41
@seemiller
Copy link
Contributor Author

@joshrosso @stmcginnis I've updated some things on this branch. Y'all wanna take a look?

Copy link
Contributor

@jorgemoralespou jorgemoralespou left a comment

Choose a reason for hiding this comment

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

Some comments for you @seemiller

addons/repos/main.yaml Outdated Show resolved Hide resolved
addons/repos/nseemiller.yaml Outdated Show resolved Hide resolved
addons/repos/overlays/package.yaml Outdated Show resolved Hide resolved
addons/repos/overlays/package-repository.yaml Outdated Show resolved Hide resolved
@seemiller seemiller changed the title WIP - Introduce non-main package repo's Introduce non-main package repo's Apr 19, 2021
@seemiller seemiller force-pushed the non-main-package-repos-385 branch 4 times, most recently from 953cc7b to 57cd23d Compare April 21, 2021 19:07
Copy link
Contributor

@joshrosso joshrosso left a comment

Choose a reason for hiding this comment

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

@seemiller let's not introduce addons/repos/stages with a .gitkeep file. Instead, any relevant make target should create this directory and we should add it to the main .gitignore.

@seemiller seemiller force-pushed the non-main-package-repos-385 branch 5 times, most recently from 0225890 to 966b4e2 Compare April 30, 2021 15:44
* Reset all packages back to 0.3.0 versions (except for knative-serving, which had a PR to update it)
* Ensure all version numbers were correct
* renamed fluentbit to fluent-bit for consistency with other references
* All pacakges are now push to the repo as imgpkgBundles
* "stable" channel updated with SHAs to new imgpkgBundles

Signed-off-by: Nicholas Seemiller <nseemiller@vmware.com>
@seemiller seemiller merged commit 3cd95e4 into main Apr 30, 2021
@seemiller seemiller deleted the non-main-package-repos-385 branch April 30, 2021 17:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
owner/packages Work executed by a package's maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce non-main package repository
4 participants