Skip to content

Commit

Permalink
rename azureapplicationgatewayloaddistributionpolicies to loaddistrib…
Browse files Browse the repository at this point in the history
…utionpolicies (#1265)
  • Loading branch information
akshaysngupta committed Sep 14, 2021
1 parent 16433af commit 2b966ce
Show file tree
Hide file tree
Showing 30 changed files with 629 additions and 626 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: azureapplicationgatewayloaddistributionpolicies.appgw.ingress.azure.io
name: loaddistributionpolicies.appgw.ingress.azure.io
spec:
group: appgw.ingress.azure.io
scope: Namespaced
names:
kind: AzureApplicationGatewayLoadDistributionPolicy
plural: azureapplicationgatewayloaddistributionpolicies
singular: azureapplicationgatewayloaddistributionpolicy
kind: LoadDistributionPolicy
plural: loaddistributionpolicies
singular: loaddistributionpolicy
shortNames:
- agldp
versions:
Expand All @@ -23,6 +23,7 @@ spec:
type: object
properties:
targets:
minItems: 1
description: "An array of services that contains information for how the service should be used for load balancing in Application Gateway"
type: array
items:
Expand Down Expand Up @@ -50,7 +51,7 @@ spec:
description: "Weight specifies the proportion of HTTP requests forwarded to the backend."
type: integer
default: 1
minimum: 1
minimum: 0
maximum: 1000
role:
description: "Specifies whether a server should be active or passive. Passive backends will receive HTTP requests only when all active backends are marked unhealthy by the Application Gateway's heath probe."
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# This shows a setup for HA
---
apiVersion: appgw.ingress.azure.io/v1beta1
kind: AzureApplicationGatewayLoadDistribitionPolicy
kind: LoadDistributionPolicy
metadata:
name: load-distribution-policy-with-high-availability
spec:
targets:
- backend:
service:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# This shows a setup for Blue/Green deployment
---
apiVersion: appgw.ingress.azure.io/v1beta1
kind: AzureApplicationGatewayLoadDistribitionPolicy
kind: LoadDistributionPolicy
metadata:
name: load-distribution-policy-blue-green
spec:
targets:
- backend:
service:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// --------------------------------------------------------------------------------------------

// +k8s:deepcopy-gen=package,register
// +groupName=azureapplicationgatewayloaddistributionpolicies.appgw.ingress.azure.io
// +groupName=loaddistributionpolicies.appgw.ingress.azure.io

// Package v1beta1 is the v1beta1 version of the API.
package v1beta1
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
// --------------------------------------------------------------------------------------------

// +k8s:deepcopy-gen=package,register
// +groupName=azureapplicationgatewayloaddistributionpolicies.appgw.ingress.azure.io
// +groupName=loaddistributionpolicies.appgw.ingress.azure.io

// Package v1beta1 contains API Schema definitions for the AzureApplicationGatewayLoadDistributionPolicy v1beta1 API group
// Package v1beta1 contains API Schema definitions for the LoadDistributionPolicy v1beta1 API group
package v1beta1

import (
Expand Down Expand Up @@ -42,8 +42,8 @@ func Resource(resource string) schema.GroupResource {
// Adds the list of known types to Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&AzureApplicationGatewayLoadDistributionPolicy{},
&AzureApplicationGatewayLoadDistributionPolicyList{},
&LoadDistributionPolicy{},
&LoadDistributionPolicyList{},
)
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ import (
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// AzureApplicationGatewayLoadDistributionPolicy is the resource AGIC is watching on for any backend address change
type AzureApplicationGatewayLoadDistributionPolicy struct {
// LoadDistributionPolicy is the resource AGIC is watching on for any backend address change
type LoadDistributionPolicy struct {
metav1.TypeMeta `json:",inline"`

// +optional
metav1.ObjectMeta `json:"metadata,omitempty"`
// +optional
Spec AzureApplicationGatewayLoadDistributionPolicySpec `json:"spec"`
Spec LoadDistributionPolicySpec `json:"spec"`
}

// AzureApplicationGatewayLoadDistributionPolicySpec defines a list of backend pool addresses
type AzureApplicationGatewayLoadDistributionPolicySpec struct {
// LoadDistributionPolicySpec defines a list of backend pool addresses
type LoadDistributionPolicySpec struct {
metav1.TypeMeta `json:",inline"`

// +optional
Expand All @@ -48,10 +48,10 @@ type Backend struct {

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

// AzureApplicationGatewayLoadDistributionPolicyList is the list of LDP
type AzureApplicationGatewayLoadDistributionPolicyList struct {
// LoadDistributionPolicyList is the list of LDP
type LoadDistributionPolicyList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`

Items []AzureApplicationGatewayLoadDistributionPolicy `json:"items"`
Items []LoadDistributionPolicy `json:"items"`
}

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

30 changes: 15 additions & 15 deletions pkg/crd_client/agic_crd_client/clientset/versioned/clientset.go

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

Loading

0 comments on commit 2b966ce

Please sign in to comment.