Merge pull request #6534 from dokku/ingress-class-setting
Allow specifying an ingress class via chart value
This commit is contained in:
5 files changed
+15
-7
No files matched your search
@@ -36,7 +36,7 @@ type GlobalValues struct {
|
|||||||
DeploymentID string `yaml:"deploment_id"`
|
DeploymentID string `yaml:"deploment_id"`
|
||||||
Image GlobalImage `yaml:"image"`
|
Image GlobalImage `yaml:"image"`
|
||||||
Namespace string `yaml:"namespace"`
|
Namespace string `yaml:"namespace"`
|
||||||
PrimaryPort int32 `yaml:"primary_port"`
|
Network GlobalNetwork `yaml:"network"`
|
||||||
Secrets map[string]string `yaml:"secrets,omitempty"`
|
Secrets map[string]string `yaml:"secrets,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,6 +47,11 @@ type GlobalImage struct {
|
|||||||
WorkingDir string `yaml:"working_dir"`
|
WorkingDir string `yaml:"working_dir"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type GlobalNetwork struct {
|
||||||
|
IngressClass string `yaml:"ingress_class"`
|
||||||
|
PrimaryPort int32 `yaml:"primary_port"`
|
||||||
|
}
|
||||||
|
|
||||||
type ProcessValues struct {
|
type ProcessValues struct {
|
||||||
Args []string `yaml:"args,omitempty"`
|
Args []string `yaml:"args,omitempty"`
|
||||||
Cron ProcessCron `yaml:"cron,omitempty"`
|
Cron ProcessCron `yaml:"cron,omitempty"`
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ spec:
|
|||||||
{{- if eq $processName "web" }}
|
{{- if eq $processName "web" }}
|
||||||
env:
|
env:
|
||||||
- name: PORT
|
- name: PORT
|
||||||
value: "{{ $.Values.global.primary_port }}"
|
value: "{{ $.Values.global.network.primary_port }}"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
envFrom:
|
envFrom:
|
||||||
- secretRef:
|
- secretRef:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{{- $processName := "PROCESS_NAME" }}
|
{{- $processName := "PROCESS_NAME" }}
|
||||||
{{- $config := .Values.processes.PROCESS_NAME }}
|
{{- $config := .Values.processes.PROCESS_NAME }}
|
||||||
{{- if $config.web.domains }}
|
{{- if and $config.web.domains (eq $.Values.global.network.ingress_class "traefik") }}
|
||||||
---
|
---
|
||||||
apiVersion: traefik.io/v1alpha1
|
apiVersion: traefik.io/v1alpha1
|
||||||
kind: Middleware
|
kind: Middleware
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{{- $processName := "PROCESS_NAME" }}
|
{{- $processName := "PROCESS_NAME" }}
|
||||||
{{- $config := .Values.processes.PROCESS_NAME }}
|
{{- $config := .Values.processes.PROCESS_NAME }}
|
||||||
{{- if $config.web.domains }}
|
{{- if and $config.web.domains (eq $.Values.global.network.ingress_class "traefik") }}
|
||||||
{{- range $pdx, $port_map := $config.web.port_maps }}
|
{{- range $pdx, $port_map := $config.web.port_maps }}
|
||||||
---
|
---
|
||||||
apiVersion: traefik.io/v1alpha1
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
|||||||
@@ -339,9 +339,12 @@ func TriggerSchedulerDeploy(scheduler string, appName string, imageTag string) e
|
|||||||
Type: imageSourceType,
|
Type: imageSourceType,
|
||||||
WorkingDir: workingDir,
|
WorkingDir: workingDir,
|
||||||
},
|
},
|
||||||
Namespace: namespace,
|
Namespace: namespace,
|
||||||
PrimaryPort: primaryPort,
|
Network: GlobalNetwork{
|
||||||
Secrets: map[string]string{},
|
IngressClass: "traefik",
|
||||||
|
PrimaryPort: primaryPort,
|
||||||
|
},
|
||||||
|
Secrets: map[string]string{},
|
||||||
},
|
},
|
||||||
Processes: map[string]ProcessValues{},
|
Processes: map[string]ProcessValues{},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user