Skip to content

Commit

Permalink
Let the vCluster Helm chart manage its own Ingress. (#37)
Browse files Browse the repository at this point in the history
this ended up being a hotfix for issue seen last night https://uffizzi-internal.slack.com/archives/CN8MKSAQ5/p1691725574228729
  • Loading branch information
axisofentropy authored Aug 11, 2023
1 parent 11edaee commit 1452e8d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
7 changes: 2 additions & 5 deletions controllers/uffizzicluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,12 +339,10 @@ func (r *UffizziClusterReconciler) upsertVClusterHelmRelease(update bool, ctx co
FsGroup: 12345,
Ingress: VClusterIngress{
Enabled: true,
IngressClassName: uCluster.Spec.Ingress.Class,
Host: BuildVClusterIngressHost(uCluster),
Annotations: map[string]string{
"nginx.ingress.kubernetes.io/backend-protocol": "HTTPS",
"nginx.ingress.kubernetes.io/ssl-redirect": "true",
"nginx.ingress.kubernetes.io/ssl-passthrough": "true",
"app.uffizzi.com/ingress-sync": "true",
"app.uffizzi.com/ingress-sync": "true",
},
},
Isolation: VClusterIsolation{
Expand Down Expand Up @@ -501,7 +499,6 @@ func (r *UffizziClusterReconciler) upsertVClusterHelmRelease(update bool, ctx co
//}

if uCluster.Spec.Ingress.Class == INGRESS_CLASS_NGINX {
uClusterHelmValues.Ingress.Enabled = true
uClusterHelmValues.Syncer.ExtraArgs = append(uClusterHelmValues.Syncer.ExtraArgs,
"--tls-san="+TLSSanArgValue,
"--out-kube-config-server="+OutKubeConfigServerArgValue,
Expand Down
13 changes: 7 additions & 6 deletions controllers/vcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,17 @@ type VClusterSync struct {
Ingresses EnabledBool `json:"ingresses,omitempty"`
}

type VClusterIngress struct {
Enabled bool `json:"enabled,omitempty"`
Host string `json:"host,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
}

type EnabledBool struct {
Enabled bool `json:"enabled"`
}

type VClusterIngress struct {
Enabled bool `json:"enabled,omitempty"`
IngressClassName string `json:"ingressClassName,omitempty"`
Host string `json:"host,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
}

type VClusterResourceQuota struct {
Enabled bool `json:"enabled,omitempty"`
Quota VClusterResourceQuotaDefiniton `json:"quota,omitempty"`
Expand Down

0 comments on commit 1452e8d

Please sign in to comment.