-
Notifications
You must be signed in to change notification settings - Fork 0
docs: update docs #5
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
c8f9f8c
chore: add go docs, cleanup readme
codyshoffner 5dd70c0
chore: remove old task
codyshoffner b2f4a93
chore: remove unused src folder
codyshoffner 3eb2530
chore: update default to use full cluster
codyshoffner 9bd2eed
chore: more and more docs
codyshoffner d1497da
chore: update uds common
codyshoffner fa4e111
chore: fix test upgrade task
codyshoffner d24a6c0
chore: fix test upgrade task
codyshoffner d743dbb
chore: words
codyshoffner 7f6c7f9
chore: doc nits
codyshoffner b393c16
chore: more nit
codyshoffner 1b2eaed
chore: update pull policy
codyshoffner 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
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
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 |
|---|---|---|
| @@ -1,5 +1,69 @@ | ||
| # Configuration | ||
|
|
||
| Reference Package in this package is configured through [Reference Package UDS package](#UDS_PACKAGE_REPO#) as well as a UDS configuration chart that supports the following: | ||
| The Reference Package is configured using the [application's Helm chart](https://github.com/uds-packages/reference-package/tree/main/.github/container-and-chart/helm/chart), alongside the `uds-reference-package` UDS config chart. | ||
|
|
||
| ## Additional Configuration Info Follows | ||
| ## Bundle Overrides | ||
|
|
||
| Use bundle overrides in `bundle/uds-bundle.yaml` to configure the Database, SSO, and Monitoring. | ||
|
|
||
| ```yaml | ||
| overrides: | ||
| reference-package: | ||
| reference-package: | ||
| values: | ||
| - path: database | ||
| value: | ||
| secretName: "reference-package-postgres" | ||
| secretKey: "PASSWORD" | ||
| - path: sso | ||
| value: | ||
| enabled: true | ||
| secretName: reference-package-sso | ||
| - path: monitoring | ||
| value: | ||
| enabled: true | ||
|
|
||
| ``` | ||
|
|
||
| ## UDS Config Chart Values | ||
|
|
||
| ### PostgreSQL Database | ||
|
|
||
| The underlying Go application requires a database connection string provided via a Kubernetes secret. | ||
|
|
||
| If you are using the [uds-package-postgres-operator](https://github.com/uds-packages/postgres-operator) in your bundle, the `uds-reference-package-config` chart (located in `./chart`) will create the secret, via the below values: | ||
|
|
||
| ```yaml | ||
| postgres: | ||
| username: "reference" | ||
| # Note: Specifying password as anything other than "" will not use the existingSecret | ||
| password: "" | ||
| existingSecret: | ||
| name: "reference-package.reference-package.pg-cluster.credentials.postgresql.acid.zalan.do" | ||
| passwordKey: password | ||
| usernameKey: username | ||
| host: "pg-cluster.postgres.svc.cluster.local" | ||
| dbName: "reference" | ||
| # Example: "?connect_timeout=10&sslmode=disable" | ||
| connectionOptions: "?sslmode=disable" | ||
| # Set to false to use external postgres | ||
| internal: true | ||
| selector: | ||
| cluster-name: pg-cluster | ||
| namespace: postgres | ||
| port: 5432 | ||
| ``` | ||
|
|
||
| ### Single Sign-On | ||
|
|
||
| Setting `sso.enabled: true` in the UDS config chart overrides tells the package to generate an SSO secret. | ||
|
|
||
| This relies on the UDS Operator's built-in secret templating. You can read more about how this works in the [UDS SSO Templating Documentation](https://uds.defenseunicorns.com/reference/configuration/single-sign-on/sso-templating/). | ||
|
|
||
| ### Monitoring | ||
|
|
||
| Setting `monitoring.enabled: true` configures the package to expose metrics to Prometheus. More information can be found here: [Monitoring and Metrics](https://uds.defenseunicorns.com/reference/configuration/observability/monitoring-metrics/) | ||
|
|
||
| ## Package Custom Resources (CR) | ||
|
|
||
| For further information regarding the UDS Package Custom Resource (CR), defined in the `chart/templates/uds-package.yaml`, the full specification can be found in the [UDS Package CR Documentation](https://uds.defenseunicorns.com/reference/configuration/custom-resources/exemptions-v1alpha1-cr/). |
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,32 @@ | ||
| # Reference Package Web Application & Helm Chart | ||
|
|
||
| The underlying application for this UDS package is a lightweight Go web service. It features a simple user interface designed specifically to demonstrate reading and writing data to a Postgres database. | ||
|
|
||
| While the application code itself is relatively simple, its primary purpose is to demonstrate integration with various components within the UDS ecosystem. | ||
|
|
||
| ## Directory Structure & Architecture | ||
|
|
||
| You will find the application source code and deployment manifests in the following locations: | ||
|
|
||
| * **Go Application Source & Dockerfile:** `.github/container-and-chart/docker` | ||
| * **Helm Charts:** `.github/container-and-chart/helm` | ||
|
|
||
| > [!NOTE] | ||
| > In a standard development scenario, it may make more sense for the Go App and Helm Charts to live in a `src/` directory and is built at runtime. However, the application and its Helm charts are intentially decoupled into this structure. This allows the Docker container and Helm charts to be published independently of the UDS package. | ||
| > By doing this, engineers can pull and use our container and Helm chart for their own purposes. It also provides a realistic demonstration of how a UDS package pulls external artifacts via the `common/zarf.yaml` and `.zarf.yaml` files. | ||
|
|
||
| ## Update & Publishing Workflow | ||
|
|
||
| The UDS package relies on the published artifacts in GHCR. If you make changes to the Go application or the Helm chart, you must publish the new versions to GHCR before updating the UDS package. If you update the `zarf.yaml`, image tags in `<flavor>-values.yaml`, etc., before the new artifacts finish publishing, your local Zarf builds and CI pipelines will fail when trying to pull the non-existent versions. | ||
|
|
||
| Follow these steps when making changes to the Go application or chart: | ||
|
|
||
| 1. Update the Go source code or adjust the Helm chart templates as needed. | ||
| 2. If needed, bump the respective versions in `.github/container-and-chart/docker/version.txt` and `.github/container-and-chart/helm/Chart.yaml`. | ||
| 3. Commit and push your changes. This will trigger the `.github/workflows/release-container-and-charts.yaml` GitHub Action, which builds and publishes the new container image and Helm chart to GHCR. This workflow is set to only run on PRs to the following: | ||
| ```yaml | ||
| paths: | ||
| - ".github/container-and-chart/**" | ||
| - ".github/workflows/release-container-and-charts.yaml" | ||
| ``` | ||
| 4. Ensure the GitHub Action completes successfully and the new artifacts are visible in the repository's GHCR page. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.