-
Notifications
You must be signed in to change notification settings - Fork 92
Add Network, NetworkLink, InterNetworkIngress, NetworkAccess CRD types and manifests #2541
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
Closed
fgiorgetti
wants to merge
10
commits into
skupperproject:main
from
fgiorgetti:multi-van-pr1-api-types
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
a14b3a9
Add Network, NetworkLink, InterNetworkIngress, NetworkAccess CRD type…
fgiorgetti ee7c393
ADR explaining multi-van context and decisions
fgiorgetti 713d189
Fixed CEL validation and removed dup code as suggeseted by CodeRabbit
fgiorgetti 8d4ff78
Fixed RelesaedUnusedPorts
fgiorgetti a3bc6f5
Added unit tests to modified CRD related Go types
fgiorgetti eb4ff1f
Fixed conditions description for new CRDs
fgiorgetti ae935c0
Fixed typo in crd validation rule
fgiorgetti 88f2716
Introduced helm chart for skupper-crds
fgiorgetti dbaabd0
Keep multi-van resources as part of RBAC
fgiorgetti 48dd007
Fixed uninstall note on skupper-crds chart
fgiorgetti File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| apiVersion: v2 | ||
| name: skupper-crds | ||
| description: Helm chart for installing and upgrading Skupper CRDs. | ||
| version: 0.1.0-dev | ||
| appVersion: v2-dev | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| # skupper-crds | ||
|
|
||
| Helm chart for installing and upgrading [Skupper](https://skupper.io) CRDs. | ||
|
|
||
| Unlike the main `skupper` chart — where CRDs are placed in `crds/` and | ||
| therefore only installed on the initial `helm install` — this chart places all | ||
| CRDs in `templates/` so that `helm upgrade` applies the latest schemas on every | ||
| run. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Kubernetes 1.25+ | ||
| - Helm 3 | ||
|
|
||
| ## Using the chart | ||
|
|
||
| The chart exposes two independent flags that control which CRDs are installed: | ||
|
|
||
| | Value | Default | Description | | ||
| |---|---|---| | ||
| | `base` | `true` | Install the stable Skupper CRDs. | | ||
| | `multiVan` | `false` | Install the 4 multi-VAN CRDs (Network, NetworkLink, InterNetworkIngress, NetworkAccess). | | ||
|
|
||
| ### Base CRDs | ||
|
|
||
| The stable Skupper CRDs are installed by default: | ||
|
|
||
| ```bash | ||
| helm install skupper-crds oci://quay.io/skupper/helm/skupper-crds | ||
| ``` | ||
|
|
||
| To install only the multi-VAN CRDs and skip the base ones (e.g. base CRDs are | ||
| already present in the cluster from a previous install): | ||
|
|
||
| ```bash | ||
| helm install skupper-crds oci://quay.io/skupper/helm/skupper-crds \ | ||
| --set base=false \ | ||
| --set multiVan=true | ||
| ``` | ||
|
|
||
| ### Multi-VAN CRDs | ||
|
|
||
| The chart includes 4 additional CRDs that enable multi-VAN (Virtual Application | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i would not recommend to make reference to the number of additional CRDs and their names, seems like this section is going to get obsolete after changes or the creation of new crds, how about make reference to the actual folder instead? |
||
| Network) support: `Network`, `NetworkLink`, `InterNetworkIngress`, and | ||
| `NetworkAccess`. These are **disabled by default** and must be opted in | ||
| explicitly: | ||
|
|
||
| ```bash | ||
| helm install skupper-crds oci://quay.io/skupper/helm/skupper-crds \ | ||
| --set multiVan=true | ||
| ``` | ||
|
|
||
| To install both base and multi-VAN CRDs together using an override `values.yaml`: | ||
|
|
||
| ```yaml | ||
| base: true | ||
| multiVan: true | ||
| ``` | ||
|
|
||
| > **Note:** Once CRDs are installed, removing them (by running `helm upgrade` | ||
| > with a flag set to `false`) will **delete** the CRDs from the cluster, if they | ||
| > were installed via this helm chart. | ||
| > If the CRDs were installed using a different mechanism, Helm will not delete | ||
| > those CRDs during an upgrade or uninstall. If you want to delete them, you have | ||
| > to do it manually, with `kubectl delete crd`. | ||
|
|
||
| ## Upgrading the chart | ||
|
|
||
| Because all CRDs are in `templates/`, running `helm upgrade` is sufficient to | ||
| apply any schema changes: | ||
|
|
||
| ```bash | ||
| helm upgrade skupper-crds oci://quay.io/skupper/helm/skupper-crds | ||
| ``` | ||
|
|
||
| To also upgrade the multi-VAN CRDs: | ||
|
|
||
| ```bash | ||
| helm upgrade skupper-crds oci://quay.io/skupper/helm/skupper-crds \ | ||
| --set multiVan=true | ||
| ``` | ||
|
|
||
| ## Development | ||
|
|
||
| The chart has two parts: | ||
|
|
||
| - **Static** — `Chart.yaml`, `values.yaml`, `README.md`, and | ||
| `templates/NOTES.txt` are committed to the repository. | ||
| - **Generated** — `templates/crds.yaml` (stable CRDs, gated by `base`) and | ||
| `templates/multi-van-crds.yaml` (multi-van CRDs, gated by `multiVan`) are | ||
| produced by the generator script from the source files under `config/crd/` | ||
| and are gitignored. Both template files are applied on every `helm upgrade` | ||
| when their respective flag is `true`. | ||
|
|
||
| To regenerate the chart before packaging or linting, run: | ||
|
|
||
| ```bash | ||
| make generate-skupper-crds-helm-chart | ||
| ``` | ||
|
|
||
| This generates `templates/crds.yaml` from `config/crd/bases/` and | ||
| `templates/multi-van-crds.yaml` from `config/crd/multi-van/`. | ||
|
|
||
| To package the chart as a `.tgz`: | ||
|
|
||
| ```bash | ||
| make pack-skupper-crds-helm-chart | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| =========================================================== | ||
| skupper-crds chart is now installed in the cluster. | ||
| Skupper CRDs are available cluster-wide. | ||
| {{- if .Values.multiVan }} | ||
|
|
||
| Multi-VAN CRDs (Network, NetworkLink, InterNetworkIngress, | ||
| NetworkAccess) have been installed. | ||
| {{- end }} | ||
| =========================================================== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # When set to true, install the base CRDs | ||
| base: true | ||
| # When set to true, the 4 multi-VAN CRDs (Network, NetworkLink, | ||
| # InterNetworkIngress, NetworkAccess) are installed/upgraded on every | ||
| # helm install and helm upgrade. Set to false (the default) to omit them. | ||
| multiVan: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| resources: | ||
| - skupper_inter_network_ingress_crd.yaml | ||
| - skupper_network_access_crd.yaml | ||
| - skupper_network_crd.yaml | ||
| - skupper_network_link_crd.yaml |
132 changes: 132 additions & 0 deletions
132
config/crd/multi-van/skupper_inter_network_ingress_crd.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,132 @@ | ||
| apiVersion: apiextensions.k8s.io/v1 | ||
| kind: CustomResourceDefinition | ||
| metadata: | ||
| name: internetworkingresses.skupper.io | ||
| spec: | ||
| group: skupper.io | ||
| versions: | ||
| - name: v2alpha1 | ||
| served: true | ||
| storage: true | ||
| schema: | ||
| openAPIV3Schema: | ||
| description: |- | ||
| An InterNetworkIngress can be defined alongside a NetworkLink or a NetworkAccess, exposing | ||
| a local ingress routing key to be used by the remote router through an inter-network | ||
| mTLS connection. | ||
| The remote router can only send messages to the provided routing key. | ||
| type: object | ||
| properties: | ||
| spec: | ||
| type: object | ||
| properties: | ||
| routingKey: | ||
| type: string | ||
| description: The local ingress key to be exposed through the inter-network connection. | ||
| networkLink: | ||
| type: string | ||
| description: Name of the NetworkLink to expose the routing key through. | ||
| networkAccess: | ||
| type: string | ||
| description: Name of the NetworkAccess to expose the routing key through. | ||
| settings: | ||
| description: |- | ||
| Advanced. A map containing additional settings. Each map | ||
| entry has a string name and a string value. | ||
|
|
||
| **Note:** In general, we recommend not changing `settings` | ||
| from their default values. | ||
| type: object | ||
| additionalProperties: | ||
| type: string | ||
| x-kubernetes-validations: | ||
| - message: At least one of 'networkLink' or 'networkAccess' must be provided and non-empty. | ||
| rule: (has(self.networkLink) && self.networkLink != "") || (has(self.networkAccess) && self.networkAccess != "") | ||
| required: | ||
| - routingKey | ||
| status: | ||
| type: object | ||
| properties: | ||
| status: | ||
| description: |- | ||
| The current state of the resource. | ||
| - `Pending`: The resource is being processed. | ||
| - `Error`: There was an error processing the resource. See `message` for more information. | ||
| - `Ready`: The resource is ready to use. | ||
| type: string | ||
| message: | ||
| description: |- | ||
| A human-readable status message. Error messages are reported here. | ||
| type: string | ||
| conditions: | ||
| type: array | ||
| description: |- | ||
| A set of named conditions describing the current state of the resource. | ||
|
|
||
| - `Configured`: The inter network ingress configuration has been applied to the router. | ||
| - `Ready`: Access to the exposed routing key is ready. All other conditions are true. | ||
| items: | ||
| type: object | ||
| properties: | ||
| lastTransitionTime: | ||
| format: date-time | ||
| type: string | ||
| message: | ||
| maxLength: 32768 | ||
| type: string | ||
| observedGeneration: | ||
| format: int64 | ||
| minimum: 0 | ||
| type: integer | ||
| reason: | ||
| maxLength: 1024 | ||
| minLength: 1 | ||
| pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ | ||
| type: string | ||
| status: | ||
| enum: | ||
| - "True" | ||
| - "False" | ||
| - Unknown | ||
| type: string | ||
| type: | ||
| maxLength: 316 | ||
| pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ | ||
| type: string | ||
| required: | ||
| - lastTransitionTime | ||
| - message | ||
| - reason | ||
| - status | ||
| - type | ||
| subresources: | ||
| status: {} | ||
| additionalPrinterColumns: | ||
| - name: Routing Key | ||
| type: string | ||
| description: The local ingress key | ||
| jsonPath: .spec.routingKey | ||
| - name: Network Link | ||
| type: string | ||
| description: The network link name to use | ||
| jsonPath: .spec.networkLink | ||
| - name: Network Access | ||
| type: string | ||
| description: The network access name to use | ||
| jsonPath: .spec.networkAccess | ||
| - name: Status | ||
| type: string | ||
| description: The status of the VAN site | ||
| jsonPath: .status.status | ||
| - name: Message | ||
| type: string | ||
| description: Any human readable message relevant to the site | ||
| jsonPath: .status.message | ||
| scope: Namespaced | ||
| names: | ||
| plural: internetworkingresses | ||
| singular: internetworkingress | ||
| kind: InterNetworkIngress | ||
| listKind: InterNetworkIngressList | ||
| shortNames: | ||
| - ini |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a blocker: what is happening each release with the other helm charts is that the version matches the appVersion.