-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2906 from andrewballantyne/restructure-manifests
Restructure the manifest files
- Loading branch information
Showing
122 changed files
with
295 additions
and
247 deletions.
There are no files selected for viewing
This file contains 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 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 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 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,4 @@ | ||
# Ignore the testing files that are described in the README.md | ||
before-*-test.yaml | ||
after-*-test.yaml | ||
output-*.diff |
This file contains 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 |
---|---|---|
@@ -1,32 +1,59 @@ | ||
# Dashboard | ||
# Manifests | ||
|
||
The Open Data Hub Dashboard component installs a UI which | ||
The Dashboard manifests run on Kustomize. There are 3 types of deployments for the Dashboard component. | ||
|
||
- Shows what's installed | ||
- Show's what's available for installation | ||
- Links to component UIs | ||
- Links to component documentation | ||
- Open Data Hub ([`./odh`](./odh)) | ||
- Red Hat OpenShift AI | ||
- RHOAI Managed ([`./rhoai/addon`](./rhoai/addon)) | ||
- RHOAI Self Managed ([`./rhoai/onprem`](./rhoai/onprem)) | ||
|
||
For more information, visit the project [GitHub repo](https://github.com/opendatahub-io/odh-dashboard). | ||
Each deployment type will have a `params.env` file where the Operator can inject values for us to use. | ||
|
||
### Folders | ||
1. base: contains all the necessary yaml files to install the dashboard | ||
## Adding/Modifying Manifests | ||
|
||
##### Installation | ||
Use the `kustomize` tool to process the manifest for the `oc apply` command. | ||
Rules for keeping the manifest files in a sane order: | ||
|
||
1. When adding a new type of thing, always make it have its own folder; be sure to add the reference to the parent folder's `kustomziation.yaml` (if applicable) | ||
2. When adding to a preexisting folder, be sure to add it to the root `kustomization.yaml` in that folder | ||
3. Do not reference "a file" (has an extension) inside another folder. Reference other folders, which will pick up the `kustomization.yaml` inside that folder; those `kustomization.yaml` files should reference sibling files | ||
4. Folders matter -- see the README in each for more details | ||
|
||
## Installation (ODH) | ||
|
||
You can use the `kustomize` tool to process the manifest for the `oc apply` command. | ||
|
||
```markdown | ||
# Set the namespace in the manifest where you want to deploy the dashboard | ||
kustomize edit set namespace <DESTINATION NAMESPACE> | ||
kustomize build common | oc apply -f - | ||
kustomize build core-bases/base | oc apply -f - | ||
``` | ||
# Parse the base manifest to deploy ODH Dashboard WITHOUT the required configs for groups | ||
cd manifests/base | ||
kustomize edit set namespace <DESTINATION NAMESPACE> # Set the namespace in the manifest where you want to deploy the dashboard | ||
kustomize build . | oc apply -f - | ||
``` | ||
|
||
Alternatively, you can use the `./install/deploy.sh` which uses the `overlays/dev` overlay to select specific folders. | ||
|
||
## Testing Changes | ||
|
||
One way to test changes locally is to generate the full structure before your changes, and then again after your changes. | ||
|
||
Before: | ||
```markdown | ||
# Generate the files before your changes for a baseline | ||
kustomize build rhoai/addon > before-rhoai-addon-test.yaml | ||
kustomize build rhoai/onprem > before-rhoai-onprem-test.yaml | ||
kustomize build odh > before-odh-test.yaml | ||
``` | ||
# Deploy ODH Dashboard with authentication AND the default configs for groups and ODHDashboardConfig | ||
cd manifests/overlays/odhdashboardconfig | ||
kustomize edit set namespace <DESTINATION NAMESPACE> # Set the namespace in the manifest where you want to deploy the dashboard | ||
kustomize build . | oc apply -f - | ||
# You will need to re-run the previous step if you receive the error below | ||
# error: unable to recognize "STDIN": no matches for kind "OdhDashboardConfig" in version "opendatahub.io/v1alpha" | ||
|
||
After: | ||
```markdown | ||
# Generate the files after your changes | ||
kustomize build rhoai/addon > after-rhoai-addon-test.yaml | ||
kustomize build rhoai/onprem > after-rhoai-onprem-test.yaml | ||
kustomize build odh > after-odh-test.yaml | ||
|
||
# Generate the diff between the two | ||
git diff --no-index before-rhoai-addon-test.yaml after-rhoai-addon-test.yaml > output-rhoai-addon.diff | ||
git diff --no-index before-rhoai-onprem-test.yaml after-rhoai-onprem-test.yaml > output-rhoai-onprem.diff | ||
git diff --no-index before-odh-test.yaml after-odh-test.yaml > output-odh.diff | ||
``` | ||
|
||
Viewing the diffs will help you understand what changed. |
This file contains 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,7 @@ | ||
# Common Manifests | ||
|
||
These are manifests that are shared in both ODH & RHOAI deployments. | ||
|
||
These files are not intended to be the base of overriding or changing in any way. These should be immutable between both RHOAI and ODH deployments. | ||
|
||
> **Note:** See the [`../core-bases`](../core-bases/README.md) folder for those that can be overridden |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 0 additions & 3 deletions
3
manifests/apps/jupyter/kustomization.yaml → ...ts/common/apps/jupyter/kustomization.yaml
This file contains 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
3 changes: 0 additions & 3 deletions
3
manifests/apps/kustomization.yaml → manifests/common/apps/kustomization.yaml
This file contains 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 |
---|---|---|
@@ -1,7 +1,4 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
commonLabels: | ||
app: odh-dashboard | ||
app.kubernetes.io/part-of: odh-dashboard | ||
resources: | ||
- ./jupyter |
File renamed without changes.
5 changes: 1 addition & 4 deletions
5
manifests/crd/kustomization.yaml → manifests/common/crd/kustomization.yaml
This file contains 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 |
---|---|---|
@@ -1,11 +1,8 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
commonLabels: | ||
app: odh-dashboard | ||
app.kubernetes.io/part-of: odh-dashboard | ||
resources: | ||
- odhdashboardconfigs.opendatahub.io.crd.yaml | ||
- odhquickstarts.console.openshift.io.crd.yaml | ||
- odhdocuments.dashboard.opendatahub.io.crd.yaml | ||
- odhapplications.dashboard.opendatahub.io.crd.yaml | ||
- acceleratorprofiles.opendatahub.io.crd.yaml | ||
- acceleratorprofiles.opendatahub.io.crd.yaml |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ./crd | ||
- ./apps |
This file contains 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 @@ | ||
# Core-Bases Manifests | ||
|
||
These are manifest files that are intended to be used in part by other deployments and configured for their own use-cases. | ||
|
||
> **Note:** There should be note root `kustomization.yaml` as each folder should be treated as a specific target for inclusion or overrides. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.