feat: working helm template
This commit is contained in:
@@ -16,11 +16,26 @@ func TestCompile(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
client, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr))
|
||||
assert.NoError(t, err)
|
||||
t.Cleanup(func() {
|
||||
_ = os.RemoveAll("test_data/dist")
|
||||
})
|
||||
|
||||
t.Run("can generate nginx helm chart", func(t *testing.T) {
|
||||
|
||||
_ = os.RemoveAll("test_data/dist/nginx")
|
||||
|
||||
ctx := context.Background()
|
||||
|
||||
_, err := daggerhelm.Compile(ctx, client, "test_data/nginx", "test_data/nginx.values.yaml")
|
||||
helmoutput, err := daggerhelm.Compile(ctx, client, "test_data/nginx", "test_data/nginx.values.yaml")
|
||||
|
||||
exported, err := helmoutput.Export(ctx, "test_data/dist")
|
||||
assert.NoError(t, err)
|
||||
assert.True(t, exported)
|
||||
|
||||
dir, err := os.ReadDir("test_data/dist/nginx/templates")
|
||||
|
||||
assert.NoError(t, err)
|
||||
|
||||
assert.Equal(t, 2, len(dir))
|
||||
})
|
||||
}
|
||||
|
@@ -13,7 +13,6 @@ global:
|
||||
## - myRegistryKeySecretName
|
||||
##
|
||||
imagePullSecrets: []
|
||||
|
||||
## @section Common parameters
|
||||
|
||||
## @param nameOverride String to partially override nginx.fullname template (will maintain the release name)
|
||||
@@ -40,7 +39,6 @@ commonLabels: {}
|
||||
## @param commonAnnotations Add annotations to all the deployed resources
|
||||
##
|
||||
commonAnnotations: {}
|
||||
|
||||
## Enable diagnostic mode in the deployment(s)/statefulset(s)
|
||||
##
|
||||
diagnosticMode:
|
||||
@@ -55,7 +53,6 @@ diagnosticMode:
|
||||
##
|
||||
args:
|
||||
- infinity
|
||||
|
||||
## @section NGINX parameters
|
||||
|
||||
## Bitnami NGINX image version
|
||||
@@ -112,7 +109,6 @@ extraEnvVarsCM: ""
|
||||
## @param extraEnvVarsSecret Secret with extra environment variables
|
||||
##
|
||||
extraEnvVarsSecret: ""
|
||||
|
||||
## @section NGINX deployment parameters
|
||||
|
||||
## @param replicaCount Number of NGINX replicas to deploy
|
||||
@@ -255,7 +251,6 @@ resources:
|
||||
## cpu: 100m
|
||||
## memory: 128Mi
|
||||
requests: {}
|
||||
|
||||
## NGINX containers' lifecycleHooks
|
||||
## ref: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/
|
||||
@@ -263,15 +258,15 @@ resources:
|
||||
## lines, adjust them as necessary, and remove the curly braces on 'lifecycle:{}'.
|
||||
## @param lifecycleHooks Optional lifecycleHooks for the NGINX container
|
||||
lifecycleHooks: {}
|
||||
## Example:
|
||||
## postStart:
|
||||
## exec:
|
||||
## command: ["/bin/sh", "-c", "echo Hello from the postStart handler > /usr/share/message"]
|
||||
## Example:
|
||||
## preStop:
|
||||
## exec:
|
||||
## command: ["/bin/sleep", "20"]
|
||||
## command: ["/bin/sh","-c","nginx -s quit; while killall -0 nginx; do sleep 1; done"]
|
||||
## Example:
|
||||
## postStart:
|
||||
## exec:
|
||||
## command: ["/bin/sh", "-c", "echo Hello from the postStart handler > /usr/share/message"]
|
||||
## Example:
|
||||
## preStop:
|
||||
## exec:
|
||||
## command: ["/bin/sleep", "20"]
|
||||
## command: ["/bin/sh","-c","nginx -s quit; while killall -0 nginx; do sleep 1; done"]
|
||||
|
||||
## NGINX containers' startup probe.
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
|
||||
@@ -377,12 +372,10 @@ serviceAccount:
|
||||
## containerPort: 1234
|
||||
##
|
||||
sidecars: []
|
||||
|
||||
## @param sidecarSingleProcessNamespace Enable sharing the process namespace with sidecars
|
||||
## This will switch pod.spec.shareProcessNamespace parameter
|
||||
##
|
||||
sidecarSingleProcessNamespace: false
|
||||
|
||||
## @param initContainers Extra init containers
|
||||
##
|
||||
initContainers: []
|
||||
@@ -399,7 +392,6 @@ pdb:
|
||||
## @param pdb.maxUnavailable Max number of pods that can be unavailable after the eviction
|
||||
##
|
||||
maxUnavailable: 0
|
||||
|
||||
## @section Custom NGINX application parameters
|
||||
|
||||
## Get the server static content from a git repository
|
||||
@@ -506,7 +498,6 @@ staticSiteConfigmap: ""
|
||||
## NOTE: This will override staticSiteConfigmap
|
||||
##
|
||||
staticSitePVC: ""
|
||||
|
||||
## @section Traffic Exposure parameters
|
||||
|
||||
## NGINX Service properties
|
||||
@@ -749,7 +740,6 @@ healthIngress:
|
||||
## Useful when looking for additional customization, such as using different backend
|
||||
##
|
||||
extraRules: []
|
||||
|
||||
## @section Metrics parameters
|
||||
|
||||
## Prometheus Exporter / Metrics
|
||||
|
Reference in New Issue
Block a user