|
| 1 | +# Kustomize Manifests for Datum APIServer and Controller Manager |
| 2 | + |
| 3 | +## Overview |
| 4 | +This repository provides Kustomize manifests to deploy the Datum APIServer and Datum Controller Manager components. These manifests are structured for ease of use by the community and integration with FluxCD pipelines. |
| 5 | + |
| 6 | +## Repository Structure |
| 7 | +``` |
| 8 | +config |
| 9 | +├── api-server |
| 10 | +│ ├── deployment.yaml |
| 11 | +│ ├── httpproxy.yaml |
| 12 | +│ ├── kustomization.yaml |
| 13 | +│ ├── service.yaml |
| 14 | +├── controller-manager |
| 15 | +│ ├── deployment.yaml |
| 16 | +│ ├── kustomization.yaml |
| 17 | +docs |
| 18 | +``` |
| 19 | + |
| 20 | +### API Server |
| 21 | +The `api-server` folder contains the Kustomize manifests required to deploy the Datum APIServer, including: |
| 22 | +- **deployment.yaml**: Defines the Kubernetes Deployment for the API Server. |
| 23 | +- **httpproxy.yaml**: Configuration for HTTP routing (if applicable). |
| 24 | +- **kustomization.yaml**: Kustomize configuration for managing API Server resources. |
| 25 | +- **service.yaml**: Defines the Kubernetes Service for the API Server. |
| 26 | + |
| 27 | +### Controller Manager |
| 28 | +The `controller-manager` folder contains the Kustomize manifests required to deploy the Datum Controller Manager, including: |
| 29 | +- **deployment.yaml**: Defines the Kubernetes Deployment for the Controller Manager. |
| 30 | +- **kustomization.yaml**: Kustomize configuration for managing Controller Manager resources. |
| 31 | + |
| 32 | +## Pushing Manifests using Flux CLI |
| 33 | +We utilize `flux push artifact` to publish Kustomize manifests to an OCI repository. |
| 34 | + |
| 35 | +### Example Workflow |
| 36 | +To push the manifests to an OCI registry, use the following command: |
| 37 | +```sh |
| 38 | +flux push artifact oci://ghcr.io/your-org/datum-kustomize:latest \ |
| 39 | + --path=./config --source=your-repository-url |
| 40 | +``` |
| 41 | + |
| 42 | +## GitHub Actions Integration |
| 43 | +A GitHub Action is set up to automatically push these manifests upon changes. The workflow is defined as follows: |
| 44 | + |
| 45 | +```yaml |
| 46 | +name: Publish Kustomize Manifests |
| 47 | + |
| 48 | +on: |
| 49 | + push: |
| 50 | + branches: |
| 51 | + - main |
| 52 | + release: |
| 53 | + types: [published] |
| 54 | + |
| 55 | +jobs: |
| 56 | + push-kustomize: |
| 57 | + runs-on: ubuntu-latest |
| 58 | + steps: |
| 59 | + - name: Checkout Code |
| 60 | + uses: actions/checkout@v3 |
| 61 | + |
| 62 | + - name: Install Flux CLI |
| 63 | + run: | |
| 64 | + curl -s https://fluxcd.io/install.sh | sudo bash |
| 65 | + |
| 66 | + - name: Push Manifests |
| 67 | + run: | |
| 68 | + flux push artifact oci://ghcr.io/your-org/datum-kustomize:latest \ |
| 69 | + --path=./config --source=\$(git remote get-url origin) |
| 70 | +``` |
| 71 | +
|
| 72 | +This ensures that any updates to the `config` directory are automatically pushed to the OCI registry. |
| 73 | + |
| 74 | +This setup enables both community users and internal automation (e.g., FluxCD) to deploy the Datum APIServer and Controller Manager efficiently. |
| 75 | + |
0 commit comments