Skip to content

Commit

Permalink
fix: privateKeyRef case (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
winston0410 authored Jul 14, 2024
1 parent 88dd510 commit f880152
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
54 changes: 27 additions & 27 deletions config/crd/bases/vpn.wireguard-operator.io_wireguardpeers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,33 +39,6 @@ spec:
spec:
description: The desired state of the peer.
properties:
PrivateKeyRef:
description: The private key of the peer
properties:
secretKeyRef:
description: SecretKeySelector selects a key of a Secret.
properties:
key:
description: The key of the secret to select from. Must be
a valid secret key.
type: string
name:
description: |-
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?
type: string
optional:
description: Specify whether the Secret or its key must be
defined
type: boolean
required:
- key
type: object
x-kubernetes-map-type: atomic
required:
- secretKeyRef
type: object
address:
description: |-
INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
Expand Down Expand Up @@ -127,6 +100,33 @@ spec:
type: object
type: object
type: array
privateKeyRef:
description: The private key of the peer
properties:
secretKeyRef:
description: SecretKeySelector selects a key of a Secret.
properties:
key:
description: The key of the secret to select from. Must be
a valid secret key.
type: string
name:
description: |-
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?
type: string
optional:
description: Specify whether the Secret or its key must be
defined
type: boolean
required:
- key
type: object
x-kubernetes-map-type: atomic
required:
- secretKeyRef
type: object
publicKey:
description: The key used by the peer to authenticate with the wg
server.
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/v1alpha1/wireguardpeer_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type WireguardPeerSpec struct {
// The DNS configuration for the peer.
Dns string `json:"dns,omitempty"`
// The private key of the peer
PrivateKey PrivateKey `json:"PrivateKeyRef,omitempty"`
PrivateKey PrivateKey `json:"privateKeyRef,omitempty"`
// The key used by the peer to authenticate with the wg server.
PublicKey string `json:"publicKey,omitempty"`
// The name of the Wireguard instance in k8s that the peer belongs to. The wg instance should be in the same namespace as the peer.
Expand Down

0 comments on commit f880152

Please sign in to comment.