1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-04 08:24:28 +00:00

Vendor update

This commit is contained in:
galal-hussein
2018-03-29 22:57:56 +02:00
parent 024765a818
commit 373ee72cef
11 changed files with 827 additions and 110 deletions

View File

@@ -26,7 +26,8 @@ type Project struct {
}
type ProjectStatus struct {
Conditions []ProjectCondition `json:"conditions"`
Conditions []ProjectCondition `json:"conditions"`
PodSecurityPolicyTemplateName string `json:"podSecurityPolicyTemplateId"`
}
type ProjectCondition struct {
@@ -45,10 +46,9 @@ type ProjectCondition struct {
}
type ProjectSpec struct {
DisplayName string `json:"displayName,omitempty" norman:"required"`
Description string `json:"description"`
ClusterName string `json:"clusterName,omitempty" norman:"required,type=reference[cluster]"`
PodSecurityPolicyTemplateName string `json:"podSecurityPolicyTemplateName,omitempty" norman:"type=reference[podSecurityPolicyTemplate]"`
DisplayName string `json:"displayName,omitempty" norman:"required"`
Description string `json:"description"`
ClusterName string `json:"clusterName,omitempty" norman:"required,type=reference[cluster]"`
}
type GlobalRole struct {
@@ -91,6 +91,15 @@ type PodSecurityPolicyTemplate struct {
Spec extv1.PodSecurityPolicySpec `json:"spec,omitempty"`
}
type PodSecurityPolicyTemplateProjectBinding struct {
types.Namespaced
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
PodSecurityPolicyTemplateName string `json:"podSecurityPolicyTemplateId" norman:"required,type=reference[podSecurityPolicyTemplate]"`
TargetProjectName string `json:"targetProjectId" norman:"required,type=reference[project]"`
}
type ProjectRoleTemplateBinding struct {
types.Namespaced
metav1.TypeMeta `json:",inline"`
@@ -116,3 +125,7 @@ type ClusterRoleTemplateBinding struct {
ClusterName string `json:"clusterName,omitempty" norman:"required,type=reference[cluster]"`
RoleTemplateName string `json:"roleTemplateName,omitempty" norman:"required,type=reference[roleTemplate]"`
}
type SetPodSecurityPolicyTemplateInput struct {
PodSecurityPolicyTemplateName string `json:"podSecurityPolicyTemplateId" norman:"required,type=reference[podSecurityPolicyTemplate]"`
}

View File

@@ -72,19 +72,20 @@ type ClusterStatus struct {
Conditions []ClusterCondition `json:"conditions,omitempty"`
//Component statuses will represent cluster's components (etcd/controller/scheduler) health
// https://kubernetes.io/docs/api-reference/v1.8/#componentstatus-v1-core
Driver string `json:"driver"`
AgentImage string `json:"agentImage"`
ComponentStatuses []ClusterComponentStatus `json:"componentStatuses,omitempty"`
APIEndpoint string `json:"apiEndpoint,omitempty"`
ServiceAccountToken string `json:"serviceAccountToken,omitempty"`
CACert string `json:"caCert,omitempty"`
Capacity v1.ResourceList `json:"capacity,omitempty"`
Allocatable v1.ResourceList `json:"allocatable,omitempty"`
AppliedSpec ClusterSpec `json:"appliedSpec,omitempty"`
FailedSpec *ClusterSpec `json:"failedSpec,omitempty"`
Requested v1.ResourceList `json:"requested,omitempty"`
Limits v1.ResourceList `json:"limits,omitempty"`
ClusterName string `json:"clusterName,omitempty"`
Driver string `json:"driver"`
AgentImage string `json:"agentImage"`
ComponentStatuses []ClusterComponentStatus `json:"componentStatuses,omitempty"`
APIEndpoint string `json:"apiEndpoint,omitempty"`
ServiceAccountToken string `json:"serviceAccountToken,omitempty"`
CACert string `json:"caCert,omitempty"`
Capacity v1.ResourceList `json:"capacity,omitempty"`
Allocatable v1.ResourceList `json:"allocatable,omitempty"`
AppliedSpec ClusterSpec `json:"appliedSpec,omitempty"`
FailedSpec *ClusterSpec `json:"failedSpec,omitempty"`
Requested v1.ResourceList `json:"requested,omitempty"`
Limits v1.ResourceList `json:"limits,omitempty"`
ClusterName string `json:"clusterName,omitempty"`
AppliedPodSecurityPolicyTemplateName string `json:"appliedPodSecurityPolicyTemplateId"`
}
type ClusterComponentStatus struct {

View File

@@ -1,23 +1,24 @@
package v3
const (
K8sV18 = "v1.8.9-rancher1-1"
K8sV19 = "v1.9.5-rancher1-1"
K8sV18 = "v1.8.9-rancher1-1"
K8sV19 = "v1.9.5-rancher1-1"
K8sV110 = "v1.10.0-rancher1-1"
)
var (
// K8sVersionToRKESystemImages - images map for 2.0
K8sVersionToRKESystemImages = map[string]RKESystemImages{
"v1.8.9-rancher1-1": v18SystemImages,
"v1.9.4-rancher1-1": v19SystemImages,
"v1.9.5-rancher1-1": v19SystemImages,
"v1.8.9-rancher1-1": v18SystemImages,
"v1.9.5-rancher1-1": v19SystemImages,
"v1.10.0-rancher1-1": v110SystemImages,
}
// K8SVersionToSystemImages16 - images map for 1.6. Keeping it sepate in case we have to diverge
K8SVersionToSystemImages16 = map[string]RKESystemImages{
"v1.8.9-rancher1-1": v18SystemImages,
"v1.9.4-rancher1-1": v19SystemImages,
"v1.9.5-rancher1-1": v19SystemImages,
"v1.8.9-rancher1-1": v18SystemImages,
"v1.9.5-rancher1-1": v19SystemImages,
"v1.10.0-rancher1-1": v110SystemImages,
}
// ToolsSystemImages default images for alert, pipeline, logging
@@ -103,4 +104,36 @@ var (
Tiller: "rancher/tiller:v2.7.2",
Dashboard: "rancher/kubernetes-dashboard-amd64:v1.8.0",
}
// v110 system images defaults
v110SystemImages = RKESystemImages{
Etcd: "rancher/coreos-etcd:v3.1.12",
Kubernetes: "rancher/k8s:" + K8sV110,
Alpine: "alpine:latest",
NginxProxy: "rancher/rke-nginx-proxy:v0.1.1",
CertDownloader: "rancher/rke-cert-deployer:v0.1.1",
KubernetesServicesSidecar: "rancher/rke-service-sidekick:v0.1.1",
KubeDNS: "rancher/k8s-dns-kube-dns-amd64:1.14.8",
DNSmasq: "rancher/k8s-dns-dnsmasq-nanny-amd64:1.14.8",
KubeDNSSidecar: "rancher/k8s-dns-sidecar-amd64:1.14.8",
KubeDNSAutoscaler: "rancher/cluster-proportional-autoscaler-amd64:1.0.0",
Flannel: "rancher/coreos-flannel:v0.9.1",
FlannelCNI: "rancher/coreos-flannel-cni:v0.2.0",
CalicoNode: "rancher/calico-node:v3.0.2",
CalicoCNI: "rancher/calico-cni:v2.0.0",
CalicoCtl: "rancher/calico-ctl:v2.0.0",
CanalNode: "rancher/calico-node:v2.6.2",
CanalCNI: "rancher/calico-cni:v1.11.0",
CanalFlannel: "rancher/coreos-flannel:v0.9.1",
WeaveNode: "weaveworks/weave-kube:2.1.2",
WeaveCNI: "weaveworks/weave-npc:2.1.2",
PodInfraContainer: "rancher/pause-amd64:3.1",
Ingress: "rancher/nginx-ingress-controller:0.10.2",
IngressBackend: "rancher/nginx-ingress-controller-defaultbackend:1.4",
Grafana: "rancher/heapster-grafana-amd64:v4.4.3",
Heapster: "rancher/heapster-amd64:v1.5.0",
Influxdb: "rancher/heapster-influxdb-amd64:v1.3.3",
Tiller: "rancher/tiller:v2.8.2",
Dashboard: "rancher/kubernetes-dashboard-amd64:v1.8.3",
}
)

View File

@@ -1,10 +1,19 @@
package v3
import (
"github.com/rancher/norman/condition"
"github.com/rancher/norman/types"
"k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
type PipelineConditionType string
const (
PipelineExecutionConditonProvisioned condition.Cond = "Provisioned"
PipelineExecutionConditionCompleted condition.Cond = "Completed"
)
type ClusterPipeline struct {
types.Namespaced
@@ -101,7 +110,8 @@ type PipelineStatus struct {
type PipelineSpec struct {
DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"`
TriggerWebhook bool `json:"triggerWebhook,omitempty" yaml:"triggerWebhook,omitempty"`
TriggerWebhookPush bool `json:"triggerWebhookPush,omitempty" yaml:"triggerWebhookPush,omitempty"`
TriggerWebhookPr bool `json:"triggerWebhookPr,omitempty" yaml:"triggerWebhookPr,omitempty"`
TriggerCronTimezone string `json:"triggerCronTimezone,omitempty" yaml:"triggerCronTimezone,omitempty"`
TriggerCronExpression string `json:"triggerCronExpression,omitempty" yaml:"triggerCronExpression,omitempty"`
@@ -110,6 +120,21 @@ type PipelineSpec struct {
Templates map[string]string `json:"templates,omitempty" yaml:"templates,omitempty"`
}
type PipelineCondition struct {
// Type of cluster condition.
Type PipelineConditionType `json:"type"`
// Status of the condition, one of True, False, Unknown.
Status v1.ConditionStatus `json:"status"`
// The last time this condition was updated.
LastUpdateTime string `json:"lastUpdateTime,omitempty"`
// Last time the condition transitioned from one status to another.
LastTransitionTime string `json:"lastTransitionTime,omitempty"`
// The reason for the condition's last transition.
Reason string `json:"reason,omitempty"`
// Human-readable message indicating details about last transition
Message string `json:"message,omitempty"`
}
type Stage struct {
Name string `json:"name,omitempty" yaml:"name,omitempty" norman:"required"`
Steps []Step `json:"steps,omitempty" yaml:"steps,omitempty" norman:"required"`
@@ -154,6 +179,8 @@ type PipelineExecutionSpec struct {
}
type PipelineExecutionStatus struct {
Conditions []PipelineCondition `json:"conditions,omitempty"`
Commit string `json:"commit,omitempty"`
ExecutionState string `json:"executionState,omitempty"`
Started string `json:"started,omitempty"`
@@ -196,6 +223,7 @@ type SourceCodeRepositorySpec struct {
URL string `json:"url,omitempty"`
Permissions RepoPerm `json:"permissions,omitempty"`
Language string `json:"language,omitempty"`
DefaultBranch string `json:"defaultBranch,omitempty"`
}
type SourceCodeRepositoryStatus struct {

View File

@@ -33,6 +33,16 @@ type RancherKubernetesEngineConfig struct {
ClusterName string `yaml:"cluster_name" json:"clusterName,omitempty"`
// Cloud Provider options
CloudProvider CloudProvider `yaml:"cloud_provider" json:"cloudProvider,omitempty"`
// AWSCloudProvicer
AWSCloudProvider AWSCloudProvider `yaml:",omitempty" json:"awsCloudProvider,omitempty"`
// AzureCloudProvicer
AzureCloudProvider AzureCloudProvider `yaml:",omitempty" json:"azureCloudProvider,omitempty"`
// CalicoNetworkProvider
CalicoNetworkProvider CalicoNetworkProvider `yaml:",omitempty" json:"calicoNetworkProvider,omitempty"`
// CanalNetworkProvider
CanalNetworkProvider CanalNetworkProvider `yaml:",omitempty" json:"canalNetworkProvider,omitempty"`
// FlannelNetworkProvider
FlannelNetworkProvider FlannelNetworkProvider `yaml:",omitempty" json:"flannelNetworkProvider,omitempty"`
}
type PrivateRegistry struct {
@@ -256,6 +266,8 @@ type RKEConfigNodePlan struct {
Processes map[string]Process `json:"processes,omitempty"`
// List of portchecks that should be open on the node
PortChecks []PortCheck `json:"portChecks,omitempty"`
// List of files to deploy on the node
Files []File `json:"files,omitempty"`
}
type Process struct {
@@ -305,3 +317,87 @@ type CloudProvider struct {
// Configuration Options of Cloud Provider
CloudConfig map[string]string `yaml:"cloud_config" json:"cloudConfig,omitempty"`
}
type AzureCloudProvider struct {
// The cloud environment identifier. Takes values from https://github.com/Azure/go-autorest/blob/ec5f4903f77ed9927ac95b19ab8e44ada64c1356/autorest/azure/environments.go#L13
Cloud string `json:"cloud" yaml:"cloud"`
// The AAD Tenant ID for the Subscription that the cluster is deployed in
TenantID string `json:"tenantId" yaml:"tenantId"`
// The ID of the Azure Subscription that the cluster is deployed in
SubscriptionID string `json:"subscriptionId" yaml:"subscriptionId"`
// The name of the resource group that the cluster is deployed in
ResourceGroup string `json:"resourceGroup" yaml:"resourceGroup"`
// The location of the resource group that the cluster is deployed in
Location string `json:"location" yaml:"location"`
// The name of the VNet that the cluster is deployed in
VnetName string `json:"vnetName" yaml:"vnetName"`
// The name of the resource group that the Vnet is deployed in
VnetResourceGroup string `json:"vnetResourceGroup" yaml:"vnetResourceGroup"`
// The name of the subnet that the cluster is deployed in
SubnetName string `json:"subnetName" yaml:"subnetName"`
// The name of the security group attached to the cluster's subnet
SecurityGroupName string `json:"securityGroupName" yaml:"securityGroupName"`
// (Optional in 1.6) The name of the route table attached to the subnet that the cluster is deployed in
RouteTableName string `json:"routeTableName" yaml:"routeTableName"`
// (Optional) The name of the availability set that should be used as the load balancer backend
// If this is set, the Azure cloudprovider will only add nodes from that availability set to the load
// balancer backend pool. If this is not set, and multiple agent pools (availability sets) are used, then
// the cloudprovider will try to add all nodes to a single backend pool which is forbidden.
// In other words, if you use multiple agent pools (availability sets), you MUST set this field.
PrimaryAvailabilitySetName string `json:"primaryAvailabilitySetName" yaml:"primaryAvailabilitySetName"`
// The type of azure nodes. Candidate valudes are: vmss and standard.
// If not set, it will be default to standard.
VMType string `json:"vmType" yaml:"vmType"`
// The name of the scale set that should be used as the load balancer backend.
// If this is set, the Azure cloudprovider will only add nodes from that scale set to the load
// balancer backend pool. If this is not set, and multiple agent pools (scale sets) are used, then
// the cloudprovider will try to add all nodes to a single backend pool which is forbidden.
// In other words, if you use multiple agent pools (scale sets), you MUST set this field.
PrimaryScaleSetName string `json:"primaryScaleSetName" yaml:"primaryScaleSetName"`
// The ClientID for an AAD application with RBAC access to talk to Azure RM APIs
AADClientID string `json:"aadClientId" yaml:"aadClientId"`
// The ClientSecret for an AAD application with RBAC access to talk to Azure RM APIs
AADClientSecret string `json:"aadClientSecret" yaml:"aadClientSecret"`
// The path of a client certificate for an AAD application with RBAC access to talk to Azure RM APIs
AADClientCertPath string `json:"aadClientCertPath" yaml:"aadClientCertPath"`
// The password of the client certificate for an AAD application with RBAC access to talk to Azure RM APIs
AADClientCertPassword string `json:"aadClientCertPassword" yaml:"aadClientCertPassword"`
// Enable exponential backoff to manage resource request retries
CloudProviderBackoff bool `json:"cloudProviderBackoff" yaml:"cloudProviderBackoff"`
// Backoff retry limit
CloudProviderBackoffRetries int `json:"cloudProviderBackoffRetries" yaml:"cloudProviderBackoffRetries"`
// Backoff exponent
CloudProviderBackoffExponent int `json:"cloudProviderBackoffExponent" yaml:"cloudProviderBackoffExponent"`
// Backoff duration
CloudProviderBackoffDuration int `json:"cloudProviderBackoffDuration" yaml:"cloudProviderBackoffDuration"`
// Backoff jitter
CloudProviderBackoffJitter int `json:"cloudProviderBackoffJitter" yaml:"cloudProviderBackoffJitter"`
// Enable rate limiting
CloudProviderRateLimit bool `json:"cloudProviderRateLimit" yaml:"cloudProviderRateLimit"`
// Rate limit QPS
CloudProviderRateLimitQPS int `json:"cloudProviderRateLimitQPS" yaml:"cloudProviderRateLimitQPS"`
// Rate limit Bucket Size
CloudProviderRateLimitBucket int `json:"cloudProviderRateLimitBucket" yaml:"cloudProviderRateLimitBucket"`
// Use instance metadata service where possible
UseInstanceMetadata bool `json:"useInstanceMetadata" yaml:"useInstanceMetadata"`
// Use managed service identity for the virtual machine to access Azure ARM APIs
UseManagedIdentityExtension bool `json:"useManagedIdentityExtension"`
// Maximum allowed LoadBalancer Rule Count is the limit enforced by Azure Load balancer
MaximumLoadBalancerRuleCount int `json:"maximumLoadBalancerRuleCount"`
}
type AWSCloudProvider struct {
}
type CalicoNetworkProvider struct {
// Cloud provider type used with calico
CloudProvider string
}
type FlannelNetworkProvider struct {
// Alternate cloud interface for flannel
Iface string
}
type CanalNetworkProvider struct {
}

View File

@@ -19,6 +19,10 @@ func init() {
// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*AWSCloudProvider).DeepCopyInto(out.(*AWSCloudProvider))
return nil
}, InType: reflect.TypeOf(&AWSCloudProvider{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Action).DeepCopyInto(out.(*Action))
return nil
@@ -67,6 +71,10 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
in.(*AuthzConfig).DeepCopyInto(out.(*AuthzConfig))
return nil
}, InType: reflect.TypeOf(&AuthzConfig{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*AzureCloudProvider).DeepCopyInto(out.(*AzureCloudProvider))
return nil
}, InType: reflect.TypeOf(&AzureCloudProvider{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*AzureKubernetesServiceConfig).DeepCopyInto(out.(*AzureKubernetesServiceConfig))
return nil
@@ -75,6 +83,14 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
in.(*BaseService).DeepCopyInto(out.(*BaseService))
return nil
}, InType: reflect.TypeOf(&BaseService{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*CalicoNetworkProvider).DeepCopyInto(out.(*CalicoNetworkProvider))
return nil
}, InType: reflect.TypeOf(&CalicoNetworkProvider{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*CanalNetworkProvider).DeepCopyInto(out.(*CanalNetworkProvider))
return nil
}, InType: reflect.TypeOf(&CanalNetworkProvider{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Catalog).DeepCopyInto(out.(*Catalog))
return nil
@@ -271,6 +287,10 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
in.(*Filter).DeepCopyInto(out.(*Filter))
return nil
}, InType: reflect.TypeOf(&Filter{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*FlannelNetworkProvider).DeepCopyInto(out.(*FlannelNetworkProvider))
return nil
}, InType: reflect.TypeOf(&FlannelNetworkProvider{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*GenerateKubeConfigOutput).DeepCopyInto(out.(*GenerateKubeConfigOutput))
return nil
@@ -507,6 +527,10 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
in.(*Pipeline).DeepCopyInto(out.(*Pipeline))
return nil
}, InType: reflect.TypeOf(&Pipeline{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*PipelineCondition).DeepCopyInto(out.(*PipelineCondition))
return nil
}, InType: reflect.TypeOf(&PipelineCondition{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*PipelineExecution).DeepCopyInto(out.(*PipelineExecution))
return nil
@@ -559,6 +583,14 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
in.(*PodSecurityPolicyTemplateList).DeepCopyInto(out.(*PodSecurityPolicyTemplateList))
return nil
}, InType: reflect.TypeOf(&PodSecurityPolicyTemplateList{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*PodSecurityPolicyTemplateProjectBinding).DeepCopyInto(out.(*PodSecurityPolicyTemplateProjectBinding))
return nil
}, InType: reflect.TypeOf(&PodSecurityPolicyTemplateProjectBinding{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*PodSecurityPolicyTemplateProjectBindingList).DeepCopyInto(out.(*PodSecurityPolicyTemplateProjectBindingList))
return nil
}, InType: reflect.TypeOf(&PodSecurityPolicyTemplateProjectBindingList{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*PortCheck).DeepCopyInto(out.(*PortCheck))
return nil
@@ -731,6 +763,10 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
in.(*SetPasswordInput).DeepCopyInto(out.(*SetPasswordInput))
return nil
}, InType: reflect.TypeOf(&SetPasswordInput{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*SetPodSecurityPolicyTemplateInput).DeepCopyInto(out.(*SetPodSecurityPolicyTemplateInput))
return nil
}, InType: reflect.TypeOf(&SetPodSecurityPolicyTemplateInput{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Setting).DeepCopyInto(out.(*Setting))
return nil
@@ -886,6 +922,22 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
)
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AWSCloudProvider) DeepCopyInto(out *AWSCloudProvider) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSCloudProvider.
func (in *AWSCloudProvider) DeepCopy() *AWSCloudProvider {
if in == nil {
return nil
}
out := new(AWSCloudProvider)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Action) DeepCopyInto(out *Action) {
*out = *in
@@ -1154,6 +1206,22 @@ func (in *AuthzConfig) DeepCopy() *AuthzConfig {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AzureCloudProvider) DeepCopyInto(out *AzureCloudProvider) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureCloudProvider.
func (in *AzureCloudProvider) DeepCopy() *AzureCloudProvider {
if in == nil {
return nil
}
out := new(AzureCloudProvider)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AzureKubernetesServiceConfig) DeepCopyInto(out *AzureKubernetesServiceConfig) {
*out = *in
@@ -1205,6 +1273,38 @@ func (in *BaseService) DeepCopy() *BaseService {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *CalicoNetworkProvider) DeepCopyInto(out *CalicoNetworkProvider) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CalicoNetworkProvider.
func (in *CalicoNetworkProvider) DeepCopy() *CalicoNetworkProvider {
if in == nil {
return nil
}
out := new(CalicoNetworkProvider)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *CanalNetworkProvider) DeepCopyInto(out *CanalNetworkProvider) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CanalNetworkProvider.
func (in *CanalNetworkProvider) DeepCopy() *CanalNetworkProvider {
if in == nil {
return nil
}
out := new(CanalNetworkProvider)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Catalog) DeepCopyInto(out *Catalog) {
*out = *in
@@ -2506,6 +2606,22 @@ func (in *Filter) DeepCopy() *Filter {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *FlannelNetworkProvider) DeepCopyInto(out *FlannelNetworkProvider) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FlannelNetworkProvider.
func (in *FlannelNetworkProvider) DeepCopy() *FlannelNetworkProvider {
if in == nil {
return nil
}
out := new(FlannelNetworkProvider)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GenerateKubeConfigOutput) DeepCopyInto(out *GenerateKubeConfigOutput) {
*out = *in
@@ -4176,6 +4292,22 @@ func (in *Pipeline) DeepCopyObject() runtime.Object {
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PipelineCondition) DeepCopyInto(out *PipelineCondition) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineCondition.
func (in *PipelineCondition) DeepCopy() *PipelineCondition {
if in == nil {
return nil
}
out := new(PipelineCondition)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PipelineExecution) DeepCopyInto(out *PipelineExecution) {
*out = *in
@@ -4339,6 +4471,11 @@ func (in *PipelineExecutionSpec) DeepCopy() *PipelineExecutionSpec {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PipelineExecutionStatus) DeepCopyInto(out *PipelineExecutionStatus) {
*out = *in
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]PipelineCondition, len(*in))
copy(*out, *in)
}
if in.Stages != nil {
in, out := &in.Stages, &out.Stages
*out = make([]StageStatus, len(*in))
@@ -4526,6 +4663,68 @@ func (in *PodSecurityPolicyTemplateList) DeepCopyObject() runtime.Object {
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodSecurityPolicyTemplateProjectBinding) DeepCopyInto(out *PodSecurityPolicyTemplateProjectBinding) {
*out = *in
out.Namespaced = in.Namespaced
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityPolicyTemplateProjectBinding.
func (in *PodSecurityPolicyTemplateProjectBinding) DeepCopy() *PodSecurityPolicyTemplateProjectBinding {
if in == nil {
return nil
}
out := new(PodSecurityPolicyTemplateProjectBinding)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *PodSecurityPolicyTemplateProjectBinding) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PodSecurityPolicyTemplateProjectBindingList) DeepCopyInto(out *PodSecurityPolicyTemplateProjectBindingList) {
*out = *in
out.TypeMeta = in.TypeMeta
out.ListMeta = in.ListMeta
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]PodSecurityPolicyTemplateProjectBinding, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityPolicyTemplateProjectBindingList.
func (in *PodSecurityPolicyTemplateProjectBindingList) DeepCopy() *PodSecurityPolicyTemplateProjectBindingList {
if in == nil {
return nil
}
out := new(PodSecurityPolicyTemplateProjectBindingList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *PodSecurityPolicyTemplateProjectBindingList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
} else {
return nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PortCheck) DeepCopyInto(out *PortCheck) {
*out = *in
@@ -5273,6 +5472,11 @@ func (in *RKEConfigNodePlan) DeepCopyInto(out *RKEConfigNodePlan) {
*out = make([]PortCheck, len(*in))
copy(*out, *in)
}
if in.Files != nil {
in, out := &in.Files, &out.Files
*out = make([]File, len(*in))
copy(*out, *in)
}
return
}
@@ -5374,6 +5578,11 @@ func (in *RancherKubernetesEngineConfig) DeepCopyInto(out *RancherKubernetesEngi
}
in.Ingress.DeepCopyInto(&out.Ingress)
in.CloudProvider.DeepCopyInto(&out.CloudProvider)
out.AWSCloudProvider = in.AWSCloudProvider
out.AzureCloudProvider = in.AzureCloudProvider
out.CalicoNetworkProvider = in.CalicoNetworkProvider
out.CanalNetworkProvider = in.CanalNetworkProvider
out.FlannelNetworkProvider = in.FlannelNetworkProvider
return
}
@@ -5594,6 +5803,22 @@ func (in *SetPasswordInput) DeepCopy() *SetPasswordInput {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SetPodSecurityPolicyTemplateInput) DeepCopyInto(out *SetPodSecurityPolicyTemplateInput) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SetPodSecurityPolicyTemplateInput.
func (in *SetPodSecurityPolicyTemplateInput) DeepCopy() *SetPodSecurityPolicyTemplateInput {
if in == nil {
return nil
}
out := new(SetPodSecurityPolicyTemplateInput)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Setting) DeepCopyInto(out *Setting) {
*out = *in

View File

@@ -23,6 +23,7 @@ type Interface interface {
GlobalRoleBindingsGetter
RoleTemplatesGetter
PodSecurityPolicyTemplatesGetter
PodSecurityPolicyTemplateProjectBindingsGetter
ClusterRoleTemplateBindingsGetter
ProjectRoleTemplateBindingsGetter
ClustersGetter
@@ -62,47 +63,48 @@ type Client struct {
restClient rest.Interface
starters []controller.Starter
nodePoolControllers map[string]NodePoolController
nodeControllers map[string]NodeController
nodeDriverControllers map[string]NodeDriverController
nodeTemplateControllers map[string]NodeTemplateController
projectControllers map[string]ProjectController
globalRoleControllers map[string]GlobalRoleController
globalRoleBindingControllers map[string]GlobalRoleBindingController
roleTemplateControllers map[string]RoleTemplateController
podSecurityPolicyTemplateControllers map[string]PodSecurityPolicyTemplateController
clusterRoleTemplateBindingControllers map[string]ClusterRoleTemplateBindingController
projectRoleTemplateBindingControllers map[string]ProjectRoleTemplateBindingController
clusterControllers map[string]ClusterController
clusterEventControllers map[string]ClusterEventController
clusterRegistrationTokenControllers map[string]ClusterRegistrationTokenController
catalogControllers map[string]CatalogController
templateControllers map[string]TemplateController
templateVersionControllers map[string]TemplateVersionController
groupControllers map[string]GroupController
groupMemberControllers map[string]GroupMemberController
principalControllers map[string]PrincipalController
userControllers map[string]UserController
authConfigControllers map[string]AuthConfigController
tokenControllers map[string]TokenController
dynamicSchemaControllers map[string]DynamicSchemaController
preferenceControllers map[string]PreferenceController
projectNetworkPolicyControllers map[string]ProjectNetworkPolicyController
clusterLoggingControllers map[string]ClusterLoggingController
projectLoggingControllers map[string]ProjectLoggingController
listenConfigControllers map[string]ListenConfigController
settingControllers map[string]SettingController
notifierControllers map[string]NotifierController
clusterAlertControllers map[string]ClusterAlertController
projectAlertControllers map[string]ProjectAlertController
clusterPipelineControllers map[string]ClusterPipelineController
sourceCodeCredentialControllers map[string]SourceCodeCredentialController
pipelineControllers map[string]PipelineController
pipelineExecutionControllers map[string]PipelineExecutionController
pipelineExecutionLogControllers map[string]PipelineExecutionLogController
sourceCodeRepositoryControllers map[string]SourceCodeRepositoryController
globalComposeConfigControllers map[string]GlobalComposeConfigController
clusterComposeConfigControllers map[string]ClusterComposeConfigController
nodePoolControllers map[string]NodePoolController
nodeControllers map[string]NodeController
nodeDriverControllers map[string]NodeDriverController
nodeTemplateControllers map[string]NodeTemplateController
projectControllers map[string]ProjectController
globalRoleControllers map[string]GlobalRoleController
globalRoleBindingControllers map[string]GlobalRoleBindingController
roleTemplateControllers map[string]RoleTemplateController
podSecurityPolicyTemplateControllers map[string]PodSecurityPolicyTemplateController
podSecurityPolicyTemplateProjectBindingControllers map[string]PodSecurityPolicyTemplateProjectBindingController
clusterRoleTemplateBindingControllers map[string]ClusterRoleTemplateBindingController
projectRoleTemplateBindingControllers map[string]ProjectRoleTemplateBindingController
clusterControllers map[string]ClusterController
clusterEventControllers map[string]ClusterEventController
clusterRegistrationTokenControllers map[string]ClusterRegistrationTokenController
catalogControllers map[string]CatalogController
templateControllers map[string]TemplateController
templateVersionControllers map[string]TemplateVersionController
groupControllers map[string]GroupController
groupMemberControllers map[string]GroupMemberController
principalControllers map[string]PrincipalController
userControllers map[string]UserController
authConfigControllers map[string]AuthConfigController
tokenControllers map[string]TokenController
dynamicSchemaControllers map[string]DynamicSchemaController
preferenceControllers map[string]PreferenceController
projectNetworkPolicyControllers map[string]ProjectNetworkPolicyController
clusterLoggingControllers map[string]ClusterLoggingController
projectLoggingControllers map[string]ProjectLoggingController
listenConfigControllers map[string]ListenConfigController
settingControllers map[string]SettingController
notifierControllers map[string]NotifierController
clusterAlertControllers map[string]ClusterAlertController
projectAlertControllers map[string]ProjectAlertController
clusterPipelineControllers map[string]ClusterPipelineController
sourceCodeCredentialControllers map[string]SourceCodeCredentialController
pipelineControllers map[string]PipelineController
pipelineExecutionControllers map[string]PipelineExecutionController
pipelineExecutionLogControllers map[string]PipelineExecutionLogController
sourceCodeRepositoryControllers map[string]SourceCodeRepositoryController
globalComposeConfigControllers map[string]GlobalComposeConfigController
clusterComposeConfigControllers map[string]ClusterComposeConfigController
}
func NewForConfig(config rest.Config) (Interface, error) {
@@ -119,47 +121,48 @@ func NewForConfig(config rest.Config) (Interface, error) {
return &Client{
restClient: restClient,
nodePoolControllers: map[string]NodePoolController{},
nodeControllers: map[string]NodeController{},
nodeDriverControllers: map[string]NodeDriverController{},
nodeTemplateControllers: map[string]NodeTemplateController{},
projectControllers: map[string]ProjectController{},
globalRoleControllers: map[string]GlobalRoleController{},
globalRoleBindingControllers: map[string]GlobalRoleBindingController{},
roleTemplateControllers: map[string]RoleTemplateController{},
podSecurityPolicyTemplateControllers: map[string]PodSecurityPolicyTemplateController{},
clusterRoleTemplateBindingControllers: map[string]ClusterRoleTemplateBindingController{},
projectRoleTemplateBindingControllers: map[string]ProjectRoleTemplateBindingController{},
clusterControllers: map[string]ClusterController{},
clusterEventControllers: map[string]ClusterEventController{},
clusterRegistrationTokenControllers: map[string]ClusterRegistrationTokenController{},
catalogControllers: map[string]CatalogController{},
templateControllers: map[string]TemplateController{},
templateVersionControllers: map[string]TemplateVersionController{},
groupControllers: map[string]GroupController{},
groupMemberControllers: map[string]GroupMemberController{},
principalControllers: map[string]PrincipalController{},
userControllers: map[string]UserController{},
authConfigControllers: map[string]AuthConfigController{},
tokenControllers: map[string]TokenController{},
dynamicSchemaControllers: map[string]DynamicSchemaController{},
preferenceControllers: map[string]PreferenceController{},
projectNetworkPolicyControllers: map[string]ProjectNetworkPolicyController{},
clusterLoggingControllers: map[string]ClusterLoggingController{},
projectLoggingControllers: map[string]ProjectLoggingController{},
listenConfigControllers: map[string]ListenConfigController{},
settingControllers: map[string]SettingController{},
notifierControllers: map[string]NotifierController{},
clusterAlertControllers: map[string]ClusterAlertController{},
projectAlertControllers: map[string]ProjectAlertController{},
clusterPipelineControllers: map[string]ClusterPipelineController{},
sourceCodeCredentialControllers: map[string]SourceCodeCredentialController{},
pipelineControllers: map[string]PipelineController{},
pipelineExecutionControllers: map[string]PipelineExecutionController{},
pipelineExecutionLogControllers: map[string]PipelineExecutionLogController{},
sourceCodeRepositoryControllers: map[string]SourceCodeRepositoryController{},
globalComposeConfigControllers: map[string]GlobalComposeConfigController{},
clusterComposeConfigControllers: map[string]ClusterComposeConfigController{},
nodePoolControllers: map[string]NodePoolController{},
nodeControllers: map[string]NodeController{},
nodeDriverControllers: map[string]NodeDriverController{},
nodeTemplateControllers: map[string]NodeTemplateController{},
projectControllers: map[string]ProjectController{},
globalRoleControllers: map[string]GlobalRoleController{},
globalRoleBindingControllers: map[string]GlobalRoleBindingController{},
roleTemplateControllers: map[string]RoleTemplateController{},
podSecurityPolicyTemplateControllers: map[string]PodSecurityPolicyTemplateController{},
podSecurityPolicyTemplateProjectBindingControllers: map[string]PodSecurityPolicyTemplateProjectBindingController{},
clusterRoleTemplateBindingControllers: map[string]ClusterRoleTemplateBindingController{},
projectRoleTemplateBindingControllers: map[string]ProjectRoleTemplateBindingController{},
clusterControllers: map[string]ClusterController{},
clusterEventControllers: map[string]ClusterEventController{},
clusterRegistrationTokenControllers: map[string]ClusterRegistrationTokenController{},
catalogControllers: map[string]CatalogController{},
templateControllers: map[string]TemplateController{},
templateVersionControllers: map[string]TemplateVersionController{},
groupControllers: map[string]GroupController{},
groupMemberControllers: map[string]GroupMemberController{},
principalControllers: map[string]PrincipalController{},
userControllers: map[string]UserController{},
authConfigControllers: map[string]AuthConfigController{},
tokenControllers: map[string]TokenController{},
dynamicSchemaControllers: map[string]DynamicSchemaController{},
preferenceControllers: map[string]PreferenceController{},
projectNetworkPolicyControllers: map[string]ProjectNetworkPolicyController{},
clusterLoggingControllers: map[string]ClusterLoggingController{},
projectLoggingControllers: map[string]ProjectLoggingController{},
listenConfigControllers: map[string]ListenConfigController{},
settingControllers: map[string]SettingController{},
notifierControllers: map[string]NotifierController{},
clusterAlertControllers: map[string]ClusterAlertController{},
projectAlertControllers: map[string]ProjectAlertController{},
clusterPipelineControllers: map[string]ClusterPipelineController{},
sourceCodeCredentialControllers: map[string]SourceCodeCredentialController{},
pipelineControllers: map[string]PipelineController{},
pipelineExecutionControllers: map[string]PipelineExecutionController{},
pipelineExecutionLogControllers: map[string]PipelineExecutionLogController{},
sourceCodeRepositoryControllers: map[string]SourceCodeRepositoryController{},
globalComposeConfigControllers: map[string]GlobalComposeConfigController{},
clusterComposeConfigControllers: map[string]ClusterComposeConfigController{},
}, nil
}
@@ -292,6 +295,19 @@ func (c *Client) PodSecurityPolicyTemplates(namespace string) PodSecurityPolicyT
}
}
type PodSecurityPolicyTemplateProjectBindingsGetter interface {
PodSecurityPolicyTemplateProjectBindings(namespace string) PodSecurityPolicyTemplateProjectBindingInterface
}
func (c *Client) PodSecurityPolicyTemplateProjectBindings(namespace string) PodSecurityPolicyTemplateProjectBindingInterface {
objectClient := clientbase.NewObjectClient(namespace, c.restClient, &PodSecurityPolicyTemplateProjectBindingResource, PodSecurityPolicyTemplateProjectBindingGroupVersionKind, podSecurityPolicyTemplateProjectBindingFactory{})
return &podSecurityPolicyTemplateProjectBindingClient{
ns: namespace,
client: c,
objectClient: objectClient,
}
}
type ClusterRoleTemplateBindingsGetter interface {
ClusterRoleTemplateBindings(namespace string) ClusterRoleTemplateBindingInterface
}

View File

@@ -0,0 +1,252 @@
package v3
import (
"context"
"github.com/rancher/norman/clientbase"
"github.com/rancher/norman/controller"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/client-go/tools/cache"
)
var (
PodSecurityPolicyTemplateProjectBindingGroupVersionKind = schema.GroupVersionKind{
Version: Version,
Group: GroupName,
Kind: "PodSecurityPolicyTemplateProjectBinding",
}
PodSecurityPolicyTemplateProjectBindingResource = metav1.APIResource{
Name: "podsecuritypolicytemplateprojectbindings",
SingularName: "podsecuritypolicytemplateprojectbinding",
Namespaced: true,
Kind: PodSecurityPolicyTemplateProjectBindingGroupVersionKind.Kind,
}
)
type PodSecurityPolicyTemplateProjectBindingList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []PodSecurityPolicyTemplateProjectBinding
}
type PodSecurityPolicyTemplateProjectBindingHandlerFunc func(key string, obj *PodSecurityPolicyTemplateProjectBinding) error
type PodSecurityPolicyTemplateProjectBindingLister interface {
List(namespace string, selector labels.Selector) (ret []*PodSecurityPolicyTemplateProjectBinding, err error)
Get(namespace, name string) (*PodSecurityPolicyTemplateProjectBinding, error)
}
type PodSecurityPolicyTemplateProjectBindingController interface {
Informer() cache.SharedIndexInformer
Lister() PodSecurityPolicyTemplateProjectBindingLister
AddHandler(name string, handler PodSecurityPolicyTemplateProjectBindingHandlerFunc)
AddClusterScopedHandler(name, clusterName string, handler PodSecurityPolicyTemplateProjectBindingHandlerFunc)
Enqueue(namespace, name string)
Sync(ctx context.Context) error
Start(ctx context.Context, threadiness int) error
}
type PodSecurityPolicyTemplateProjectBindingInterface interface {
ObjectClient() *clientbase.ObjectClient
Create(*PodSecurityPolicyTemplateProjectBinding) (*PodSecurityPolicyTemplateProjectBinding, error)
GetNamespaced(namespace, name string, opts metav1.GetOptions) (*PodSecurityPolicyTemplateProjectBinding, error)
Get(name string, opts metav1.GetOptions) (*PodSecurityPolicyTemplateProjectBinding, error)
Update(*PodSecurityPolicyTemplateProjectBinding) (*PodSecurityPolicyTemplateProjectBinding, error)
Delete(name string, options *metav1.DeleteOptions) error
DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error
List(opts metav1.ListOptions) (*PodSecurityPolicyTemplateProjectBindingList, error)
Watch(opts metav1.ListOptions) (watch.Interface, error)
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
Controller() PodSecurityPolicyTemplateProjectBindingController
AddHandler(name string, sync PodSecurityPolicyTemplateProjectBindingHandlerFunc)
AddLifecycle(name string, lifecycle PodSecurityPolicyTemplateProjectBindingLifecycle)
AddClusterScopedHandler(name, clusterName string, sync PodSecurityPolicyTemplateProjectBindingHandlerFunc)
AddClusterScopedLifecycle(name, clusterName string, lifecycle PodSecurityPolicyTemplateProjectBindingLifecycle)
}
type podSecurityPolicyTemplateProjectBindingLister struct {
controller *podSecurityPolicyTemplateProjectBindingController
}
func (l *podSecurityPolicyTemplateProjectBindingLister) List(namespace string, selector labels.Selector) (ret []*PodSecurityPolicyTemplateProjectBinding, err error) {
err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) {
ret = append(ret, obj.(*PodSecurityPolicyTemplateProjectBinding))
})
return
}
func (l *podSecurityPolicyTemplateProjectBindingLister) Get(namespace, name string) (*PodSecurityPolicyTemplateProjectBinding, error) {
var key string
if namespace != "" {
key = namespace + "/" + name
} else {
key = name
}
obj, exists, err := l.controller.Informer().GetIndexer().GetByKey(key)
if err != nil {
return nil, err
}
if !exists {
return nil, errors.NewNotFound(schema.GroupResource{
Group: PodSecurityPolicyTemplateProjectBindingGroupVersionKind.Group,
Resource: "podSecurityPolicyTemplateProjectBinding",
}, name)
}
return obj.(*PodSecurityPolicyTemplateProjectBinding), nil
}
type podSecurityPolicyTemplateProjectBindingController struct {
controller.GenericController
}
func (c *podSecurityPolicyTemplateProjectBindingController) Lister() PodSecurityPolicyTemplateProjectBindingLister {
return &podSecurityPolicyTemplateProjectBindingLister{
controller: c,
}
}
func (c *podSecurityPolicyTemplateProjectBindingController) AddHandler(name string, handler PodSecurityPolicyTemplateProjectBindingHandlerFunc) {
c.GenericController.AddHandler(name, func(key string) error {
obj, exists, err := c.Informer().GetStore().GetByKey(key)
if err != nil {
return err
}
if !exists {
return handler(key, nil)
}
return handler(key, obj.(*PodSecurityPolicyTemplateProjectBinding))
})
}
func (c *podSecurityPolicyTemplateProjectBindingController) AddClusterScopedHandler(name, cluster string, handler PodSecurityPolicyTemplateProjectBindingHandlerFunc) {
c.GenericController.AddHandler(name, func(key string) error {
obj, exists, err := c.Informer().GetStore().GetByKey(key)
if err != nil {
return err
}
if !exists {
return handler(key, nil)
}
if !controller.ObjectInCluster(cluster, obj) {
return nil
}
return handler(key, obj.(*PodSecurityPolicyTemplateProjectBinding))
})
}
type podSecurityPolicyTemplateProjectBindingFactory struct {
}
func (c podSecurityPolicyTemplateProjectBindingFactory) Object() runtime.Object {
return &PodSecurityPolicyTemplateProjectBinding{}
}
func (c podSecurityPolicyTemplateProjectBindingFactory) List() runtime.Object {
return &PodSecurityPolicyTemplateProjectBindingList{}
}
func (s *podSecurityPolicyTemplateProjectBindingClient) Controller() PodSecurityPolicyTemplateProjectBindingController {
s.client.Lock()
defer s.client.Unlock()
c, ok := s.client.podSecurityPolicyTemplateProjectBindingControllers[s.ns]
if ok {
return c
}
genericController := controller.NewGenericController(PodSecurityPolicyTemplateProjectBindingGroupVersionKind.Kind+"Controller",
s.objectClient)
c = &podSecurityPolicyTemplateProjectBindingController{
GenericController: genericController,
}
s.client.podSecurityPolicyTemplateProjectBindingControllers[s.ns] = c
s.client.starters = append(s.client.starters, c)
return c
}
type podSecurityPolicyTemplateProjectBindingClient struct {
client *Client
ns string
objectClient *clientbase.ObjectClient
controller PodSecurityPolicyTemplateProjectBindingController
}
func (s *podSecurityPolicyTemplateProjectBindingClient) ObjectClient() *clientbase.ObjectClient {
return s.objectClient
}
func (s *podSecurityPolicyTemplateProjectBindingClient) Create(o *PodSecurityPolicyTemplateProjectBinding) (*PodSecurityPolicyTemplateProjectBinding, error) {
obj, err := s.objectClient.Create(o)
return obj.(*PodSecurityPolicyTemplateProjectBinding), err
}
func (s *podSecurityPolicyTemplateProjectBindingClient) Get(name string, opts metav1.GetOptions) (*PodSecurityPolicyTemplateProjectBinding, error) {
obj, err := s.objectClient.Get(name, opts)
return obj.(*PodSecurityPolicyTemplateProjectBinding), err
}
func (s *podSecurityPolicyTemplateProjectBindingClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*PodSecurityPolicyTemplateProjectBinding, error) {
obj, err := s.objectClient.GetNamespaced(namespace, name, opts)
return obj.(*PodSecurityPolicyTemplateProjectBinding), err
}
func (s *podSecurityPolicyTemplateProjectBindingClient) Update(o *PodSecurityPolicyTemplateProjectBinding) (*PodSecurityPolicyTemplateProjectBinding, error) {
obj, err := s.objectClient.Update(o.Name, o)
return obj.(*PodSecurityPolicyTemplateProjectBinding), err
}
func (s *podSecurityPolicyTemplateProjectBindingClient) Delete(name string, options *metav1.DeleteOptions) error {
return s.objectClient.Delete(name, options)
}
func (s *podSecurityPolicyTemplateProjectBindingClient) DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error {
return s.objectClient.DeleteNamespaced(namespace, name, options)
}
func (s *podSecurityPolicyTemplateProjectBindingClient) List(opts metav1.ListOptions) (*PodSecurityPolicyTemplateProjectBindingList, error) {
obj, err := s.objectClient.List(opts)
return obj.(*PodSecurityPolicyTemplateProjectBindingList), err
}
func (s *podSecurityPolicyTemplateProjectBindingClient) Watch(opts metav1.ListOptions) (watch.Interface, error) {
return s.objectClient.Watch(opts)
}
// Patch applies the patch and returns the patched deployment.
func (s *podSecurityPolicyTemplateProjectBindingClient) Patch(o *PodSecurityPolicyTemplateProjectBinding, data []byte, subresources ...string) (*PodSecurityPolicyTemplateProjectBinding, error) {
obj, err := s.objectClient.Patch(o.Name, o, data, subresources...)
return obj.(*PodSecurityPolicyTemplateProjectBinding), err
}
func (s *podSecurityPolicyTemplateProjectBindingClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error {
return s.objectClient.DeleteCollection(deleteOpts, listOpts)
}
func (s *podSecurityPolicyTemplateProjectBindingClient) AddHandler(name string, sync PodSecurityPolicyTemplateProjectBindingHandlerFunc) {
s.Controller().AddHandler(name, sync)
}
func (s *podSecurityPolicyTemplateProjectBindingClient) AddLifecycle(name string, lifecycle PodSecurityPolicyTemplateProjectBindingLifecycle) {
sync := NewPodSecurityPolicyTemplateProjectBindingLifecycleAdapter(name, false, s, lifecycle)
s.AddHandler(name, sync)
}
func (s *podSecurityPolicyTemplateProjectBindingClient) AddClusterScopedHandler(name, clusterName string, sync PodSecurityPolicyTemplateProjectBindingHandlerFunc) {
s.Controller().AddClusterScopedHandler(name, clusterName, sync)
}
func (s *podSecurityPolicyTemplateProjectBindingClient) AddClusterScopedLifecycle(name, clusterName string, lifecycle PodSecurityPolicyTemplateProjectBindingLifecycle) {
sync := NewPodSecurityPolicyTemplateProjectBindingLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle)
s.AddClusterScopedHandler(name, clusterName, sync)
}

View File

@@ -0,0 +1,51 @@
package v3
import (
"github.com/rancher/norman/lifecycle"
"k8s.io/apimachinery/pkg/runtime"
)
type PodSecurityPolicyTemplateProjectBindingLifecycle interface {
Create(obj *PodSecurityPolicyTemplateProjectBinding) (*PodSecurityPolicyTemplateProjectBinding, error)
Remove(obj *PodSecurityPolicyTemplateProjectBinding) (*PodSecurityPolicyTemplateProjectBinding, error)
Updated(obj *PodSecurityPolicyTemplateProjectBinding) (*PodSecurityPolicyTemplateProjectBinding, error)
}
type podSecurityPolicyTemplateProjectBindingLifecycleAdapter struct {
lifecycle PodSecurityPolicyTemplateProjectBindingLifecycle
}
func (w *podSecurityPolicyTemplateProjectBindingLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Create(obj.(*PodSecurityPolicyTemplateProjectBinding))
if o == nil {
return nil, err
}
return o, err
}
func (w *podSecurityPolicyTemplateProjectBindingLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Remove(obj.(*PodSecurityPolicyTemplateProjectBinding))
if o == nil {
return nil, err
}
return o, err
}
func (w *podSecurityPolicyTemplateProjectBindingLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) {
o, err := w.lifecycle.Updated(obj.(*PodSecurityPolicyTemplateProjectBinding))
if o == nil {
return nil, err
}
return o, err
}
func NewPodSecurityPolicyTemplateProjectBindingLifecycleAdapter(name string, clusterScoped bool, client PodSecurityPolicyTemplateProjectBindingInterface, l PodSecurityPolicyTemplateProjectBindingLifecycle) PodSecurityPolicyTemplateProjectBindingHandlerFunc {
adapter := &podSecurityPolicyTemplateProjectBindingLifecycleAdapter{lifecycle: l}
syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient())
return func(key string, obj *PodSecurityPolicyTemplateProjectBinding) error {
if obj == nil {
return syncFn(key, nil)
}
return syncFn(key, obj)
}
}

View File

@@ -51,6 +51,8 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&RoleTemplateList{},
&PodSecurityPolicyTemplate{},
&PodSecurityPolicyTemplateList{},
&PodSecurityPolicyTemplateProjectBinding{},
&PodSecurityPolicyTemplateProjectBindingList{},
&ClusterRoleTemplateBinding{},
&ClusterRoleTemplateBindingList{},
&ProjectRoleTemplateBinding{},