refactor: rename template helpers from antigravity to devcontainer
Rename all Helm template helper functions from antigravity.* to devcontainer.* to match the actual chart name. Also update Chart.yaml description to remove "Antigravity" branding. Renamed helpers: - antigravity.fullname → devcontainer.fullname - antigravity.pvcName → devcontainer.pvcName - antigravity.envSecretName → devcontainer.envSecretName - antigravity.labels → devcontainer.labels - antigravity.smartResources → devcontainer.smartResources - antigravity.smartDefaults → devcontainer.smartDefaults - antigravity.mcpDefaults → devcontainer.mcpDefaults Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
apiVersion: v2
|
apiVersion: v2
|
||||||
name: devcontainer
|
name: devcontainer
|
||||||
description: Antigravity Dev Container with Happy Coder AI assistant
|
description: Dev Container with AI coding agents and MCP sidecars
|
||||||
type: application
|
type: application
|
||||||
version: 0.3.3
|
version: 0.3.3
|
||||||
appVersion: "latest"
|
appVersion: "latest"
|
||||||
|
|||||||
@@ -1,28 +1,28 @@
|
|||||||
{{/*
|
{{/*
|
||||||
Resource name prefix: devcontainer-{name}
|
Resource name prefix: devcontainer-{name}
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "antigravity.fullname" -}}
|
{{- define "devcontainer.fullname" -}}
|
||||||
{{- printf "devcontainer-%s" .Values.name }}
|
{{- printf "devcontainer-%s" .Values.name }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
PVC name: userhome-{name}
|
PVC name: userhome-{name}
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "antigravity.pvcName" -}}
|
{{- define "devcontainer.pvcName" -}}
|
||||||
{{- printf "userhome-%s" .Values.name }}
|
{{- printf "userhome-%s" .Values.name }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Secret name for env vars, default to devcontainer-{name}-secrets-env
|
Secret name for env vars, default to devcontainer-{name}-secrets-env
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "antigravity.envSecretName" -}}
|
{{- define "devcontainer.envSecretName" -}}
|
||||||
{{- .Values.envSecretName | default (printf "devcontainer-%s-secrets-env" .Values.name) }}
|
{{- .Values.envSecretName | default (printf "devcontainer-%s-secrets-env" .Values.name) }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{/*
|
{{/*
|
||||||
Common labels
|
Common labels
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "antigravity.labels" -}}
|
{{- define "devcontainer.labels" -}}
|
||||||
app: devcontainer
|
app: devcontainer
|
||||||
instance: {{ .Values.name }}
|
instance: {{ .Values.name }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -30,7 +30,7 @@ instance: {{ .Values.name }}
|
|||||||
{{/*
|
{{/*
|
||||||
Smart resource sizing based on enabled features
|
Smart resource sizing based on enabled features
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "antigravity.smartResources" -}}
|
{{- define "devcontainer.smartResources" -}}
|
||||||
{{- $baseMemory := "2Gi" }}
|
{{- $baseMemory := "2Gi" }}
|
||||||
{{- $baseCpu := "1000m" }}
|
{{- $baseCpu := "1000m" }}
|
||||||
{{- $limitMemory := "8Gi" }}
|
{{- $limitMemory := "8Gi" }}
|
||||||
@@ -59,7 +59,7 @@ limits:
|
|||||||
{{/*
|
{{/*
|
||||||
Auto-detect environment type and set smart defaults
|
Auto-detect environment type and set smart defaults
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "antigravity.smartDefaults" -}}
|
{{- define "devcontainer.smartDefaults" -}}
|
||||||
{{- $isDev := or (contains "dev" .Values.name) (contains "test" .Values.name) (contains "local" .Values.name) }}
|
{{- $isDev := or (contains "dev" .Values.name) (contains "test" .Values.name) (contains "local" .Values.name) }}
|
||||||
{{- $isProd := or (contains "prod" .Values.name) (contains "production" .Values.name) }}
|
{{- $isProd := or (contains "prod" .Values.name) (contains "production" .Values.name) }}
|
||||||
{{- $isTeam := or (contains "team" .Values.name) (contains "shared" .Values.name) }}
|
{{- $isTeam := or (contains "team" .Values.name) (contains "shared" .Values.name) }}
|
||||||
@@ -79,7 +79,7 @@ team: true
|
|||||||
{{/*
|
{{/*
|
||||||
Smart MCP sidecar selection based on cluster access
|
Smart MCP sidecar selection based on cluster access
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "antigravity.mcpDefaults" -}}
|
{{- define "devcontainer.mcpDefaults" -}}
|
||||||
{{- if eq .Values.clusterAccess "none" }}
|
{{- if eq .Values.clusterAccess "none" }}
|
||||||
{{/* No cluster access - disable k8s/flux sidecars */}}
|
{{/* No cluster access - disable k8s/flux sidecars */}}
|
||||||
kubernetes:
|
kubernetes:
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "antigravity.fullname" . }}
|
name: {{ include "devcontainer.fullname" . }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "antigravity.labels" . | nindent 4 }}
|
{{- include "devcontainer.labels" . | nindent 4 }}
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
{{- include "antigravity.labels" . | nindent 6 }}
|
{{- include "devcontainer.labels" . | nindent 6 }}
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
{{- include "antigravity.labels" . | nindent 8 }}
|
{{- include "devcontainer.labels" . | nindent 8 }}
|
||||||
spec:
|
spec:
|
||||||
{{- if ne (.Values.clusterAccess | default "none") "none" }}
|
{{- if ne (.Values.clusterAccess | default "none") "none" }}
|
||||||
serviceAccountName: {{ include "antigravity.fullname" . }}
|
serviceAccountName: {{ include "devcontainer.fullname" . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
securityContext:
|
securityContext:
|
||||||
fsGroup: 1000
|
fsGroup: 1000
|
||||||
@@ -81,7 +81,7 @@ spec:
|
|||||||
value: {{ .Values.githubRepo | quote }}
|
value: {{ .Values.githubRepo | quote }}
|
||||||
envFrom:
|
envFrom:
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: {{ include "antigravity.envSecretName" . }}
|
name: {{ include "devcontainer.envSecretName" . }}
|
||||||
optional: true
|
optional: true
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml .Values.resources | nindent 12 }}
|
{{- toYaml .Values.resources | nindent 12 }}
|
||||||
@@ -178,13 +178,13 @@ spec:
|
|||||||
- name: HOMEASSISTANT_URL
|
- name: HOMEASSISTANT_URL
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ include "antigravity.envSecretName" . }}
|
name: {{ include "devcontainer.envSecretName" . }}
|
||||||
key: HOMEASSISTANT_URL
|
key: HOMEASSISTANT_URL
|
||||||
optional: true
|
optional: true
|
||||||
- name: HOMEASSISTANT_TOKEN
|
- name: HOMEASSISTANT_TOKEN
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ include "antigravity.envSecretName" . }}
|
name: {{ include "devcontainer.envSecretName" . }}
|
||||||
key: HOMEASSISTANT_TOKEN
|
key: HOMEASSISTANT_TOKEN
|
||||||
optional: true
|
optional: true
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
@@ -212,13 +212,13 @@ spec:
|
|||||||
- name: DATABASE_URI
|
- name: DATABASE_URI
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ include "antigravity.envSecretName" . }}
|
name: {{ include "devcontainer.envSecretName" . }}
|
||||||
key: DATABASE_URI
|
key: DATABASE_URI
|
||||||
optional: true
|
optional: true
|
||||||
- name: PGTUNER_EXCLUDE_USERIDS
|
- name: PGTUNER_EXCLUDE_USERIDS
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{ include "antigravity.envSecretName" . }}
|
name: {{ include "devcontainer.envSecretName" . }}
|
||||||
key: PGTUNER_EXCLUDE_USERIDS
|
key: PGTUNER_EXCLUDE_USERIDS
|
||||||
optional: true
|
optional: true
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
@@ -271,4 +271,4 @@ spec:
|
|||||||
sizeLimit: {{ .Values.shm.sizeLimit }}
|
sizeLimit: {{ .Values.shm.sizeLimit }}
|
||||||
- name: userhome
|
- name: userhome
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: {{ include "antigravity.pvcName" . }}
|
claimName: {{ include "devcontainer.pvcName" . }}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "antigravity.pvcName" . }}
|
name: {{ include "devcontainer.pvcName" . }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "antigravity.labels" . | nindent 4 }}
|
{{- include "devcontainer.labels" . | nindent 4 }}
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteMany
|
- ReadWriteMany
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{{- $access := .Values.clusterAccess | default "none" }}
|
{{- $access := .Values.clusterAccess | default "none" }}
|
||||||
{{- $name := include "antigravity.fullname" . }}
|
{{- $name := include "devcontainer.fullname" . }}
|
||||||
{{- $ns := .Release.Namespace }}
|
{{- $ns := .Release.Namespace }}
|
||||||
{{- $labels := include "antigravity.labels" . }}
|
{{- $labels := include "devcontainer.labels" . }}
|
||||||
|
|
||||||
{{- if ne $access "none" }}
|
{{- if ne $access "none" }}
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "antigravity.fullname" . }}
|
name: {{ include "devcontainer.fullname" . }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "antigravity.labels" . | nindent 4 }}
|
{{- include "devcontainer.labels" . | nindent 4 }}
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
{{- if ne (.Values.ide.type | default "vscode") "none" }}
|
{{- if ne (.Values.ide.type | default "vscode") "none" }}
|
||||||
@@ -19,4 +19,4 @@ spec:
|
|||||||
targetPort: ssh
|
targetPort: ssh
|
||||||
{{- end }}
|
{{- end }}
|
||||||
selector:
|
selector:
|
||||||
{{- include "antigravity.labels" . | nindent 4 }}
|
{{- include "devcontainer.labels" . | nindent 4 }}
|
||||||
|
|||||||
Reference in New Issue
Block a user