Skip to content

Commit

Permalink
Merge pull request #99 from red-hat-storage/sync_us--main
Browse files Browse the repository at this point in the history
Syncing latest changes from main for kubernetes-csi-addons
  • Loading branch information
openshift-merge-bot[bot] authored Nov 10, 2023
2 parents 5a89ec7 + 5ccc76e commit 76df629
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 2 deletions.
2 changes: 2 additions & 0 deletions apis/csiaddons/v1alpha1/networkfence_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ type SecretSpec struct {
}

// NetworkFenceSpec defines the desired state of NetworkFence
// +kubebuilder:validation:XValidation:rule="has(self.parameters) == has(oldSelf.parameters)",message="parameters are immutable"
// +kubebuilder:validation:XValidation:rule="has(self.secret) == has(oldSelf.secret)",message="secret is immutable"
type NetworkFenceSpec struct {
// Driver contains the name of CSI driver.
// +kubebuilder:validation:Required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
// VolumeReplicationClassSpec specifies parameters that an underlying storage system uses
// when creating a volume replica. A specific VolumeReplicationClass is used by specifying
// its name in a VolumeReplication object.
// +kubebuilder:validation:XValidation:rule="has(self.parameters) == has(oldSelf.parameters)",message="parameters are immutable"
type VolumeReplicationClassSpec struct {
// Provisioner is the name of storage provisioner
// +kubebuilder:validation:Required
Expand Down
5 changes: 5 additions & 0 deletions config/crd/bases/csiaddons.openshift.io_networkfences.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ spec:
- driver
- fenceState
type: object
x-kubernetes-validations:
- message: parameters are immutable
rule: has(self.parameters) == has(oldSelf.parameters)
- message: secret is immutable
rule: has(self.secret) == has(oldSelf.secret)
status:
description: NetworkFenceStatus defines the observed state of NetworkFence
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ spec:
required:
- provisioner
type: object
x-kubernetes-validations:
- message: parameters are immutable
rule: has(self.parameters) == has(oldSelf.parameters)
status:
description: VolumeReplicationClassStatus defines the observed state of
VolumeReplicationClass.
Expand Down
8 changes: 8 additions & 0 deletions deploy/controller/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,11 @@ spec:
- driver
- fenceState
type: object
x-kubernetes-validations:
- message: parameters are immutable
rule: has(self.parameters) == has(oldSelf.parameters)
- message: secret is immutable
rule: has(self.secret) == has(oldSelf.secret)
status:
description: NetworkFenceStatus defines the observed state of NetworkFence
properties:
Expand Down Expand Up @@ -778,6 +783,9 @@ spec:
required:
- provisioner
type: object
x-kubernetes-validations:
- message: parameters are immutable
rule: has(self.parameters) == has(oldSelf.parameters)
status:
description: VolumeReplicationClassStatus defines the observed state of
VolumeReplicationClass.
Expand Down
7 changes: 5 additions & 2 deletions internal/connection/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ type Connection struct {
// NewConnection establishes connection with sidecar, fetches capability and returns Connection object
// filled with required information.
func NewConnection(ctx context.Context, endpoint, nodeID, driverName string) (*Connection, error) {
opts := grpc.WithTransportCredentials(insecure.NewCredentials())
cc, err := grpc.Dial(endpoint, opts)
opts := []grpc.DialOption{
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithIdleTimeout(time.Duration(0)),
}
cc, err := grpc.Dial(endpoint, opts...)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 76df629

Please sign in to comment.