Skip to content

Commit

Permalink
Add option to set number of replicas for pod-identity-webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
hakman committed Jul 16, 2022
1 parent b7d4499 commit f8c1175
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion pkg/apis/kops/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ type ClusterSpec struct {

// PodIdentityWebhookConfig configures an EKS Pod Identity Webhook.
type PodIdentityWebhookConfig struct {
Enabled bool `json:"enabled,omitempty"`
Enabled bool `json:"enabled,omitempty"`
Replicas int `json:"replicas,omitempty"`
}

// CloudProviderSpec configures the cloud provider to use.
Expand Down
3 changes: 2 additions & 1 deletion pkg/apis/kops/v1alpha2/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ type ClusterSpec struct {

// PodIdentityWebhookConfig configures an EKS Pod Identity Webhook.
type PodIdentityWebhookConfig struct {
Enabled bool `json:"enabled,omitempty"`
Enabled bool `json:"enabled,omitempty"`
Replicas int `json:"replicas,omitempty"`
}

type KarpenterConfig struct {
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha2/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pkg/apis/kops/v1alpha3/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ type ClusterSpec struct {

// PodIdentityWebhookConfig configures an EKS Pod Identity Webhook.
type PodIdentityWebhookConfig struct {
Enabled bool `json:"enabled,omitempty"`
Enabled bool `json:"enabled,omitempty"`
Replicas int `json:"replicas,omitempty"`
}

// CloudProviderSpec configures the cloud provider to use.
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha3/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ metadata:
name: pod-identity-webhook
namespace: kube-system
spec:
replicas: 2
replicas: {{ or .PodIdentityWebhook.Replicas "2" }}
selector:
matchLabels:
app: pod-identity-webhook
Expand Down

0 comments on commit f8c1175

Please sign in to comment.