feat: plan -> base
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2024-05-25 14:21:11 +02:00
parent 545439923f
commit 1aa8562509
Signed by: kjuulh
GPG Key ID: 9AA7BC13CE474394
4 changed files with 2 additions and 54 deletions

View File

@ -84,7 +84,7 @@ pub struct CuddleVars {
pub variables: CuddleVariables,
}
const PARENT_PLAN_PREFIX: &str = ".cuddle/plan";
const PARENT_PLAN_PREFIX: &str = ".cuddle/base";
const CUDDLE_FILE: &str = "cuddle.yaml";
impl CuddleVars {

View File

@ -34,7 +34,7 @@ impl Default for ProcessOpts {
}
const TEMPLATES_PATH_PREFIX: &str = "templates/clusters";
const CUDDLE_PLAN_PATH_PREFIX: &str = ".cuddle/plan";
const CUDDLE_PLAN_PATH_PREFIX: &str = ".cuddle/base";
pub async fn process_opts(
components: impl IntoIterator<Item = impl IntoComponent>,

View File

@ -1,11 +0,0 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ vars.cuddle_vars.service }}-config
data:
{%- if (vars.cluster_vars.env | items | length) > 0 %}
environment:
{%- for (name, value) in vars.cluster_vars.env | dictsort %}
{{name | upper | replace(".", "_") | replace("-", "_") }}: {{value}}
{%- endfor %}
{%- endif %}

View File

@ -1,41 +0,0 @@
{%- set service_name = vars.cuddle_vars.service -%}
{%- set cluster_name = vars.cluster_vars.name -%}
{%- set cluster_namespace = vars.cluster_vars.namespace -%}
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: {{ service_name }}
cluster: {{ cluster_name }}
name: {{ service_name }}
namespace: {{ cluster_namespace }}
spec:
replicas: 3
selector:
matchLabels:
app: {{ service_name }}
cluster: {{ cluster_name }}
template:
metadata:
labels:
app: {{ service_name }}
cluster: {{ cluster_name }}
spec:
containers:
- args:
- serve
command:
- {{ service_name }}
image: kasperhermansen/{{ service_name }}:main-1715336504
name: {{ service_name }}
envFrom:
- configMapRef:
name: {{service_name}}-config
ports:
- containerPort: 3000
name: external-http
- containerPort: 3001
name: internal-http
- containerPort: 3002
name: internal-grpc