File tree Expand file tree Collapse file tree
helm-chart/amalthea-sessions/templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -219,11 +219,19 @@ type Ingress struct {
219219 // account if `TLSSecret` above is left unset, if the `TLSSecret` field is set
220220 // then that value will take precedence and this boolean flag will be ignored.
221221 UseDefaultClusterTLSCert bool `json:"useDefaultClusterTLSCert,omitempty"`
222+ // +optional
223+ // +kubebuilder:default:=false
224+ // If set to true Amalthea will template HTTPS for the URL to access the session
225+ // that is reported in the status. Without trying to guess whether to use HTTP or HTTPS
226+ // based on the TLS secret or other configurations provided. The reason for this flag
227+ // is that sometimes TLS secret can be provisioned simply by adding ingress annotations.
228+ // And in this case we cannot determine the right scheme reliably from the session spec.
229+ AssumeHttps bool `json:"assumeHttps,omitempty"`
222230}
223231
224232func (ingress * Ingress ) UrlScheme () string {
225233 urlScheme := "http"
226- if (ingress .TLSSecret != nil && ingress .TLSSecret .Name != "" ) || ingress .UseDefaultClusterTLSCert {
234+ if (ingress .TLSSecret != nil && ingress .TLSSecret .Name != "" ) || ingress .UseDefaultClusterTLSCert || ingress . AssumeHttps {
227235 urlScheme = "https"
228236 }
229237 return urlScheme
Original file line number Diff line number Diff line change @@ -4534,6 +4534,15 @@ spec:
45344534 additionalProperties :
45354535 type : string
45364536 type : object
4537+ assumeHttps :
4538+ default : false
4539+ description : |-
4540+ If set to true Amalthea will template HTTPS for the URL to access the session
4541+ that is reported in the status. Without trying to guess whether to use HTTP or HTTPS
4542+ based on the TLS secret or other configurations provided. The reason for this flag
4543+ is that sometimes TLS secret can be provisioned simply by adding ingress annotations.
4544+ And in this case we cannot determine the right scheme reliably from the session spec.
4545+ type : boolean
45374546 host :
45384547 type : string
45394548 x-kubernetes-validations :
Original file line number Diff line number Diff line change @@ -4534,6 +4534,15 @@ spec:
45344534 additionalProperties :
45354535 type : string
45364536 type : object
4537+ assumeHttps :
4538+ default : false
4539+ description : |-
4540+ If set to true Amalthea will template HTTPS for the URL to access the session
4541+ that is reported in the status. Without trying to guess whether to use HTTP or HTTPS
4542+ based on the TLS secret or other configurations provided. The reason for this flag
4543+ is that sometimes TLS secret can be provisioned simply by adding ingress annotations.
4544+ And in this case we cannot determine the right scheme reliably from the session spec.
4545+ type : boolean
45374546 host :
45384547 type : string
45394548 x-kubernetes-validations :
Original file line number Diff line number Diff line change @@ -4536,6 +4536,15 @@ spec:
45364536 additionalProperties :
45374537 type : string
45384538 type : object
4539+ assumeHttps :
4540+ default : false
4541+ description : |-
4542+ If set to true Amalthea will template HTTPS for the URL to access the session
4543+ that is reported in the status. Without trying to guess whether to use HTTP or HTTPS
4544+ based on the TLS secret or other configurations provided. The reason for this flag
4545+ is that sometimes TLS secret can be provisioned simply by adding ingress annotations.
4546+ And in this case we cannot determine the right scheme reliably from the session spec.
4547+ type : boolean
45394548 host :
45404549 type : string
45414550 x-kubernetes-validations :
You can’t perform that action at this time.
0 commit comments