mirror of https://github.com/kubernetes/kops.git
Auto generated fi tasks for loadbalancer attributes
This commit is contained in:
parent
179ef94174
commit
fa18857b43
|
|
@ -133,7 +133,6 @@ autoscalingGroup/bastion.{{ ClusterName }}:
|
|||
# the bastion DNS entry for it to be reachable from outside.
|
||||
# BastionPublicName --> Bastion LoadBalancer
|
||||
# ------------------------------------------------------------------------
|
||||
dnsZone/{{ .DNSZone }}: {}
|
||||
dnsName/{{ GetBastionDNS }}:
|
||||
Zone: dnsZone/{{ .DNSZone }}
|
||||
ResourceType: "A"
|
||||
|
|
|
|||
|
|
@ -47,11 +47,15 @@ type LoadBalancerCrossZoneLoadBalancing struct {
|
|||
Enabled *bool
|
||||
}
|
||||
|
||||
//go:generate fitask -type=LoadBalancerConnectionSettings
|
||||
type LoadBalancerConnectionSettings struct {
|
||||
Name *string
|
||||
IdleTimeout *int64
|
||||
}
|
||||
|
||||
//go:generate fitask -type=LoadBalancerAttributes
|
||||
type LoadBalancerAttributes struct {
|
||||
Name *string
|
||||
LoadBalancer *LoadBalancer
|
||||
AccessLog *LoadBalancerAccessLog
|
||||
AdditionalAttributes []*LoadBalancerAdditionalAttribute
|
||||
|
|
@ -60,10 +64,6 @@ type LoadBalancerAttributes struct {
|
|||
CrossZoneLoadBalancing *LoadBalancerCrossZoneLoadBalancing
|
||||
}
|
||||
|
||||
func (e *LoadBalancerAttributes) String() string {
|
||||
return fi.TaskAsString(e)
|
||||
}
|
||||
|
||||
func findELBAttributes(cloud awsup.AWSCloud, name string) (*elb.LoadBalancerAttributes, error) {
|
||||
request := &elb.DescribeLoadBalancerAttributesInput{
|
||||
LoadBalancerName: aws.String(name),
|
||||
|
|
@ -138,6 +138,10 @@ func (e *LoadBalancerAttributes) Run(c *fi.Context) error {
|
|||
return fi.DefaultDeltaRunMethod(e, c)
|
||||
}
|
||||
|
||||
func (e *LoadBalancerConnectionSettings) Run(c *fi.Context) error {
|
||||
return fi.DefaultDeltaRunMethod(e, c)
|
||||
}
|
||||
|
||||
func (s *LoadBalancerAttributes) CheckChanges(a, e, changes *LoadBalancerAttributes) error {
|
||||
if a == nil {
|
||||
if e.LoadBalancer == nil {
|
||||
|
|
|
|||
|
|
@ -1,41 +0,0 @@
|
|||
/*
|
||||
Copyright 2016 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// Code generated by ""fitask" -type=LoadBalancer"; DO NOT EDIT
|
||||
|
||||
package awstasks
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// LoadBalancer
|
||||
|
||||
// JSON marshalling boilerplate
|
||||
type realLoadBalancerAttributes LoadBalancerAttributes
|
||||
type realLoadBalancerConnectionSettings LoadBalancerConnectionSettings
|
||||
|
||||
func (o *LoadBalancerAttributes) UnmarshalJSON(data []byte) error {
|
||||
var r realLoadBalancerAttributes
|
||||
var c realLoadBalancerConnectionSettings
|
||||
if err := json.Unmarshal(data, &r); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := json.Unmarshal(data, &c); err != nil {
|
||||
return err
|
||||
}
|
||||
*o = LoadBalancerAttributes(r)
|
||||
*o.ConnectionSettings = LoadBalancerConnectionSettings(c)
|
||||
return nil
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
// Code generated by ""fitask" -type=LoadBalancerAttributes"; DO NOT EDIT
|
||||
|
||||
package awstasks
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
)
|
||||
|
||||
// LoadBalancerAttributes
|
||||
|
||||
// JSON marshalling boilerplate
|
||||
type realLoadBalancerAttributes LoadBalancerAttributes
|
||||
|
||||
func (o *LoadBalancerAttributes) UnmarshalJSON(data []byte) error {
|
||||
var jsonName string
|
||||
if err := json.Unmarshal(data, &jsonName); err == nil {
|
||||
o.Name = &jsonName
|
||||
return nil
|
||||
}
|
||||
|
||||
var r realLoadBalancerAttributes
|
||||
if err := json.Unmarshal(data, &r); err != nil {
|
||||
return err
|
||||
}
|
||||
*o = LoadBalancerAttributes(r)
|
||||
return nil
|
||||
}
|
||||
|
||||
var _ fi.HasName = &LoadBalancerAttributes{}
|
||||
|
||||
func (e *LoadBalancerAttributes) GetName() *string {
|
||||
return e.Name
|
||||
}
|
||||
|
||||
func (e *LoadBalancerAttributes) SetName(name string) {
|
||||
e.Name = &name
|
||||
}
|
||||
|
||||
func (e *LoadBalancerAttributes) String() string {
|
||||
return fi.TaskAsString(e)
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
// Code generated by ""fitask" -type=LoadBalancerConnectionSettings"; DO NOT EDIT
|
||||
|
||||
package awstasks
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
)
|
||||
|
||||
// LoadBalancerConnectionSettings
|
||||
|
||||
// JSON marshalling boilerplate
|
||||
type realLoadBalancerConnectionSettings LoadBalancerConnectionSettings
|
||||
|
||||
func (o *LoadBalancerConnectionSettings) UnmarshalJSON(data []byte) error {
|
||||
var jsonName string
|
||||
if err := json.Unmarshal(data, &jsonName); err == nil {
|
||||
o.Name = &jsonName
|
||||
return nil
|
||||
}
|
||||
|
||||
var r realLoadBalancerConnectionSettings
|
||||
if err := json.Unmarshal(data, &r); err != nil {
|
||||
return err
|
||||
}
|
||||
*o = LoadBalancerConnectionSettings(r)
|
||||
return nil
|
||||
}
|
||||
|
||||
var _ fi.HasName = &LoadBalancerConnectionSettings{}
|
||||
|
||||
func (e *LoadBalancerConnectionSettings) GetName() *string {
|
||||
return e.Name
|
||||
}
|
||||
|
||||
func (e *LoadBalancerConnectionSettings) SetName(name string) {
|
||||
e.Name = &name
|
||||
}
|
||||
|
||||
func (e *LoadBalancerConnectionSettings) String() string {
|
||||
return fi.TaskAsString(e)
|
||||
}
|
||||
Loading…
Reference in New Issue