-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support NginxProxy at the Gateway level
- Loading branch information
1 parent
f8bbcbe
commit 146b258
Showing
40 changed files
with
3,535 additions
and
1,970 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Package v1alpha2 contains API Schema definitions for the | ||
// gateway.nginx.org API group. | ||
// | ||
// +kubebuilder:object:generate=true | ||
// +groupName=gateway.nginx.org | ||
package v1alpha2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package v1alpha2 | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
"k8s.io/apimachinery/pkg/runtime" | ||
"k8s.io/apimachinery/pkg/runtime/schema" | ||
) | ||
|
||
// GroupName specifies the group name used to register the objects. | ||
const GroupName = "gateway.nginx.org" | ||
|
||
// SchemeGroupVersion is group version used to register these objects. | ||
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha2"} | ||
|
||
// Resource takes an unqualified resource and returns a Group qualified GroupResource. | ||
func Resource(resource string) schema.GroupResource { | ||
return SchemeGroupVersion.WithResource(resource).GroupResource() | ||
} | ||
|
||
var ( | ||
// SchemeBuilder collects functions that add things to a scheme. It's to allow | ||
// code to compile without explicitly referencing generated types. You should | ||
// declare one in each package that will have generated deep copy or conversion | ||
// functions. | ||
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) | ||
|
||
// AddToScheme applies all the stored functions to the scheme. A non-nil error | ||
// indicates that one function failed and the attempt was abandoned. | ||
AddToScheme = SchemeBuilder.AddToScheme | ||
) | ||
|
||
// Adds the list of known types to Scheme. | ||
func addKnownTypes(scheme *runtime.Scheme) error { | ||
scheme.AddKnownTypes(SchemeGroupVersion, | ||
&NginxProxy{}, | ||
&NginxProxyList{}, | ||
) | ||
// AddToGroupVersion allows the serialization of client types like ListOptions. | ||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion) | ||
return nil | ||
} |
Oops, something went wrong.