|
| 1 | +# deployment-tracker Helm Chart |
| 2 | + |
| 3 | +A Helm chart for deploying the deployment-tracker Kubernetes controller, which |
| 4 | +monitors pod lifecycles and uploads deployment records to GitHub's artifact |
| 5 | +metadata API. |
| 6 | + |
| 7 | +## Prerequisites |
| 8 | + |
| 9 | +- Kubernetes 1.19+ |
| 10 | +- Helm 3.8+ |
| 11 | +- A GitHub organization with |
| 12 | + [Artifact Attestations](https://docs.github.com/en/actions/concepts/security/artifact-attestations) |
| 13 | + enabled |
| 14 | +- An API token or GitHub App for authentication |
| 15 | + |
| 16 | +## Installation |
| 17 | + |
| 18 | +### Install from OCI registry |
| 19 | + |
| 20 | +```bash |
| 21 | +helm install deployment-tracker \ |
| 22 | + oci://ghcr.io/github/charts/deployment-tracker \ |
| 23 | + --namespace deployment-tracker \ |
| 24 | + --create-namespace \ |
| 25 | + --set config.org=my-org \ |
| 26 | + --set config.logicalEnvironment=production \ |
| 27 | + --set config.cluster=my-cluster \ |
| 28 | + --set auth.apiTokenSecret=my-api-token-secret |
| 29 | +``` |
| 30 | + |
| 31 | +### Install from local source |
| 32 | + |
| 33 | +```bash |
| 34 | +helm install deployment-tracker ./deploy/charts/deployment-tracker \ |
| 35 | + --namespace deployment-tracker \ |
| 36 | + --create-namespace \ |
| 37 | + -f my-values.yaml |
| 38 | +``` |
| 39 | + |
| 40 | +## Required Values |
| 41 | + |
| 42 | +The following values **must** be set for the controller to function: |
| 43 | + |
| 44 | +| Value | Description | |
| 45 | +|-------|-------------| |
| 46 | +| `config.org` | GitHub organization name | |
| 47 | +| `config.logicalEnvironment` | Logical environment name (e.g., `production`, `staging`) | |
| 48 | +| `config.cluster` | Kubernetes cluster name | |
| 49 | + |
| 50 | +At least one authentication method must be configured (see |
| 51 | +[Authentication](#authentication)). |
| 52 | + |
| 53 | +## Configuration |
| 54 | + |
| 55 | +### Controller Configuration |
| 56 | + |
| 57 | +| Parameter | Description | Default | |
| 58 | +|-----------|-------------|---------| |
| 59 | +| `config.org` | GitHub organization name | `""` (required) | |
| 60 | +| `config.logicalEnvironment` | Logical environment name | `""` (required) | |
| 61 | +| `config.cluster` | Cluster name | `""` (required) | |
| 62 | +| `config.physicalEnvironment` | Physical environment name | `""` | |
| 63 | +| `config.baseUrl` | API base URL | `api.github.com` | |
| 64 | +| `config.dnTemplate` | Deployment name template | `{{namespace}}/{{deploymentName}}/{{containerName}}` | |
| 65 | +| `config.namespace` | Namespace to monitor (empty for all) | `""` | |
| 66 | +| `config.excludeNamespaces` | Namespaces to exclude (comma-separated) | `""` | |
| 67 | +| `config.workers` | Number of worker goroutines | `2` | |
| 68 | +| `config.metricsPort` | Port for Prometheus metrics | `9090` | |
| 69 | + |
| 70 | +### Image Configuration |
| 71 | + |
| 72 | +| Parameter | Description | Default | |
| 73 | +|-----------|-------------|---------| |
| 74 | +| `image.repository` | Container image repository | `ghcr.io/github/deployment-tracker` | |
| 75 | +| `image.tag` | Container image tag | Chart `appVersion` | |
| 76 | +| `image.pullPolicy` | Image pull policy | `IfNotPresent` | |
| 77 | +| `imagePullSecrets` | Image pull secrets | `[]` | |
| 78 | + |
| 79 | +### Authentication |
| 80 | + |
| 81 | +The controller supports two authentication methods: API token and GitHub App. |
| 82 | + |
| 83 | +#### API Token |
| 84 | + |
| 85 | +```yaml |
| 86 | +# Option 1: Inline token (not recommended for production) |
| 87 | +auth: |
| 88 | + apiToken: "ghp_xxxxxxxxxxxx" |
| 89 | + |
| 90 | +# Option 2: Reference to an existing Secret (recommended) |
| 91 | +auth: |
| 92 | + apiTokenSecret: "my-api-token-secret" |
| 93 | +``` |
| 94 | +
|
| 95 | +When using `apiTokenSecret`, the Secret must have a key named `token`: |
| 96 | + |
| 97 | +```yaml |
| 98 | +apiVersion: v1 |
| 99 | +kind: Secret |
| 100 | +metadata: |
| 101 | + name: my-api-token-secret |
| 102 | +type: Opaque |
| 103 | +stringData: |
| 104 | + token: "ghp_xxxxxxxxxxxx" |
| 105 | +``` |
| 106 | + |
| 107 | +#### GitHub App |
| 108 | + |
| 109 | +```yaml |
| 110 | +# Option 1: Inline private key |
| 111 | +auth: |
| 112 | + githubApp: |
| 113 | + appId: "12345" |
| 114 | + installId: "67890" |
| 115 | + privateKey: "<base64-encoded-private-key>" |
| 116 | +
|
| 117 | +# Option 2: Reference to an existing Secret (recommended) |
| 118 | +auth: |
| 119 | + githubApp: |
| 120 | + appId: "12345" |
| 121 | + installId: "67890" |
| 122 | + privateKeySecret: "my-github-app-secret" |
| 123 | +``` |
| 124 | + |
| 125 | +When using `privateKeySecret`, the Secret must have a key named `private-key`: |
| 126 | + |
| 127 | +```yaml |
| 128 | +apiVersion: v1 |
| 129 | +kind: Secret |
| 130 | +metadata: |
| 131 | + name: my-github-app-secret |
| 132 | +type: Opaque |
| 133 | +stringData: |
| 134 | + private-key: "<base64-encoded-private-key>" |
| 135 | +``` |
| 136 | + |
| 137 | +### Resources and Security |
| 138 | + |
| 139 | +| Parameter | Description | Default | |
| 140 | +|-----------|-------------|---------| |
| 141 | +| `replicaCount` | Number of controller replicas | `1` | |
| 142 | +| `resources.requests.cpu` | CPU request | `100m` | |
| 143 | +| `resources.requests.memory` | Memory request | `1024Mi` | |
| 144 | +| `resources.limits.cpu` | CPU limit | `200m` | |
| 145 | +| `resources.limits.memory` | Memory limit | `2048Mi` | |
| 146 | +| `securityContext` | Container security context | Hardened (see values.yaml) | |
| 147 | +| `readinessProbe` | Readiness probe configuration | HTTP GET /metrics:9090 | |
| 148 | +| `lifecycle` | Lifecycle hooks | preStop sleep 5s | |
| 149 | + |
| 150 | +### Service and Networking |
| 151 | + |
| 152 | +| Parameter | Description | Default | |
| 153 | +|-----------|-------------|---------| |
| 154 | +| `service.enabled` | Create a Service for metrics | `true` | |
| 155 | +| `service.type` | Service type | `ClusterIP` | |
| 156 | +| `service.port` | Service port | `9090` | |
| 157 | +| `nodeSelector` | Node selector | `{}` | |
| 158 | +| `tolerations` | Tolerations | `[]` | |
| 159 | +| `affinity` | Affinity rules | `{}` | |
| 160 | + |
| 161 | +### Service Account |
| 162 | + |
| 163 | +| Parameter | Description | Default | |
| 164 | +|-----------|-------------|---------| |
| 165 | +| `serviceAccount.create` | Create a ServiceAccount | `true` | |
| 166 | +| `serviceAccount.name` | ServiceAccount name | Generated from fullname | |
| 167 | +| `serviceAccount.annotations` | ServiceAccount annotations | `{}` | |
| 168 | + |
| 169 | +## Uninstalling |
| 170 | + |
| 171 | +```bash |
| 172 | +helm uninstall deployment-tracker -n deployment-tracker |
| 173 | +``` |
0 commit comments