Skip to content

Commit

Permalink
Rename serviceextension -> backendconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
MrHohn committed Apr 30, 2018
1 parent 7e233ee commit 151639b
Show file tree
Hide file tree
Showing 36 changed files with 585 additions and 585 deletions.
8 changes: 4 additions & 4 deletions cmd/glbc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ import (
neg "k8s.io/ingress-gce/pkg/neg"

"k8s.io/ingress-gce/cmd/glbc/app"
"k8s.io/ingress-gce/pkg/backendconfig"
"k8s.io/ingress-gce/pkg/flags"
"k8s.io/ingress-gce/pkg/serviceextension"
"k8s.io/ingress-gce/pkg/version"
)

Expand Down Expand Up @@ -72,14 +72,14 @@ func main() {
glog.Fatalf("Failed to create kubernetes client: %v", err)
}

if flags.F.EnableServiceExtension {
if flags.F.EnableBackendConfig {
crdClient, err := crdclient.NewForConfig(kubeConfig)
if err != nil {
glog.Fatalf("Failed to create kubernetes CRD client: %v", err)
}

if _, err := serviceextension.EnsureCRD(crdClient); err != nil {
glog.Fatalf("Failed to ensure ServiceExtension CRD: %v", err)
if _, err := backendconfig.EnsureCRD(crdClient); err != nil {
glog.Fatalf("Failed to ensure BackendConfig CRD: %v", err)
}
}

Expand Down
4 changes: 2 additions & 2 deletions hack/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ CODEGEN_PKG=${CODEGEN_PKG:-$(cd ${SCRIPT_ROOT}; ls -d -1 ./vendor/k8s.io/code-ge
# k8s.io/kubernetes. The output-base is needed for the generators to output into the vendor dir
# instead of the $GOPATH directly. For normal projects this can be dropped.
${CODEGEN_PKG}/generate-groups.sh "deepcopy,client,informer,lister" \
k8s.io/ingress-gce/pkg/serviceextension/client k8s.io/ingress-gce/pkg/apis \
serviceextension:v1alpha1 \
k8s.io/ingress-gce/pkg/backendconfig/client k8s.io/ingress-gce/pkg/apis \
backendconfig:v1alpha1 \
--output-base "$(dirname ${BASH_SOURCE})/../../.." \
--go-header-file ${SCRIPT_ROOT}/hack/boilerplate.go.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package serviceextension
package backendconfig

const (
GroupName = "cloud.google.com"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"

"k8s.io/ingress-gce/pkg/apis/serviceextension"
"k8s.io/ingress-gce/pkg/apis/backendconfig"
)

// SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: serviceextension.GroupName, Version: "v1alpha1"}
var SchemeGroupVersion = schema.GroupVersion{Group: backendconfig.GroupName, Version: "v1alpha1"}

// Kind takes an unqualified kind and returns back a Group qualified GroupKind
func Kind(kind string) schema.GroupKind {
Expand All @@ -45,8 +45,8 @@ var (
// Adds the list of known types to Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&ServiceExtension{},
&ServiceExtensionList{},
&BackendConfig{},
&BackendConfigList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,29 @@ import (
// +genclient:noStatus
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// ServiceExtension is a specification for a ServiceExtension resource
type ServiceExtension struct {
// BackendConfig is a specification for a BackendConfig resource
type BackendConfig struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec ServiceExtensionSpec `json:"spec"`
Status ServiceExtensionStatus `json:"status"`
Spec BackendConfigSpec `json:"spec"`
Status BackendConfigStatus `json:"status"`
}

// ServiceExtensionSpec is the spec for a ServiceExtension resource
type ServiceExtensionSpec struct {
// BackendConfigSpec is the spec for a BackendConfig resource
type BackendConfigSpec struct {
}

// ServiceExtensionStatus is the status for a ServiceExtension resource
type ServiceExtensionStatus struct {
// BackendConfigStatus is the status for a BackendConfig resource
type BackendConfigStatus struct {
}

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

// ServiceExtensionList is a list of ServiceExtension resources
type ServiceExtensionList struct {
// BackendConfigList is a list of BackendConfig resources
type BackendConfigList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`

Items []ServiceExtension `json:"items"`
Items []BackendConfig `json:"items"`
}

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

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

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

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

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

Loading

0 comments on commit 151639b

Please sign in to comment.