Skip to content

Commit

Permalink
Use client-go 5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
tamalsaha committed Oct 16, 2017
1 parent 3cc1951 commit 2263264
Show file tree
Hide file tree
Showing 1,732 changed files with 288,982 additions and 698,947 deletions.
18 changes: 12 additions & 6 deletions apis/monitoring/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// +genclient=true
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

type ClusterAlert struct {
Expand All @@ -18,6 +18,8 @@ type ClusterAlert struct {
Spec ClusterAlertSpec `json:"spec,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// ClusterAlertList is a collection of ClusterAlert.
type ClusterAlertList struct {
metav1.TypeMeta `json:",inline"`
Expand Down Expand Up @@ -48,12 +50,12 @@ type ClusterAlertSpec struct {
Receivers []Receiver `json:"receivers,omitempty"`

// Vars contains Icinga Service variables to be used in CheckCommand
Vars map[string]interface{} `json:"vars,omitempty"`
Vars map[string]string `json:"vars,omitempty"`
}

type CheckCluster string

// +genclient=true
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

type NodeAlert struct {
Expand All @@ -67,6 +69,8 @@ type NodeAlert struct {
Spec NodeAlertSpec `json:"spec,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// NodeAlertList is a collection of NodeAlert.
type NodeAlertList struct {
metav1.TypeMeta `json:",inline"`
Expand Down Expand Up @@ -101,12 +105,12 @@ type NodeAlertSpec struct {
Receivers []Receiver `json:"receivers,omitempty"`

// Vars contains Icinga Service variables to be used in CheckCommand
Vars map[string]interface{} `json:"vars,omitempty"`
Vars map[string]string `json:"vars,omitempty"`
}

type CheckNode string

// +genclient=true
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

type PodAlert struct {
Expand All @@ -120,6 +124,8 @@ type PodAlert struct {
Spec PodAlertSpec `json:"spec,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// PodAlertList is a collection of PodAlert.
type PodAlertList struct {
metav1.TypeMeta `json:",inline"`
Expand Down Expand Up @@ -154,7 +160,7 @@ type PodAlertSpec struct {
Receivers []Receiver `json:"receivers,omitempty"`

// Vars contains Icinga Service variables to be used in CheckCommand
Vars map[string]interface{} `json:"vars,omitempty"`
Vars map[string]string `json:"vars,omitempty"`
}

type CheckPod string
Expand Down
2 changes: 1 addition & 1 deletion apis/monitoring/v1alpha1/alert.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package v1alpha1
import (
"time"

apiv1 "k8s.io/client-go/pkg/api/v1"
apiv1 "k8s.io/api/core/v1"
)

type Alert interface {
Expand Down
2 changes: 1 addition & 1 deletion apis/monitoring/v1alpha1/cluster_alert.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"time"

apiv1 "k8s.io/client-go/pkg/api/v1"
apiv1 "k8s.io/api/core/v1"
)

const (
Expand Down
4 changes: 3 additions & 1 deletion apis/monitoring/v1alpha1/icinga.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,13 @@ func (c CheckCluster) IsValid() bool {
func ParseCheckCluster(s string) (*CheckCluster, error) {
cmd := CheckCluster(s)
if _, ok := ClusterCommands[cmd]; !ok {
return nil, fmt.Errorf("Invalid cluster check command %s", s)
return nil, fmt.Errorf("invalid cluster check command %s", s)
}
return &cmd, nil
}

// +k8s:deepcopy-gen=false
// +k8s:gen-deepcopy=false
type IcingaCommand struct {
Name string
Vars map[string]data.CommandVar
Expand Down
2 changes: 1 addition & 1 deletion apis/monitoring/v1alpha1/node_alert.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"time"

apiv1 "k8s.io/client-go/pkg/api/v1"
apiv1 "k8s.io/api/core/v1"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion apis/monitoring/v1alpha1/pod_alert.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"time"

apiv1 "k8s.io/client-go/pkg/api/v1"
apiv1 "k8s.io/api/core/v1"
)

const (
Expand Down
Loading

0 comments on commit 2263264

Please sign in to comment.