Skip to content

Commit

Permalink
Change timeout type from time.Duration to metav1.Duration (#6709)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavmpandey08 authored Sep 21, 2023
1 parent d7f7813 commit 3f055fc
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 11 deletions.
3 changes: 1 addition & 2 deletions config/crd/bases/anywhere.eks.amazonaws.com_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,7 @@ spec:
timeout:
description: Timeout for kube-apiserver to wait for
KMS plugin. Default is 3s.
format: int64
type: integer
type: string
required:
- name
- socketListenAddress
Expand Down
3 changes: 1 addition & 2 deletions config/manifest/eksa-components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3884,8 +3884,7 @@ spec:
timeout:
description: Timeout for kube-apiserver to wait for
KMS plugin. Default is 3s.
format: int64
type: integer
type: string
required:
- name
- socketListenAddress
Expand Down
3 changes: 2 additions & 1 deletion pkg/api/v1alpha1/etcdencryption.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ import (
"time"

"github.com/pkg/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/aws/eks-anywhere/pkg/utils/ptr"
)

var (
defaultKMSCacheSize = ptr.Int32(1000)
defaultKMSTimeout = time.Second * 3
defaultKMSTimeout = metav1.Duration{Duration: time.Second * 3}
)

// ValidateEtcdEncryptionConfig validates the etcd encryption configuration.
Expand Down
6 changes: 2 additions & 4 deletions pkg/api/v1alpha1/etcdencryption_types.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package v1alpha1

import (
"time"
)
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

// EtcdEncryption defines the configuration for ETCD encryption.
type EtcdEncryption struct {
Expand All @@ -28,5 +26,5 @@ type KMS struct {
// SocketListenAddress defines a UNIX socket address that the KMS provider listens on.
SocketListenAddress string `json:"socketListenAddress"`
// Timeout for kube-apiserver to wait for KMS plugin. Default is 3s.
Timeout *time.Duration `json:"timeout,omitempty"`
Timeout *metav1.Duration `json:"timeout,omitempty"`
}
3 changes: 1 addition & 2 deletions pkg/api/v1alpha1/zz_generated.deepcopy.go

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

0 comments on commit 3f055fc

Please sign in to comment.