Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change timeout type from time.Duration to metav1.Duration #6709

Merged
merged 1 commit into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.