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

Carvel Package Proposal #1678

Closed
wants to merge 5 commits into from
Closed

Conversation

benjaminapetersen
Copy link
Member

@benjaminapetersen benjaminapetersen force-pushed the ben/carvel-package-proposal branch from 4edb653 to 4eb9a3d Compare September 15, 2023 21:41
- `Package` is a custom resource that represents configuration in the form of metadata and OCI images
that may be used to deliver software onto a Kuberentes cluster. See [the docs](https://carvel.dev/kapp-controller/docs/v0.47.x/packaging/#package)
for more information.
- `PackageMetadata` is a custom resource describing attributes for a `Package`. See [the docs](https://carvel.dev/kapp-controller/docs/v0.47.x/packaging/#package-metadata)
Copy link
Member

Choose a reason for hiding this comment

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

This looks like the way to specify your custom values.yaml, and thus cause your software to be installed. Does that sound correct?

Copy link
Member Author

Choose a reason for hiding this comment

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

As a consumer, to install the software, you'll use a PackageInstall and a Secret, similar to this:

---
apiVersion: packaging.carvel.dev/v1alpha1
kind: PackageInstall
metadata:
    name: "supervisor-package-install"
    namespace: supervisor-install-namespace # should NOT be "supervisor", keep install stuff separate
spec:
  serviceAccountName: "pinniped-package-rbac-supervisor" # will need RBAC
  packageRef:
    refName: "supervisor.pinniped.dev"
    versionSelection:
      constraints: ">0.25.0" #  packages will auto upgrade if they can, up to this constraint
  values:
  - secretRef:
      name: "supervisor-package-install-secret" # secret contains values.yaml values
---
apiVersion: v1
kind: Secret
metadata:
  name: "supervisor-package-install-secret"
    namespace: supervisor-install-namespace # should NOT be "supervisor", keep install stuff separate
# this looks familiar to us!
# this is where the actual values will live.
stringData:
  values.yml: |
    ---
    app_name: pinniped-supervisor
    namespace: supervisor
    api_group_suffix: pinniped.dev
    image_repo: pinniped.local/test/build
    image_tag: 6114CB3E-ACB5-4C67-ABE7-9ACC09B73056
    log_level: debug
    service_https_nodeport_port: 443
    service_https_nodeport_nodeport: 31243
    service_https_clusterip_port: 443

Copy link
Member

Choose a reason for hiding this comment

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

could we add this to the example PackageInstall below?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup, I can expand on this.

`Supervisor` and `Concierge. For example:

```yaml
spec:
Copy link
Member

Choose a reason for hiding this comment

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

Would you mind including apiVersion and kind on these example resources? Would really help me figure out how the pieces come together.

No changes or additions to Pinniped's own APIs, this proposal represents a second, alternative
method for deployment utilising Carvel APIs and tools.

#### Upgrades
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 include a note here about upgrading from a non-Carvel installation to a Carvel installation?

Copy link
Member Author

Choose a reason for hiding this comment

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

I can. I think it would simply be backup your specific configuration, delete Pinniped & reinstall.

@@ -0,0 +1,231 @@
---
Copy link
Member

Choose a reason for hiding this comment

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

Could we document which resources will not be deployed by the carvel package? Some possibilities:

  • FederationDomain
  • *IdentityProvider
  • Ingress?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah that sounds good.

@benjaminapetersen
Copy link
Member Author

Per our last team discussion, this is going to remain POC and not a formally supported package. We will commit code, but push it down into the /lib directory. It will exist for reference purposes, but not with supported yamls and images published via releases.


### Goals and Non-goals

Goals
Copy link
Member Author

Choose a reason for hiding this comment

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

At this point, should we update this section to indicate that this is not a fully supported feature and is instead meant to provide users both an example and a mechanism they may use to create their own package?

@benjaminapetersen
Copy link
Member Author

We have decided not to formally support Carvel packages for community usage at this time. There are some changes that have been merged in our /hack directory that show at least a POC for Carvel packaging that can be referenced if desired.

Closing this.

@cfryanr cfryanr deleted the ben/carvel-package-proposal branch June 21, 2024 15:38
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.

3 participants