Changed requiredSecrets to defaultSecrets
This commit is contained in:
@@ -43,7 +43,7 @@ defaultConfig:
|
||||
storage: 10Gi
|
||||
dbHostname: postgres.postgres.svc.cluster.local
|
||||
dbUsername: myapp
|
||||
requiredSecrets:
|
||||
defaultSecrets:
|
||||
- apps.myapp.dbPassword
|
||||
- apps.postgres.password
|
||||
```
|
||||
@@ -55,7 +55,7 @@ requiredSecrets:
|
||||
- `icon` - A URL to an icon representing the app
|
||||
- `requires` - A list of other apps that this app depends on (each entry should be the name of another app)
|
||||
- `defaultConfig` - A set of default configuration values for the app (when an app is added using `wild-app-add`, these values will be added to the Wild Cloud `config.yaml` file)
|
||||
- `requiredSecrets` - A list of secrets that must be set in the Wild Cloud `secrets.yaml` file for the app to function properly (these secrets are typically sensitive information like database passwords or API keys; keys with random values will be generated automatically when the app is added)
|
||||
- `defaultSecrets` - A list of secrets that must be set in the Wild Cloud `secrets.yaml` file for the app to function properly (these secrets are typically sensitive information like database passwords or API keys; keys with random values will be generated automatically when the app is added)
|
||||
|
||||
### Kustomization Configuration
|
||||
|
||||
@@ -354,7 +354,7 @@ spec:
|
||||
|
||||
```yaml
|
||||
# In manifest.yaml
|
||||
requiredSecrets:
|
||||
defaultSecrets:
|
||||
- apps.myapp.dbUrl
|
||||
|
||||
# Generated secret (by wild-app-add)
|
||||
@@ -509,7 +509,7 @@ Wild Cloud includes apps for common self-hosted services:
|
||||
|
||||
**Manifest Design**:
|
||||
- Include comprehensive `defaultConfig` for all configurable values
|
||||
- List all `requiredSecrets` the app needs
|
||||
- List all `defaultSecrets` the app needs
|
||||
- Specify dependencies in `requires` field
|
||||
- Use semantic versioning
|
||||
|
||||
|
||||
@@ -247,7 +247,7 @@ wild-secret-set apps.database '{"user":"admin","password":"secret"}'
|
||||
|
||||
When you run `wild-app-add`, Wild Cloud automatically generates required secrets:
|
||||
|
||||
1. **Reads App Manifest**: Identifies `requiredSecrets` list
|
||||
1. **Reads App Manifest**: Identifies `defaultSecrets` list
|
||||
2. **Checks Existing Secrets**: Never overwrites existing values
|
||||
3. **Generates Missing Secrets**: Creates secure random values
|
||||
4. **Updates secrets.yaml**: Adds new secrets with proper structure
|
||||
@@ -255,7 +255,7 @@ When you run `wild-app-add`, Wild Cloud automatically generates required secrets
|
||||
**Example App Manifest**:
|
||||
```yaml
|
||||
name: ghost
|
||||
requiredSecrets:
|
||||
defaultSecrets:
|
||||
- apps.ghost.dbPassword # Auto-generated if missing
|
||||
- apps.ghost.jwtSecret # Auto-generated if missing
|
||||
- apps.postgresql.password # Auto-generated if missing (dependency)
|
||||
|
||||
@@ -34,7 +34,7 @@ defaultConfig:
|
||||
dbHostname: postgres.postgres.svc.cluster.local
|
||||
dbUsername: immich
|
||||
domain: immich.{{ .cloud.domain }}
|
||||
requiredSecrets:
|
||||
defaultSecrets:
|
||||
- apps.immich.dbPassword
|
||||
- apps.postgres.password
|
||||
```
|
||||
@@ -47,7 +47,7 @@ Explanation of the fields:
|
||||
- `icon`: A URL to an icon representing the app.
|
||||
- `requires`: A list of other apps that this app depends on. Each entry should be the name of another app.
|
||||
- `defaultConfig`: A set of default configuration values for the app. When an app is added using `wild-app-add`, these values will be added to the Wild Cloud `config.yaml` file.
|
||||
- `requiredSecrets`: A list of secrets that must be set in the Wild Cloud `secrets.yaml` file for the app to function properly. These secrets are typically sensitive information like database passwords or API keys. Keys with random values will be generated automatically when the app is added.
|
||||
- `defaultSecrets`: A list of secrets that must be set in the Wild Cloud `secrets.yaml` file for the app to function properly. These secrets are typically sensitive information like database passwords or API keys. Keys with random values will be generated automatically when the app is added.
|
||||
|
||||
### Kustomization
|
||||
|
||||
@@ -168,7 +168,7 @@ Examples of apps with db-init jobs: `gitea`, `codimd`, `immich`, `openproject`
|
||||
key: apps.appname.dbUrl
|
||||
```
|
||||
|
||||
Add `apps.appname.dbUrl` to the manifest's `requiredSecrets` and the `wild-app-add` script will generate the complete URL with embedded credentials.
|
||||
Add `apps.appname.dbUrl` to the manifest's `defaultSecrets` and the `wild-app-add` script will generate the complete URL with embedded credentials.
|
||||
|
||||
##### Security Context Requirements
|
||||
|
||||
@@ -198,7 +198,7 @@ For PostgreSQL init jobs, use `runAsUser: 999` (postgres user). For other databa
|
||||
|
||||
#### Secrets
|
||||
|
||||
Secrets are managed in the `secrets.yaml` file in the Wild Cloud home directory. The app's `manifest.yaml` should list any required secrets under `requiredSecrets`. When the app is added, default secret values will be generated and stored in the `secrets.yaml` file. Secrets are always stored and referenced in the `apps.<app-name>.<secret-name>` yaml path. When `wild-app-deploy` is run, a Secret resource will be created in the Kubernetes cluster with the name `<app-name>-secrets`, containing all secrets defined in the manifest's `requiredSecrets` key. These secrets can then be referenced in the app's Kustomize files using a `secretKeyRef`.
|
||||
Secrets are managed in the `secrets.yaml` file in the Wild Cloud home directory. The app's `manifest.yaml` should list any required secrets under `defaultSecrets`. When the app is added, default secret values will be generated and stored in the `secrets.yaml` file. Secrets are always stored and referenced in the `apps.<app-name>.<secret-name>` yaml path. When `wild-app-deploy` is run, a Secret resource will be created in the Kubernetes cluster with the name `<app-name>-secrets`, containing all secrets defined in the manifest's `defaultSecrets` key. These secrets can then be referenced in the app's Kustomize files using a `secretKeyRef`.
|
||||
|
||||
**Important:** Always use the full dotted path from the manifest as the secret key, not just the last segment. For example, to mount a secret in an environment variable, you would use:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user