2023-11-15 03:59:48 +00:00
|
|
|
# Copyright © 2023 Vulcanize
|
|
|
|
|
|
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
|
# it under the terms of the GNU Affero General Public License as published by
|
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
# (at your option) any later version.
|
|
|
|
|
|
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
# GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
|
|
|
# along with this program. If not, see <http:#www.gnu.org/licenses/>.
|
|
|
|
|
|
2023-12-06 05:56:58 +00:00
|
|
|
cluster_name_prefix = "laconic-"
|
2023-11-15 03:59:48 +00:00
|
|
|
stack_file_name = "stack.yml"
|
2023-11-29 04:14:02 +00:00
|
|
|
spec_file_name = "spec.yml"
|
|
|
|
|
config_file_name = "config.env"
|
2023-12-06 05:56:58 +00:00
|
|
|
deployment_file_name = "deployment.yml"
|
|
|
|
|
compose_dir_name = "compose"
|
2023-11-20 16:12:57 +00:00
|
|
|
compose_deploy_type = "compose"
|
|
|
|
|
k8s_kind_deploy_type = "k8s-kind"
|
|
|
|
|
k8s_deploy_type = "k8s"
|
2023-12-06 05:56:58 +00:00
|
|
|
cluster_id_key = "cluster-id"
|
feat(k8s): decouple deployment-id from cluster-id
cluster-id plays two roles today: (a) which kind cluster this
deployment attaches to (used for the kube-config context name) and
(b) compose_project_name -> app_name, the prefix for every k8s
resource the deployment creates. _get_existing_kind_cluster() in
deploy create forces (a) to inherit the running cluster's name, and
because (a) and (b) are the same field, (b) inherits too — so two
deployments that share a cluster also share an app_name and collide
on every resource whose suffix isn't naturally distinct (PVs are
cluster-scoped; same-stack deployments collide there in particular).
Decouple: add a distinct `deployment-id` field. cluster-id keeps its
current behavior (inherit running cluster, else fresh). deployment-id
is always fresh per `deploy create`. K8sDeployer sources
kind_cluster_name from cluster-id and app_name from deployment-id.
Backward compatibility:
- Existing deployment.yml files have only cluster-id; no on-disk
change until the next `deploy create`.
- DeploymentContext.init() falls back: deployment-id = cluster-id
when the field is absent. Existing deployments keep their current
app_name and resource names on next start — no PV renames, no
re-binds, no data orphaning.
- `compose_project_name` parameter to K8sDeployer is retained (still
used by the compose deployer path); only the k8s-side internals
switch to deployment_context getters.
- The helm chart generator continues to derive chart names from
cluster-id; untouched here, worth a follow-up for consistency.
Effect on woodburn: dumpster/rpc/trashscan each already carry a
distinct cluster-id in their deployment.yml (pre-`_get_existing_kind_cluster`
era). Under the fallback, they all adopt their existing cluster-id
as deployment-id, so resource names are identical to today.
Effect on new deployments: even when they share a running cluster
(kind-cluster-name in kube-config matches cluster-id), they get
distinct deployment-ids at deploy create, and thus distinct resource
name prefixes. The same-stack PV collision the namespace ownership
check surfaces goes away by construction.
Test: run-deploy-test.sh now reads deployment-id from the new field,
falling back to cluster-id for pre-decouple fixtures.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 05:27:11 +00:00
|
|
|
deployment_id_key = "deployment-id"
|
2023-11-20 16:12:57 +00:00
|
|
|
kube_config_key = "kube-config"
|
2023-11-21 03:23:55 +00:00
|
|
|
deploy_to_key = "deploy-to"
|
2023-11-21 23:04:36 +00:00
|
|
|
network_key = "network"
|
|
|
|
|
http_proxy_key = "http-proxy"
|
2024-02-14 21:45:01 +00:00
|
|
|
image_registry_key = "image-registry"
|
|
|
|
|
configmaps_key = "configmaps"
|
2026-03-11 03:56:21 +00:00
|
|
|
secrets_key = "secrets"
|
2024-02-14 21:45:01 +00:00
|
|
|
resources_key = "resources"
|
|
|
|
|
volumes_key = "volumes"
|
|
|
|
|
security_key = "security"
|
|
|
|
|
annotations_key = "annotations"
|
|
|
|
|
labels_key = "labels"
|
2024-08-09 02:32:06 +00:00
|
|
|
replicas_key = "replicas"
|
2024-08-15 20:32:58 +00:00
|
|
|
node_affinities_key = "node-affinities"
|
|
|
|
|
node_tolerations_key = "node-tolerations"
|
2023-11-20 16:12:57 +00:00
|
|
|
kind_config_filename = "kind-config.yml"
|
|
|
|
|
kube_config_filename = "kubeconfig.yml"
|
2026-01-22 01:20:19 +00:00
|
|
|
cri_base_filename = "cri-base.json"
|
|
|
|
|
unlimited_memlock_key = "unlimited-memlock"
|
2026-01-22 06:58:38 +00:00
|
|
|
runtime_class_key = "runtime-class"
|
|
|
|
|
high_memlock_runtime = "high-memlock"
|
|
|
|
|
high_memlock_spec_filename = "high-memlock-spec.json"
|
2026-02-03 00:13:10 +00:00
|
|
|
acme_email_key = "acme-email"
|
2026-03-20 21:28:40 +00:00
|
|
|
kind_mount_root_key = "kind-mount-root"
|
2026-03-21 15:25:47 +00:00
|
|
|
external_services_key = "external-services"
|
|
|
|
|
ca_certificates_key = "ca-certificates"
|