Skip to content

Commit

Permalink
Rename HTTPService to ServiceTemplate
Browse files Browse the repository at this point in the history
  • Loading branch information
nkvoll committed Jun 6, 2019
1 parent 4caaecd commit 9140358
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 78 deletions.
24 changes: 3 additions & 21 deletions operators/pkg/apis/common/v1alpha1/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (s ObjectSelector) NamespacedName() types.NamespacedName {
// HTTPConfig configures a HTTP-based service.
type HTTPConfig struct {
// Service is a template for the Kubernetes Service
Service HTTPService `json:"service,omitempty"`
Service ServiceTemplate `json:"service,omitempty"`
// TLS describe additional options to consider when generating HTTP TLS certificates.
TLS TLSOptions `json:"tls,omitempty"`
}
Expand All @@ -59,8 +59,8 @@ type SubjectAlternativeName struct {
IP string `json:"ip,omitempty"`
}

// HTTPService contains defaults for a HTTP service.
type HTTPService struct {
// ServiceTemplate describes the data a service should have when created from a template
type ServiceTemplate struct {
// ObjectMeta is metadata for the service.
// The name and namespace provided here is managed by ECK and will be ignored.
// +optional
Expand All @@ -70,21 +70,3 @@ type HTTPService struct {
// +optional
Spec v1.ServiceSpec `json:"spec,omitempty"`
}

// HTTPServiceObjectMeta is metadata for HTTP Service.
type HTTPServiceObjectMeta struct {
// Annotations is an unstructured key value map stored with a resource that may be
// set by external tools to store and retrieve arbitrary metadata. They are not
// queryable and should be preserved when modifying objects.
// More info: http://kubernetes.io/docs/user-guide/annotations
// +optional
Annotations map[string]string `json:"annotations,omitempty"`
}

// HTTPServiceSpec contains a subset of overridable settings for the HTTP Service
type HTTPServiceSpec struct {
// Type determines which service type to use for this workload. The
// options are: `ClusterIP|LoadBalancer|NodePort`. Defaults to ClusterIP.
// +kubebuilder:validation:Enum=ClusterIP,LoadBalancer,NodePort
Type string `json:"type,omitempty"`
}
75 changes: 18 additions & 57 deletions operators/pkg/apis/common/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9140358

Please sign in to comment.