Skip to content

Commit 7e27169

Browse files
committed
introduce per-stack hostname suffix as a CLI config parameter
1 parent ad2401e commit 7e27169

25 files changed

Lines changed: 870 additions & 1113 deletions

cmd/stackset-controller/main.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const (
2828
defaultMetricsAddress = ":7979"
2929
defaultClientGOTimeout = 30 * time.Second
3030
defaultReconcileWorkers = "10"
31+
defaultPerStackDomain = ".ingress.cluster.local"
3132
)
3233

3334
var (
@@ -38,6 +39,7 @@ var (
3839
Namespace string
3940
MetricsAddress string
4041
ClusterDomains []string
42+
PerStackDomain string
4143
NoTrafficScaledownTTL time.Duration
4244
ControllerID string
4345
BackendWeightsAnnotationKey string
@@ -61,7 +63,8 @@ func main() {
6163
kingpin.Flag("reconcile-workers", "The amount of stacksets to reconcile in parallel at a time.").
6264
Default(defaultReconcileWorkers).IntVar(&config.ReconcileWorkers)
6365
kingpin.Flag("backend-weights-key", "Backend weights annotation key the controller will use to set current traffic values").Default(traffic.DefaultBackendWeightsAnnotationKey).StringVar(&config.BackendWeightsAnnotationKey)
64-
kingpin.Flag("cluster-domain", "Main domains of the cluster, used for generating Stack Ingress hostnames").Envar("CLUSTER_DOMAIN").Required().StringsVar(&config.ClusterDomains)
66+
kingpin.Flag("cluster-domain", "Main domains of the cluster, used for generating StackSet Ingress hostnames").Envar("CLUSTER_DOMAIN").Required().StringsVar(&config.ClusterDomains)
67+
kingpin.Flag("per-stack-domain", "Domain used for generating per-stack Ingress hostnames").Default(defaultPerStackDomain).StringVar(&config.PerStackDomain)
6568
kingpin.Flag("enable-routegroup-support", "Enable support for RouteGroups on StackSets.").Default("false").BoolVar(&config.RouteGroupSupportEnabled)
6669
kingpin.Flag(
6770
"sync-ingress-annotation",
@@ -81,6 +84,7 @@ func main() {
8184
ControllerID: config.ControllerID,
8285

8386
ClusterDomains: config.ClusterDomains,
87+
PerStackDomain: config.PerStackDomain,
8488
BackendWeightsAnnotationKey: config.BackendWeightsAnnotationKey,
8589
SyncIngressAnnotations: config.SyncIngressAnnotations,
8690

controller/stackset.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ type StackSetConfig struct {
6767
ControllerID string
6868

6969
ClusterDomains []string
70+
PerStackDomain string
7071
BackendWeightsAnnotationKey string
7172
SyncIngressAnnotations []string
7273

@@ -252,6 +253,7 @@ func (c *StackSetController) collectResources(ctx context.Context) (map[types.UI
252253
reconciler,
253254
c.config.BackendWeightsAnnotationKey,
254255
c.config.ClusterDomains,
256+
c.config.PerStackDomain,
255257
c.config.SyncIngressAnnotations,
256258
)
257259
stacksets[uid] = stacksetContainer

docs/stack_crd.yaml

Lines changed: 304 additions & 299 deletions
Large diffs are not rendered by default.

docs/stackset_crd.yaml

Lines changed: 320 additions & 321 deletions
Large diffs are not rendered by default.

pkg/client/clientset/versioned/clientset.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/client/clientset/versioned/fake/clientset_generated.go

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/client/clientset/versioned/typed/zalando.org/v1/fake/fake_platformcredentialsset.go

Lines changed: 23 additions & 118 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/client/clientset/versioned/typed/zalando.org/v1/fake/fake_stack.go

Lines changed: 19 additions & 118 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)