Skip to content

Commit

Permalink
Merge pull request #7 from jaybeeunix/vpn-status
Browse files Browse the repository at this point in the history
Add status fields for vpngateway
  • Loading branch information
jaybeeunix committed Aug 1, 2019
2 parents 840cb06 + fed4145 commit fef4769
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 4 deletions.
15 changes: 15 additions & 0 deletions deploy/crds/awsvpn_v1alpha1_vpngateway_crd.yaml
Expand Up @@ -30,6 +30,21 @@ spec:
spec:
type: object
status:
properties:
phase:
description: Phase is the current status of the VPN Gateway
enum:
- Creating
- Detached
- Ready
type: string
vpcID:
description: VpcID is the AWS ID of the VPC that the VPN Gateway is
attempting to attach to
type: string
vpnGatewayID:
description: VpnGatewayID is the AWS ID of the VPN Gateway object
type: string
type: object
version: v1alpha1
versions:
Expand Down
12 changes: 9 additions & 3 deletions pkg/apis/awsvpn/v1alpha1/vpngateway_types.go
Expand Up @@ -18,9 +18,15 @@ type VpnGatewaySpec struct {
// VpnGatewayStatus defines the observed state of VpnGateway
// +k8s:openapi-gen=true
type VpnGatewayStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file
// Add custom validation using kubebuilder tags: https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html
// Phase is the current status of the VPN Gateway
// +kubebuilder:validation:Enum=Creating,Detached,Ready
Phase string `json:"phase,omitempty"`

// VpnGatewayID is the AWS ID of the VPN Gateway object
VpnGatewayID string `json:"vpnGatewayID,omitempty"`

// VpcID is the AWS ID of the VPC that the VPN Gateway is attempting to attach to
VpcID string `json:"vpcID,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down
24 changes: 23 additions & 1 deletion pkg/apis/awsvpn/v1alpha1/zz_generated.openapi.go
Expand Up @@ -234,7 +234,29 @@ func schema_pkg_apis_awsvpn_v1alpha1_VpnGatewayStatus(ref common.ReferenceCallba
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
Description: "VpnGatewayStatus defines the observed state of VpnGateway",
Properties: map[string]spec.Schema{},
Properties: map[string]spec.Schema{
"phase": {
SchemaProps: spec.SchemaProps{
Description: "Phase is the current status of the VPN Gateway",
Type: []string{"string"},
Format: "",
},
},
"vpnGatewayID": {
SchemaProps: spec.SchemaProps{
Description: "VpnGatewayID is the AWS ID of the VPN Gateway object",
Type: []string{"string"},
Format: "",
},
},
"vpcID": {
SchemaProps: spec.SchemaProps{
Description: "VpcID is the AWS ID of the VPC that the VPN Gateway is attempting to attach to",
Type: []string{"string"},
Format: "",
},
},
},
},
},
Dependencies: []string{},
Expand Down

0 comments on commit fef4769

Please sign in to comment.