diff --git a/pkg/model/alimodel/api_loadbalancer.go b/pkg/model/alimodel/api_loadbalancer.go index dedbb83879..2f99fe1173 100644 --- a/pkg/model/alimodel/api_loadbalancer.go +++ b/pkg/model/alimodel/api_loadbalancer.go @@ -34,7 +34,7 @@ const ( // APILoadBalancerModelBuilder builds a LoadBalancer for accessing the API type APILoadBalancerModelBuilder struct { *ALIModelContext - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.ModelBuilder = &APILoadBalancerModelBuilder{} diff --git a/pkg/model/alimodel/external_access.go b/pkg/model/alimodel/external_access.go index a517b10a0d..1da53d67cb 100644 --- a/pkg/model/alimodel/external_access.go +++ b/pkg/model/alimodel/external_access.go @@ -34,7 +34,7 @@ const ( // (SSHAccess, KubernetesAPIAccess) type ExternalAccessModelBuilder struct { *ALIModelContext - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.ModelBuilder = &FirewallModelBuilder{} diff --git a/pkg/model/alimodel/firewall.go b/pkg/model/alimodel/firewall.go index 5915ef9495..cc9437ad04 100644 --- a/pkg/model/alimodel/firewall.go +++ b/pkg/model/alimodel/firewall.go @@ -27,7 +27,7 @@ const IpProtocolAll = "all" // FirewallModelBuilder configures firewall network objects type FirewallModelBuilder struct { *ALIModelContext - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.ModelBuilder = &FirewallModelBuilder{} diff --git a/pkg/model/alimodel/network.go b/pkg/model/alimodel/network.go index fd95236599..8aa6543bf9 100644 --- a/pkg/model/alimodel/network.go +++ b/pkg/model/alimodel/network.go @@ -25,7 +25,7 @@ import ( // NetworkModelBuilder configures VPC network objects type NetworkModelBuilder struct { *ALIModelContext - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.ModelBuilder = &NetworkModelBuilder{} diff --git a/pkg/model/alimodel/ram.go b/pkg/model/alimodel/ram.go index 713bdef301..a4b1b96706 100644 --- a/pkg/model/alimodel/ram.go +++ b/pkg/model/alimodel/ram.go @@ -31,7 +31,7 @@ const PolicyType = string(ram.Custom) type RAMModelBuilder struct { *ALIModelContext - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } type AssumeRolePolicyDocument struct { diff --git a/pkg/model/alimodel/scalinggroup.go b/pkg/model/alimodel/scalinggroup.go index 3e5fc49247..59ddbbd7c2 100644 --- a/pkg/model/alimodel/scalinggroup.go +++ b/pkg/model/alimodel/scalinggroup.go @@ -34,8 +34,8 @@ type ScalingGroupModelBuilder struct { *ALIModelContext BootstrapScriptBuilder *model.BootstrapScriptBuilder - Lifecycle *fi.Lifecycle - SecurityLifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle + SecurityLifecycle fi.Lifecycle } var _ fi.ModelBuilder = &ScalingGroupModelBuilder{} diff --git a/pkg/model/alimodel/sshkey.go b/pkg/model/alimodel/sshkey.go index d539a084df..e4e2f3be67 100644 --- a/pkg/model/alimodel/sshkey.go +++ b/pkg/model/alimodel/sshkey.go @@ -24,7 +24,7 @@ import ( // SSHKeyModelBuilder configures SSH objects type SSHKeyModelBuilder struct { *ALIModelContext - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.ModelBuilder = &SSHKeyModelBuilder{} diff --git a/pkg/model/awsmodel/api_loadbalancer.go b/pkg/model/awsmodel/api_loadbalancer.go index 1312f97385..9f1df8f400 100644 --- a/pkg/model/awsmodel/api_loadbalancer.go +++ b/pkg/model/awsmodel/api_loadbalancer.go @@ -37,8 +37,8 @@ const LoadBalancerDefaultIdleTimeout = 5 * time.Minute type APILoadBalancerBuilder struct { *AWSModelContext - Lifecycle *fi.Lifecycle - SecurityLifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle + SecurityLifecycle fi.Lifecycle } var _ fi.ModelBuilder = &APILoadBalancerBuilder{} diff --git a/pkg/model/awsmodel/autoscalinggroup.go b/pkg/model/awsmodel/autoscalinggroup.go index e3fb3cd1b4..c9b3149d86 100644 --- a/pkg/model/awsmodel/autoscalinggroup.go +++ b/pkg/model/awsmodel/autoscalinggroup.go @@ -53,8 +53,8 @@ type AutoscalingGroupModelBuilder struct { *AWSModelContext BootstrapScriptBuilder *model.BootstrapScriptBuilder - Lifecycle *fi.Lifecycle - SecurityLifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle + SecurityLifecycle fi.Lifecycle Cluster *kops.Cluster } diff --git a/pkg/model/awsmodel/bastion.go b/pkg/model/awsmodel/bastion.go index 7e08bce83e..c6b48dea7b 100644 --- a/pkg/model/awsmodel/bastion.go +++ b/pkg/model/awsmodel/bastion.go @@ -39,8 +39,8 @@ const ( type BastionModelBuilder struct { *AWSModelContext - Lifecycle *fi.Lifecycle - SecurityLifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle + SecurityLifecycle fi.Lifecycle } var _ fi.ModelBuilder = &BastionModelBuilder{} diff --git a/pkg/model/awsmodel/dns.go b/pkg/model/awsmodel/dns.go index 83004dba37..b2e4e4705e 100644 --- a/pkg/model/awsmodel/dns.go +++ b/pkg/model/awsmodel/dns.go @@ -29,7 +29,7 @@ import ( // DNSModelBuilder builds DNS related model objects type DNSModelBuilder struct { *AWSModelContext - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.ModelBuilder = &DNSModelBuilder{} diff --git a/pkg/model/awsmodel/external_access.go b/pkg/model/awsmodel/external_access.go index 4144f90dfa..b74c66373d 100644 --- a/pkg/model/awsmodel/external_access.go +++ b/pkg/model/awsmodel/external_access.go @@ -30,7 +30,7 @@ import ( // (SSHAccess, KubernetesAPIAccess) type ExternalAccessModelBuilder struct { *AWSModelContext - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.ModelBuilder = &ExternalAccessModelBuilder{} diff --git a/pkg/model/awsmodel/firewall.go b/pkg/model/awsmodel/firewall.go index cbfd1d67c1..f7e6c70042 100644 --- a/pkg/model/awsmodel/firewall.go +++ b/pkg/model/awsmodel/firewall.go @@ -36,7 +36,7 @@ const ( // FirewallModelBuilder configures firewall network objects type FirewallModelBuilder struct { *AWSModelContext - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.ModelBuilder = &FirewallModelBuilder{} diff --git a/pkg/model/awsmodel/iam.go b/pkg/model/awsmodel/iam.go index db8642675b..09d945a0aa 100644 --- a/pkg/model/awsmodel/iam.go +++ b/pkg/model/awsmodel/iam.go @@ -38,7 +38,7 @@ import ( // IAMModelBuilder configures IAM objects type IAMModelBuilder struct { *AWSModelContext - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Cluster *kops.Cluster } diff --git a/pkg/model/awsmodel/network.go b/pkg/model/awsmodel/network.go index 0aa6ffb77a..a6e35032e7 100644 --- a/pkg/model/awsmodel/network.go +++ b/pkg/model/awsmodel/network.go @@ -31,7 +31,7 @@ import ( // NetworkModelBuilder configures network objects type NetworkModelBuilder struct { *AWSModelContext - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.ModelBuilder = &NetworkModelBuilder{} diff --git a/pkg/model/awsmodel/nodeterminationhandler.go b/pkg/model/awsmodel/nodeterminationhandler.go index 5a70d7752c..f08a2bf4e3 100644 --- a/pkg/model/awsmodel/nodeterminationhandler.go +++ b/pkg/model/awsmodel/nodeterminationhandler.go @@ -70,7 +70,7 @@ var ( type NodeTerminationHandlerBuilder struct { *AWSModelContext - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } func (b *NodeTerminationHandlerBuilder) Build(c *fi.ModelBuilderContext) error { diff --git a/pkg/model/awsmodel/oidc_provider.go b/pkg/model/awsmodel/oidc_provider.go index 9960885607..fba361649a 100644 --- a/pkg/model/awsmodel/oidc_provider.go +++ b/pkg/model/awsmodel/oidc_provider.go @@ -26,7 +26,7 @@ import ( type OIDCProviderBuilder struct { *AWSModelContext KeyStore fi.CAStore - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.ModelBuilder = &OIDCProviderBuilder{} diff --git a/pkg/model/awsmodel/spotinst.go b/pkg/model/awsmodel/spotinst.go index 578c4f88a2..cbffbdf74e 100644 --- a/pkg/model/awsmodel/spotinst.go +++ b/pkg/model/awsmodel/spotinst.go @@ -128,8 +128,8 @@ const ( type SpotInstanceGroupModelBuilder struct { *AWSModelContext BootstrapScriptBuilder *model.BootstrapScriptBuilder - Lifecycle *fi.Lifecycle - SecurityLifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle + SecurityLifecycle fi.Lifecycle } var _ fi.ModelBuilder = &SpotInstanceGroupModelBuilder{} diff --git a/pkg/model/awsmodel/sshkey.go b/pkg/model/awsmodel/sshkey.go index f704af4be1..af5ee01256 100644 --- a/pkg/model/awsmodel/sshkey.go +++ b/pkg/model/awsmodel/sshkey.go @@ -24,7 +24,7 @@ import ( // SSHKeyModelBuilder configures SSH objects type SSHKeyModelBuilder struct { *AWSModelContext - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.ModelBuilder = &SSHKeyModelBuilder{} diff --git a/pkg/model/azuremodel/api_loadbalancer.go b/pkg/model/azuremodel/api_loadbalancer.go index bb7bf9913a..c32c9e295c 100644 --- a/pkg/model/azuremodel/api_loadbalancer.go +++ b/pkg/model/azuremodel/api_loadbalancer.go @@ -30,8 +30,8 @@ import ( type APILoadBalancerModelBuilder struct { *AzureModelContext - Lifecycle *fi.Lifecycle - SecurityLifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle + SecurityLifecycle fi.Lifecycle } var _ fi.ModelBuilder = &APILoadBalancerModelBuilder{} diff --git a/pkg/model/azuremodel/network.go b/pkg/model/azuremodel/network.go index 16f5430633..9ccc4f5747 100644 --- a/pkg/model/azuremodel/network.go +++ b/pkg/model/azuremodel/network.go @@ -24,7 +24,7 @@ import ( // NetworkModelBuilder configures a Virtual Network and subnets. type NetworkModelBuilder struct { *AzureModelContext - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.ModelBuilder = &NetworkModelBuilder{} diff --git a/pkg/model/azuremodel/resourcegroup.go b/pkg/model/azuremodel/resourcegroup.go index 75979f6714..99c2137a06 100644 --- a/pkg/model/azuremodel/resourcegroup.go +++ b/pkg/model/azuremodel/resourcegroup.go @@ -24,7 +24,7 @@ import ( // ResourceGroupModelBuilder configures a Resource Group. type ResourceGroupModelBuilder struct { *AzureModelContext - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.ModelBuilder = &ResourceGroupModelBuilder{} diff --git a/pkg/model/azuremodel/vmscaleset.go b/pkg/model/azuremodel/vmscaleset.go index 561f7a30b3..9cd716ca7c 100644 --- a/pkg/model/azuremodel/vmscaleset.go +++ b/pkg/model/azuremodel/vmscaleset.go @@ -33,7 +33,7 @@ import ( type VMScaleSetModelBuilder struct { *AzureModelContext BootstrapScriptBuilder *model.BootstrapScriptBuilder - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.ModelBuilder = &VMScaleSetModelBuilder{} diff --git a/pkg/model/components/etcdmanager/model.go b/pkg/model/components/etcdmanager/model.go index 412d91e1ca..3be766ed44 100644 --- a/pkg/model/components/etcdmanager/model.go +++ b/pkg/model/components/etcdmanager/model.go @@ -48,7 +48,7 @@ import ( // EtcdManagerBuilder builds the manifest for the etcd-manager type EtcdManagerBuilder struct { *model.KopsModelContext - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle AssetBuilder *assets.AssetBuilder } diff --git a/pkg/model/components/etcdmanager/tests/minimal/tasks.yaml b/pkg/model/components/etcdmanager/tests/minimal/tasks.yaml index f3e22a4341..e41c706b6f 100644 --- a/pkg/model/components/etcdmanager/tests/minimal/tasks.yaml +++ b/pkg/model/components/etcdmanager/tests/minimal/tasks.yaml @@ -1,4 +1,4 @@ -Lifecycle: null +Lifecycle: "" Name: etcd-clients-ca Signer: null alternateNames: null @@ -6,7 +6,7 @@ oldFormat: false subject: cn=etcd-clients-ca type: ca --- -Lifecycle: null +Lifecycle: "" Name: etcd-manager-ca-events Signer: null alternateNames: null @@ -14,7 +14,7 @@ oldFormat: false subject: cn=etcd-manager-ca-events type: ca --- -Lifecycle: null +Lifecycle: "" Name: etcd-manager-ca-main Signer: null alternateNames: null @@ -22,7 +22,7 @@ oldFormat: false subject: cn=etcd-manager-ca-main type: ca --- -Lifecycle: null +Lifecycle: "" Name: etcd-peers-ca-events Signer: null alternateNames: null @@ -30,7 +30,7 @@ oldFormat: false subject: cn=etcd-peers-ca-events type: ca --- -Lifecycle: null +Lifecycle: "" Name: etcd-peers-ca-main Signer: null alternateNames: null @@ -43,7 +43,7 @@ Contents: |- { "memberCount": 1 } -Lifecycle: null +Lifecycle: "" Location: /control/etcd-cluster-spec Name: etcd-cluster-spec-events Public: null @@ -53,7 +53,7 @@ Contents: |- { "memberCount": 1 } -Lifecycle: null +Lifecycle: "" Location: /control/etcd-cluster-spec Name: etcd-cluster-spec-main Public: null @@ -124,7 +124,7 @@ Contents: | type: FileOrCreate name: varlogetcd status: {} -Lifecycle: null +Lifecycle: "" Location: manifests/etcd/events.yaml Name: manifests-etcdmanager-events Public: null @@ -195,7 +195,7 @@ Contents: | type: FileOrCreate name: varlogetcd status: {} -Lifecycle: null +Lifecycle: "" Location: manifests/etcd/main.yaml Name: manifests-etcdmanager-main Public: null diff --git a/pkg/model/components/etcdmanager/tests/overwrite_settings/tasks.yaml b/pkg/model/components/etcdmanager/tests/overwrite_settings/tasks.yaml index c8bbbfafba..77ac9315ab 100644 --- a/pkg/model/components/etcdmanager/tests/overwrite_settings/tasks.yaml +++ b/pkg/model/components/etcdmanager/tests/overwrite_settings/tasks.yaml @@ -1,4 +1,4 @@ -Lifecycle: null +Lifecycle: "" Name: etcd-clients-ca Signer: null alternateNames: null @@ -6,7 +6,7 @@ oldFormat: false subject: cn=etcd-clients-ca type: ca --- -Lifecycle: null +Lifecycle: "" Name: etcd-manager-ca-events Signer: null alternateNames: null @@ -14,7 +14,7 @@ oldFormat: false subject: cn=etcd-manager-ca-events type: ca --- -Lifecycle: null +Lifecycle: "" Name: etcd-manager-ca-main Signer: null alternateNames: null @@ -22,7 +22,7 @@ oldFormat: false subject: cn=etcd-manager-ca-main type: ca --- -Lifecycle: null +Lifecycle: "" Name: etcd-peers-ca-events Signer: null alternateNames: null @@ -30,7 +30,7 @@ oldFormat: false subject: cn=etcd-peers-ca-events type: ca --- -Lifecycle: null +Lifecycle: "" Name: etcd-peers-ca-main Signer: null alternateNames: null @@ -43,7 +43,7 @@ Contents: |- { "memberCount": 1 } -Lifecycle: null +Lifecycle: "" Location: /control/etcd-cluster-spec Name: etcd-cluster-spec-events Public: null @@ -53,7 +53,7 @@ Contents: |- { "memberCount": 1 } -Lifecycle: null +Lifecycle: "" Location: /control/etcd-cluster-spec Name: etcd-cluster-spec-main Public: null @@ -127,7 +127,7 @@ Contents: | type: FileOrCreate name: varlogetcd status: {} -Lifecycle: null +Lifecycle: "" Location: manifests/etcd/events.yaml Name: manifests-etcdmanager-events Public: null @@ -201,7 +201,7 @@ Contents: | type: FileOrCreate name: varlogetcd status: {} -Lifecycle: null +Lifecycle: "" Location: manifests/etcd/main.yaml Name: manifests-etcdmanager-main Public: null diff --git a/pkg/model/components/etcdmanager/tests/pollinterval/tasks.yaml b/pkg/model/components/etcdmanager/tests/pollinterval/tasks.yaml index f6e9e7bcf8..106ec956dc 100644 --- a/pkg/model/components/etcdmanager/tests/pollinterval/tasks.yaml +++ b/pkg/model/components/etcdmanager/tests/pollinterval/tasks.yaml @@ -1,4 +1,4 @@ -Lifecycle: null +Lifecycle: "" Name: etcd-clients-ca Signer: null alternateNames: null @@ -6,7 +6,7 @@ oldFormat: false subject: cn=etcd-clients-ca type: ca --- -Lifecycle: null +Lifecycle: "" Name: etcd-manager-ca-events Signer: null alternateNames: null @@ -14,7 +14,7 @@ oldFormat: false subject: cn=etcd-manager-ca-events type: ca --- -Lifecycle: null +Lifecycle: "" Name: etcd-manager-ca-main Signer: null alternateNames: null @@ -22,7 +22,7 @@ oldFormat: false subject: cn=etcd-manager-ca-main type: ca --- -Lifecycle: null +Lifecycle: "" Name: etcd-peers-ca-events Signer: null alternateNames: null @@ -30,7 +30,7 @@ oldFormat: false subject: cn=etcd-peers-ca-events type: ca --- -Lifecycle: null +Lifecycle: "" Name: etcd-peers-ca-main Signer: null alternateNames: null @@ -43,7 +43,7 @@ Contents: |- { "memberCount": 1 } -Lifecycle: null +Lifecycle: "" Location: /control/etcd-cluster-spec Name: etcd-cluster-spec-events Public: null @@ -53,7 +53,7 @@ Contents: |- { "memberCount": 1 } -Lifecycle: null +Lifecycle: "" Location: /control/etcd-cluster-spec Name: etcd-cluster-spec-main Public: null @@ -124,7 +124,7 @@ Contents: | type: FileOrCreate name: varlogetcd status: {} -Lifecycle: null +Lifecycle: "" Location: manifests/etcd/events.yaml Name: manifests-etcdmanager-events Public: null @@ -195,7 +195,7 @@ Contents: | type: FileOrCreate name: varlogetcd status: {} -Lifecycle: null +Lifecycle: "" Location: manifests/etcd/main.yaml Name: manifests-etcdmanager-main Public: null diff --git a/pkg/model/components/etcdmanager/tests/proxy/tasks.yaml b/pkg/model/components/etcdmanager/tests/proxy/tasks.yaml index d0c3e67a5d..6d3aa06bd4 100644 --- a/pkg/model/components/etcdmanager/tests/proxy/tasks.yaml +++ b/pkg/model/components/etcdmanager/tests/proxy/tasks.yaml @@ -1,4 +1,4 @@ -Lifecycle: null +Lifecycle: "" Name: etcd-clients-ca Signer: null alternateNames: null @@ -6,7 +6,7 @@ oldFormat: false subject: cn=etcd-clients-ca type: ca --- -Lifecycle: null +Lifecycle: "" Name: etcd-manager-ca-events Signer: null alternateNames: null @@ -14,7 +14,7 @@ oldFormat: false subject: cn=etcd-manager-ca-events type: ca --- -Lifecycle: null +Lifecycle: "" Name: etcd-manager-ca-main Signer: null alternateNames: null @@ -22,7 +22,7 @@ oldFormat: false subject: cn=etcd-manager-ca-main type: ca --- -Lifecycle: null +Lifecycle: "" Name: etcd-peers-ca-events Signer: null alternateNames: null @@ -30,7 +30,7 @@ oldFormat: false subject: cn=etcd-peers-ca-events type: ca --- -Lifecycle: null +Lifecycle: "" Name: etcd-peers-ca-main Signer: null alternateNames: null @@ -43,7 +43,7 @@ Contents: |- { "memberCount": 1 } -Lifecycle: null +Lifecycle: "" Location: /control/etcd-cluster-spec Name: etcd-cluster-spec-events Public: null @@ -53,7 +53,7 @@ Contents: |- { "memberCount": 1 } -Lifecycle: null +Lifecycle: "" Location: /control/etcd-cluster-spec Name: etcd-cluster-spec-main Public: null @@ -133,7 +133,7 @@ Contents: | type: FileOrCreate name: varlogetcd status: {} -Lifecycle: null +Lifecycle: "" Location: manifests/etcd/events.yaml Name: manifests-etcdmanager-events Public: null @@ -213,7 +213,7 @@ Contents: | type: FileOrCreate name: varlogetcd status: {} -Lifecycle: null +Lifecycle: "" Location: manifests/etcd/main.yaml Name: manifests-etcdmanager-main Public: null diff --git a/pkg/model/components/kubeapiserver/model.go b/pkg/model/components/kubeapiserver/model.go index 3c6daa90be..a0c58ff01c 100644 --- a/pkg/model/components/kubeapiserver/model.go +++ b/pkg/model/components/kubeapiserver/model.go @@ -32,7 +32,7 @@ import ( // KubeApiserverBuilder builds the static manifest for kube-apiserver-healthcheck sidecar type KubeApiserverBuilder struct { *model.KopsModelContext - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle AssetBuilder *assets.AssetBuilder } diff --git a/pkg/model/components/kubeapiserver/tests/minimal/tasks.yaml b/pkg/model/components/kubeapiserver/tests/minimal/tasks.yaml index 68339c2eb9..639f553433 100644 --- a/pkg/model/components/kubeapiserver/tests/minimal/tasks.yaml +++ b/pkg/model/components/kubeapiserver/tests/minimal/tasks.yaml @@ -32,7 +32,7 @@ Contents: | type: Directory name: healthcheck-secrets status: {} -Lifecycle: null +Lifecycle: "" Location: manifests/static/kube-apiserver-healthcheck.yaml Name: manifests-static-kube-apiserver-healthcheck Public: null diff --git a/pkg/model/domodel/api_loadbalancer.go b/pkg/model/domodel/api_loadbalancer.go index 735181b45e..21680839d9 100644 --- a/pkg/model/domodel/api_loadbalancer.go +++ b/pkg/model/domodel/api_loadbalancer.go @@ -30,7 +30,7 @@ import ( // APILoadBalancerModelBuilder builds a LoadBalancer for accessing the API type APILoadBalancerModelBuilder struct { *DOModelContext - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.ModelBuilder = &APILoadBalancerModelBuilder{} diff --git a/pkg/model/domodel/droplets.go b/pkg/model/domodel/droplets.go index 7d9760514e..015f611005 100644 --- a/pkg/model/domodel/droplets.go +++ b/pkg/model/domodel/droplets.go @@ -31,7 +31,7 @@ type DropletBuilder struct { *DOModelContext BootstrapScriptBuilder *model.BootstrapScriptBuilder - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.ModelBuilder = &DropletBuilder{} diff --git a/pkg/model/gcemodel/api_loadbalancer.go b/pkg/model/gcemodel/api_loadbalancer.go index f869bab86f..b5ed8a807e 100644 --- a/pkg/model/gcemodel/api_loadbalancer.go +++ b/pkg/model/gcemodel/api_loadbalancer.go @@ -27,7 +27,7 @@ import ( // APILoadBalancerBuilder builds a LoadBalancer for accessing the API type APILoadBalancerBuilder struct { *GCEModelContext - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.ModelBuilder = &APILoadBalancerBuilder{} diff --git a/pkg/model/gcemodel/autoscalinggroup.go b/pkg/model/gcemodel/autoscalinggroup.go index b72ce72405..8e43fd7ac4 100644 --- a/pkg/model/gcemodel/autoscalinggroup.go +++ b/pkg/model/gcemodel/autoscalinggroup.go @@ -41,7 +41,7 @@ type AutoscalingGroupModelBuilder struct { *GCEModelContext BootstrapScriptBuilder *model.BootstrapScriptBuilder - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.ModelBuilder = &AutoscalingGroupModelBuilder{} diff --git a/pkg/model/gcemodel/external_access.go b/pkg/model/gcemodel/external_access.go index c6a4ae280c..cb15c19eea 100644 --- a/pkg/model/gcemodel/external_access.go +++ b/pkg/model/gcemodel/external_access.go @@ -27,7 +27,7 @@ import ( // (SSHAccess, KubernetesAPIAccess) type ExternalAccessModelBuilder struct { *GCEModelContext - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.ModelBuilder = &ExternalAccessModelBuilder{} diff --git a/pkg/model/gcemodel/firewall.go b/pkg/model/gcemodel/firewall.go index 472ad28195..6112efea42 100644 --- a/pkg/model/gcemodel/firewall.go +++ b/pkg/model/gcemodel/firewall.go @@ -26,7 +26,7 @@ import ( // FirewallModelBuilder configures firewall network objects type FirewallModelBuilder struct { *GCEModelContext - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.ModelBuilder = &FirewallModelBuilder{} diff --git a/pkg/model/gcemodel/network.go b/pkg/model/gcemodel/network.go index 42a0872f6b..84a226b214 100644 --- a/pkg/model/gcemodel/network.go +++ b/pkg/model/gcemodel/network.go @@ -28,7 +28,7 @@ import ( // NetworkModelBuilder configures network objects type NetworkModelBuilder struct { *GCEModelContext - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.ModelBuilder = &NetworkModelBuilder{} diff --git a/pkg/model/gcemodel/storageacl.go b/pkg/model/gcemodel/storageacl.go index ce9de3d806..4b369ac393 100644 --- a/pkg/model/gcemodel/storageacl.go +++ b/pkg/model/gcemodel/storageacl.go @@ -34,7 +34,7 @@ import ( type StorageAclBuilder struct { *GCEModelContext Cloud gce.GCECloud - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.ModelBuilder = &NetworkModelBuilder{} diff --git a/pkg/model/issuerdiscovery.go b/pkg/model/issuerdiscovery.go index d1caf3aa3c..cb84f67a73 100644 --- a/pkg/model/issuerdiscovery.go +++ b/pkg/model/issuerdiscovery.go @@ -37,7 +37,7 @@ import ( type IssuerDiscoveryModelBuilder struct { *KopsModelContext - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Cluster *kops.Cluster } diff --git a/pkg/model/master_volumes.go b/pkg/model/master_volumes.go index b7e551ecf0..88454ab924 100644 --- a/pkg/model/master_volumes.go +++ b/pkg/model/master_volumes.go @@ -52,7 +52,7 @@ const ( // MasterVolumeBuilder builds master EBS volumes type MasterVolumeBuilder struct { *KopsModelContext - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.ModelBuilder = &MasterVolumeBuilder{} diff --git a/pkg/model/openstackmodel/firewall.go b/pkg/model/openstackmodel/firewall.go index b8ae43e257..beaa15b069 100644 --- a/pkg/model/openstackmodel/firewall.go +++ b/pkg/model/openstackmodel/firewall.go @@ -41,7 +41,7 @@ const ( // FirewallModelBuilder configures firewall network objects type FirewallModelBuilder struct { *OpenstackModelContext - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Rules map[string]*openstacktasks.SecurityGroupRule } diff --git a/pkg/model/openstackmodel/network.go b/pkg/model/openstackmodel/network.go index 9538003c7b..f1c32977b0 100644 --- a/pkg/model/openstackmodel/network.go +++ b/pkg/model/openstackmodel/network.go @@ -26,7 +26,7 @@ import ( // NetworkModelBuilder configures network objects type NetworkModelBuilder struct { *OpenstackModelContext - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.ModelBuilder = &NetworkModelBuilder{} diff --git a/pkg/model/openstackmodel/servergroup.go b/pkg/model/openstackmodel/servergroup.go index f8d3d1e9b6..ca2ecbda0e 100644 --- a/pkg/model/openstackmodel/servergroup.go +++ b/pkg/model/openstackmodel/servergroup.go @@ -35,7 +35,7 @@ import ( type ServerGroupModelBuilder struct { *OpenstackModelContext BootstrapScriptBuilder *model.BootstrapScriptBuilder - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.ModelBuilder = &ServerGroupModelBuilder{} diff --git a/pkg/model/openstackmodel/servergroup_test.go b/pkg/model/openstackmodel/servergroup_test.go index 57547f427d..6daf4c4608 100644 --- a/pkg/model/openstackmodel/servergroup_test.go +++ b/pkg/model/openstackmodel/servergroup_test.go @@ -1005,7 +1005,7 @@ func createBuilderForCluster(cluster *kops.Cluster, instanceGroups []*kops.Insta return &ServerGroupModelBuilder{ OpenstackModelContext: openstackModelContext, BootstrapScriptBuilder: bootstrapScriptBuilder, - Lifecycle: &clusterLifecycle, + Lifecycle: clusterLifecycle, } } diff --git a/pkg/model/openstackmodel/sshkey.go b/pkg/model/openstackmodel/sshkey.go index 591a627e31..6d5d5a8fb9 100644 --- a/pkg/model/openstackmodel/sshkey.go +++ b/pkg/model/openstackmodel/sshkey.go @@ -24,7 +24,7 @@ import ( // SSHKeyModelBuilder configures SSH objects type SSHKeyModelBuilder struct { *OpenstackModelContext - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.ModelBuilder = &SSHKeyModelBuilder{} diff --git a/pkg/model/openstackmodel/tests/servergroup/adds-additional-security-groups.yaml b/pkg/model/openstackmodel/tests/servergroup/adds-additional-security-groups.yaml index 0a8a9b44bc..464d3caf3d 100644 --- a/pkg/model/openstackmodel/tests/servergroup/adds-additional-security-groups.yaml +++ b/pkg/model/openstackmodel/tests/servergroup/adds-additional-security-groups.yaml @@ -31,13 +31,13 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -45,7 +45,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet.cluster Network: null Tag: null @@ -68,7 +68,7 @@ UserData: task: Name: node --- -Lifecycle: null +Lifecycle: "" Name: ca Signer: null alternateNames: null @@ -84,13 +84,13 @@ Name: port-node-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -98,7 +98,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet.cluster Network: null Tag: null diff --git a/pkg/model/openstackmodel/tests/servergroup/adds-cloud-labels-from-ClusterSpec.yaml b/pkg/model/openstackmodel/tests/servergroup/adds-cloud-labels-from-ClusterSpec.yaml index f581f9b7e3..cc8374b575 100644 --- a/pkg/model/openstackmodel/tests/servergroup/adds-cloud-labels-from-ClusterSpec.yaml +++ b/pkg/model/openstackmodel/tests/servergroup/adds-cloud-labels-from-ClusterSpec.yaml @@ -31,13 +31,13 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -45,7 +45,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet.cluster Network: null Tag: null @@ -67,7 +67,7 @@ UserData: task: Name: node --- -Lifecycle: null +Lifecycle: "" Name: ca Signer: null alternateNames: null @@ -82,13 +82,13 @@ Name: port-node-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -96,7 +96,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet.cluster Network: null Tag: null diff --git a/pkg/model/openstackmodel/tests/servergroup/adds-cloud-labels-from-InstanceGroupSpec.yaml b/pkg/model/openstackmodel/tests/servergroup/adds-cloud-labels-from-InstanceGroupSpec.yaml index f581f9b7e3..cc8374b575 100644 --- a/pkg/model/openstackmodel/tests/servergroup/adds-cloud-labels-from-InstanceGroupSpec.yaml +++ b/pkg/model/openstackmodel/tests/servergroup/adds-cloud-labels-from-InstanceGroupSpec.yaml @@ -31,13 +31,13 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -45,7 +45,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet.cluster Network: null Tag: null @@ -67,7 +67,7 @@ UserData: task: Name: node --- -Lifecycle: null +Lifecycle: "" Name: ca Signer: null alternateNames: null @@ -82,13 +82,13 @@ Name: port-node-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -96,7 +96,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet.cluster Network: null Tag: null diff --git a/pkg/model/openstackmodel/tests/servergroup/configures-server-group-affinity-with-annotations.yaml b/pkg/model/openstackmodel/tests/servergroup/configures-server-group-affinity-with-annotations.yaml index 3ac180d7eb..54d74cd59a 100644 --- a/pkg/model/openstackmodel/tests/servergroup/configures-server-group-affinity-with-annotations.yaml +++ b/pkg/model/openstackmodel/tests/servergroup/configures-server-group-affinity-with-annotations.yaml @@ -30,13 +30,13 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -44,7 +44,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet.cluster Network: null Tag: null @@ -66,7 +66,7 @@ UserData: task: Name: node --- -Lifecycle: null +Lifecycle: "" Name: ca Signer: null alternateNames: null @@ -81,13 +81,13 @@ Name: port-node-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -95,7 +95,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet.cluster Network: null Tag: null diff --git a/pkg/model/openstackmodel/tests/servergroup/multizone-setup-3-masters-3-nodes-without-bastion-auto-zone-distribution.yaml b/pkg/model/openstackmodel/tests/servergroup/multizone-setup-3-masters-3-nodes-without-bastion-auto-zone-distribution.yaml index e89bd3056b..50220020c9 100644 --- a/pkg/model/openstackmodel/tests/servergroup/multizone-setup-3-masters-3-nodes-without-bastion-auto-zone-distribution.yaml +++ b/pkg/model/openstackmodel/tests/servergroup/multizone-setup-3-masters-3-nodes-without-bastion-auto-zone-distribution.yaml @@ -83,19 +83,19 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -103,7 +103,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-a.cluster Network: null Tag: null @@ -164,19 +164,19 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -184,7 +184,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-b.cluster Network: null Tag: null @@ -245,19 +245,19 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -265,7 +265,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-c.cluster Network: null Tag: null @@ -323,13 +323,13 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -337,7 +337,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-a.cluster Network: null Tag: null @@ -395,13 +395,13 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -409,7 +409,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-b.cluster Network: null Tag: null @@ -467,13 +467,13 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -481,7 +481,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-c.cluster Network: null Tag: null @@ -503,7 +503,7 @@ UserData: task: Name: node --- -Lifecycle: null +Lifecycle: "" Name: ca Signer: null alternateNames: null @@ -518,19 +518,19 @@ Name: port-master-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -538,7 +538,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-a.cluster Network: null Tag: null @@ -551,19 +551,19 @@ Name: port-master-2-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -571,7 +571,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-b.cluster Network: null Tag: null @@ -584,19 +584,19 @@ Name: port-master-3-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -604,7 +604,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-c.cluster Network: null Tag: null @@ -617,13 +617,13 @@ Name: port-node-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -631,7 +631,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-a.cluster Network: null Tag: null @@ -644,13 +644,13 @@ Name: port-node-2-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -658,7 +658,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-b.cluster Network: null Tag: null @@ -671,13 +671,13 @@ Name: port-node-3-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -685,7 +685,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-c.cluster Network: null Tag: null diff --git a/pkg/model/openstackmodel/tests/servergroup/multizone-setup-3-masters-3-nodes-without-bastion-with-API-loadbalancer.yaml b/pkg/model/openstackmodel/tests/servergroup/multizone-setup-3-masters-3-nodes-without-bastion-with-API-loadbalancer.yaml index 8c9d3eae2a..bd38aed156 100644 --- a/pkg/model/openstackmodel/tests/servergroup/multizone-setup-3-masters-3-nodes-without-bastion-with-API-loadbalancer.yaml +++ b/pkg/model/openstackmodel/tests/servergroup/multizone-setup-3-masters-3-nodes-without-bastion-with-API-loadbalancer.yaml @@ -21,7 +21,7 @@ LB: SecurityGroup: Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -84,13 +84,13 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false @@ -98,7 +98,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-a.cluster Network: null Tag: null @@ -153,13 +153,13 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false @@ -167,7 +167,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-b.cluster Network: null Tag: null @@ -222,13 +222,13 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false @@ -236,7 +236,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-c.cluster Network: null Tag: null @@ -294,13 +294,13 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -308,7 +308,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-a.cluster Network: null Tag: null @@ -366,13 +366,13 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -380,7 +380,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-b.cluster Network: null Tag: null @@ -438,13 +438,13 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -452,7 +452,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-c.cluster Network: null Tag: null @@ -474,7 +474,7 @@ UserData: task: Name: node-c --- -Lifecycle: null +Lifecycle: "" Name: ca Signer: null alternateNames: null @@ -489,7 +489,7 @@ PortID: null SecurityGroup: Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -511,7 +511,7 @@ Pool: SecurityGroup: Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -529,7 +529,7 @@ Loadbalancer: SecurityGroup: Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -552,7 +552,7 @@ Pool: SecurityGroup: Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -585,7 +585,7 @@ Pool: SecurityGroup: Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -618,7 +618,7 @@ Pool: SecurityGroup: Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -643,13 +643,13 @@ Name: port-master-a-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false @@ -657,7 +657,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-a.cluster Network: null Tag: null @@ -670,13 +670,13 @@ Name: port-master-b-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false @@ -684,7 +684,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-b.cluster Network: null Tag: null @@ -697,13 +697,13 @@ Name: port-master-c-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false @@ -711,7 +711,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-c.cluster Network: null Tag: null @@ -724,13 +724,13 @@ Name: port-node-a-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -738,7 +738,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-a.cluster Network: null Tag: null @@ -751,13 +751,13 @@ Name: port-node-b-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -765,7 +765,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-b.cluster Network: null Tag: null @@ -778,13 +778,13 @@ Name: port-node-c-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -792,7 +792,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-c.cluster Network: null Tag: null diff --git a/pkg/model/openstackmodel/tests/servergroup/multizone-setup-3-masters-3-nodes-without-bastion.yaml b/pkg/model/openstackmodel/tests/servergroup/multizone-setup-3-masters-3-nodes-without-bastion.yaml index 6a45b4127c..ac5b92b98d 100644 --- a/pkg/model/openstackmodel/tests/servergroup/multizone-setup-3-masters-3-nodes-without-bastion.yaml +++ b/pkg/model/openstackmodel/tests/servergroup/multizone-setup-3-masters-3-nodes-without-bastion.yaml @@ -91,19 +91,19 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -111,7 +111,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-a.cluster Network: null Tag: null @@ -172,19 +172,19 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -192,7 +192,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-b.cluster Network: null Tag: null @@ -253,19 +253,19 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -273,7 +273,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-c.cluster Network: null Tag: null @@ -331,13 +331,13 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -345,7 +345,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-a.cluster Network: null Tag: null @@ -403,13 +403,13 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -417,7 +417,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-b.cluster Network: null Tag: null @@ -475,13 +475,13 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -489,7 +489,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-c.cluster Network: null Tag: null @@ -511,7 +511,7 @@ UserData: task: Name: node-c --- -Lifecycle: null +Lifecycle: "" Name: ca Signer: null alternateNames: null @@ -526,19 +526,19 @@ Name: port-master-a-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -546,7 +546,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-a.cluster Network: null Tag: null @@ -559,19 +559,19 @@ Name: port-master-b-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -579,7 +579,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-b.cluster Network: null Tag: null @@ -592,19 +592,19 @@ Name: port-master-c-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -612,7 +612,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-c.cluster Network: null Tag: null @@ -625,13 +625,13 @@ Name: port-node-a-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -639,7 +639,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-a.cluster Network: null Tag: null @@ -652,13 +652,13 @@ Name: port-node-b-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -666,7 +666,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-b.cluster Network: null Tag: null @@ -679,13 +679,13 @@ Name: port-node-c-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -693,7 +693,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-c.cluster Network: null Tag: null diff --git a/pkg/model/openstackmodel/tests/servergroup/multizone-setup-3-masters-3-nodes-without-external-router.yaml b/pkg/model/openstackmodel/tests/servergroup/multizone-setup-3-masters-3-nodes-without-external-router.yaml index f0ff53abe1..578fd38953 100644 --- a/pkg/model/openstackmodel/tests/servergroup/multizone-setup-3-masters-3-nodes-without-external-router.yaml +++ b/pkg/model/openstackmodel/tests/servergroup/multizone-setup-3-masters-3-nodes-without-external-router.yaml @@ -43,19 +43,19 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -63,7 +63,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-a.cluster Network: null Tag: null @@ -118,19 +118,19 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -138,7 +138,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-b.cluster Network: null Tag: null @@ -193,19 +193,19 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -213,7 +213,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-c.cluster Network: null Tag: null @@ -265,13 +265,13 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -279,7 +279,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-a.cluster Network: null Tag: null @@ -331,13 +331,13 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -345,7 +345,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-b.cluster Network: null Tag: null @@ -397,13 +397,13 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -411,7 +411,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-c.cluster Network: null Tag: null @@ -433,7 +433,7 @@ UserData: task: Name: node-c --- -Lifecycle: null +Lifecycle: "" Name: ca Signer: null alternateNames: null @@ -448,19 +448,19 @@ Name: port-master-a-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -468,7 +468,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-a.cluster Network: null Tag: null @@ -481,19 +481,19 @@ Name: port-master-b-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -501,7 +501,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-b.cluster Network: null Tag: null @@ -514,19 +514,19 @@ Name: port-master-c-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -534,7 +534,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-c.cluster Network: null Tag: null @@ -547,13 +547,13 @@ Name: port-node-a-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -561,7 +561,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-a.cluster Network: null Tag: null @@ -574,13 +574,13 @@ Name: port-node-b-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -588,7 +588,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-b.cluster Network: null Tag: null @@ -601,13 +601,13 @@ Name: port-node-c-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -615,7 +615,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet-c.cluster Network: null Tag: null diff --git a/pkg/model/openstackmodel/tests/servergroup/one-master-one-node-one-bastion-2.yaml b/pkg/model/openstackmodel/tests/servergroup/one-master-one-node-one-bastion-2.yaml index efaadd8c82..77000ab910 100644 --- a/pkg/model/openstackmodel/tests/servergroup/one-master-one-node-one-bastion-2.yaml +++ b/pkg/model/openstackmodel/tests/servergroup/one-master-one-node-one-bastion-2.yaml @@ -33,13 +33,13 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: bastion.cluster RemoveExtraRules: null RemoveGroup: false @@ -47,7 +47,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: utility-subnet.cluster Network: null Tag: null @@ -102,19 +102,19 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -122,7 +122,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet.cluster Network: null Tag: null @@ -174,13 +174,13 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -188,7 +188,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet.cluster Network: null Tag: null @@ -210,7 +210,7 @@ UserData: task: Name: node --- -Lifecycle: null +Lifecycle: "" Name: ca Signer: null alternateNames: null @@ -225,13 +225,13 @@ Name: port-bastion-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: bastion.cluster RemoveExtraRules: null RemoveGroup: false @@ -239,7 +239,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: utility-subnet.cluster Network: null Tag: null @@ -252,19 +252,19 @@ Name: port-master-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -272,7 +272,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet.cluster Network: null Tag: null @@ -285,13 +285,13 @@ Name: port-node-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -299,7 +299,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet.cluster Network: null Tag: null diff --git a/pkg/model/openstackmodel/tests/servergroup/one-master-one-node-one-bastion.yaml b/pkg/model/openstackmodel/tests/servergroup/one-master-one-node-one-bastion.yaml index 3bef65ad21..93f5982091 100644 --- a/pkg/model/openstackmodel/tests/servergroup/one-master-one-node-one-bastion.yaml +++ b/pkg/model/openstackmodel/tests/servergroup/one-master-one-node-one-bastion.yaml @@ -53,13 +53,13 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: bastion.cluster RemoveExtraRules: null RemoveGroup: false @@ -67,7 +67,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: utility-subnet.cluster Network: null Tag: null @@ -128,19 +128,19 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -148,7 +148,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet.cluster Network: null Tag: null @@ -200,13 +200,13 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -214,7 +214,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet.cluster Network: null Tag: null @@ -236,7 +236,7 @@ UserData: task: Name: node --- -Lifecycle: null +Lifecycle: "" Name: ca Signer: null alternateNames: null @@ -251,13 +251,13 @@ Name: port-bastion-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: bastion.cluster RemoveExtraRules: null RemoveGroup: false @@ -265,7 +265,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: utility-subnet.cluster Network: null Tag: null @@ -278,19 +278,19 @@ Name: port-master-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -298,7 +298,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet.cluster Network: null Tag: null @@ -311,13 +311,13 @@ Name: port-node-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -325,7 +325,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet.cluster Network: null Tag: null diff --git a/pkg/model/openstackmodel/tests/servergroup/one-master-one-node-without-bastion-no-public-ip-association.yaml b/pkg/model/openstackmodel/tests/servergroup/one-master-one-node-without-bastion-no-public-ip-association.yaml index 0ebbd1317d..201581f1a0 100644 --- a/pkg/model/openstackmodel/tests/servergroup/one-master-one-node-without-bastion-no-public-ip-association.yaml +++ b/pkg/model/openstackmodel/tests/servergroup/one-master-one-node-without-bastion-no-public-ip-association.yaml @@ -35,19 +35,19 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -55,7 +55,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet.cluster Network: null Tag: null @@ -107,13 +107,13 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -121,7 +121,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet.cluster Network: null Tag: null @@ -143,7 +143,7 @@ UserData: task: Name: node --- -Lifecycle: null +Lifecycle: "" Name: ca Signer: null alternateNames: null @@ -158,19 +158,19 @@ Name: port-master-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -178,7 +178,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet.cluster Network: null Tag: null @@ -191,13 +191,13 @@ Name: port-node-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -205,7 +205,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet.cluster Network: null Tag: null diff --git a/pkg/model/openstackmodel/tests/servergroup/one-master-one-node.yaml b/pkg/model/openstackmodel/tests/servergroup/one-master-one-node.yaml index 55f81fa9a8..db8471da11 100644 --- a/pkg/model/openstackmodel/tests/servergroup/one-master-one-node.yaml +++ b/pkg/model/openstackmodel/tests/servergroup/one-master-one-node.yaml @@ -55,19 +55,19 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -75,7 +75,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet.cluster Network: null Tag: null @@ -133,13 +133,13 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -147,7 +147,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet.cluster Network: null Tag: null @@ -169,7 +169,7 @@ UserData: task: Name: node --- -Lifecycle: null +Lifecycle: "" Name: ca Signer: null alternateNames: null @@ -184,19 +184,19 @@ Name: port-master-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: masters.cluster RemoveExtraRules: null RemoveGroup: false - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: master-public-name RemoveExtraRules: null RemoveGroup: false @@ -204,7 +204,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet.cluster Network: null Tag: null @@ -217,13 +217,13 @@ Name: port-node-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -231,7 +231,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet.cluster Network: null Tag: null diff --git a/pkg/model/openstackmodel/tests/servergroup/uses-instance-group-subnet-as-availability-zones-fallback.yaml b/pkg/model/openstackmodel/tests/servergroup/uses-instance-group-subnet-as-availability-zones-fallback.yaml index 0f9ee34b92..f5d9d65c98 100644 --- a/pkg/model/openstackmodel/tests/servergroup/uses-instance-group-subnet-as-availability-zones-fallback.yaml +++ b/pkg/model/openstackmodel/tests/servergroup/uses-instance-group-subnet-as-availability-zones-fallback.yaml @@ -31,13 +31,13 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -45,7 +45,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet.cluster Network: null Tag: null @@ -68,7 +68,7 @@ UserData: task: Name: node --- -Lifecycle: null +Lifecycle: "" Name: ca Signer: null alternateNames: null @@ -84,13 +84,13 @@ Name: port-node-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -98,7 +98,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet.cluster Network: null Tag: null diff --git a/pkg/model/openstackmodel/tests/servergroup/uses-instance-group-zones-as-availability-zones.yaml b/pkg/model/openstackmodel/tests/servergroup/uses-instance-group-zones-as-availability-zones.yaml index 1247fd6e21..60bf8e75c7 100644 --- a/pkg/model/openstackmodel/tests/servergroup/uses-instance-group-zones-as-availability-zones.yaml +++ b/pkg/model/openstackmodel/tests/servergroup/uses-instance-group-zones-as-availability-zones.yaml @@ -31,13 +31,13 @@ Port: Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -45,7 +45,7 @@ Port: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet.cluster Network: null Tag: null @@ -68,7 +68,7 @@ UserData: task: Name: node --- -Lifecycle: null +Lifecycle: "" Name: ca Signer: null alternateNames: null @@ -84,13 +84,13 @@ Name: port-node-1-cluster Network: AvailabilityZoneHints: null ID: null - Lifecycle: null + Lifecycle: "" Name: cluster Tag: null SecurityGroups: - Description: null ID: null - Lifecycle: null + Lifecycle: "" Name: nodes.cluster RemoveExtraRules: null RemoveGroup: false @@ -98,7 +98,7 @@ Subnets: - CIDR: null DNSServers: null ID: null - Lifecycle: null + Lifecycle: "" Name: subnet.cluster Network: null Tag: null diff --git a/pkg/model/pki.go b/pkg/model/pki.go index 0d4621dfc2..146f41fcb5 100644 --- a/pkg/model/pki.go +++ b/pkg/model/pki.go @@ -30,7 +30,7 @@ import ( // PKIModelBuilder configures PKI keypairs, as well as tokens type PKIModelBuilder struct { *KopsModelContext - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.ModelBuilder = &PKIModelBuilder{} diff --git a/upup/pkg/fi/assettasks/copyfile.go b/upup/pkg/fi/assettasks/copyfile.go index 544697ed69..6bf1973ba4 100644 --- a/upup/pkg/fi/assettasks/copyfile.go +++ b/upup/pkg/fi/assettasks/copyfile.go @@ -38,7 +38,7 @@ type CopyFile struct { SourceFile *string TargetFile *string SHA *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.CompareWithID = &CopyFile{} diff --git a/upup/pkg/fi/assettasks/copyfile_fitask.go b/upup/pkg/fi/assettasks/copyfile_fitask.go index dacc9c96e5..45fb321916 100644 --- a/upup/pkg/fi/assettasks/copyfile_fitask.go +++ b/upup/pkg/fi/assettasks/copyfile_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &CopyFile{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *CopyFile) GetLifecycle() *fi.Lifecycle { +func (o *CopyFile) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *CopyFile) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &CopyFile{} diff --git a/upup/pkg/fi/assettasks/copyimage.go b/upup/pkg/fi/assettasks/copyimage.go index cf224cb02f..0edd513880 100644 --- a/upup/pkg/fi/assettasks/copyimage.go +++ b/upup/pkg/fi/assettasks/copyimage.go @@ -30,7 +30,7 @@ type CopyImage struct { Name *string SourceImage *string TargetImage *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.CompareWithID = &CopyImage{} diff --git a/upup/pkg/fi/assettasks/copyimage_fitask.go b/upup/pkg/fi/assettasks/copyimage_fitask.go index 8c4ef168c5..9e8e470d73 100644 --- a/upup/pkg/fi/assettasks/copyimage_fitask.go +++ b/upup/pkg/fi/assettasks/copyimage_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &CopyImage{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *CopyImage) GetLifecycle() *fi.Lifecycle { +func (o *CopyImage) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *CopyImage) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &CopyImage{} diff --git a/upup/pkg/fi/cloudup/alitasks/disk.go b/upup/pkg/fi/cloudup/alitasks/disk.go index a539e389dc..0f147c97af 100644 --- a/upup/pkg/fi/cloudup/alitasks/disk.go +++ b/upup/pkg/fi/cloudup/alitasks/disk.go @@ -36,7 +36,7 @@ const ( // Disk represents an ALI Cloud Disk. // +kops:fitask type Disk struct { - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Name *string DiskId *string ZoneId *string diff --git a/upup/pkg/fi/cloudup/alitasks/disk_fitask.go b/upup/pkg/fi/cloudup/alitasks/disk_fitask.go index b96ba5d2b7..aad444a071 100644 --- a/upup/pkg/fi/cloudup/alitasks/disk_fitask.go +++ b/upup/pkg/fi/cloudup/alitasks/disk_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &Disk{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *Disk) GetLifecycle() *fi.Lifecycle { +func (o *Disk) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *Disk) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &Disk{} diff --git a/upup/pkg/fi/cloudup/alitasks/eip_fitask.go b/upup/pkg/fi/cloudup/alitasks/eip_fitask.go index fb9fa44df7..58f5762e00 100644 --- a/upup/pkg/fi/cloudup/alitasks/eip_fitask.go +++ b/upup/pkg/fi/cloudup/alitasks/eip_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &EIP{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *EIP) GetLifecycle() *fi.Lifecycle { +func (o *EIP) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *EIP) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &EIP{} diff --git a/upup/pkg/fi/cloudup/alitasks/eip_natgateway_association.go b/upup/pkg/fi/cloudup/alitasks/eip_natgateway_association.go index 733778d7ad..b705aaebbd 100644 --- a/upup/pkg/fi/cloudup/alitasks/eip_natgateway_association.go +++ b/upup/pkg/fi/cloudup/alitasks/eip_natgateway_association.go @@ -35,7 +35,7 @@ const ( // +kops:fitask type EIP struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Region *string ID *string diff --git a/upup/pkg/fi/cloudup/alitasks/launchconfiguration.go b/upup/pkg/fi/cloudup/alitasks/launchconfiguration.go index 36aa4f5634..29a4a7b9d1 100644 --- a/upup/pkg/fi/cloudup/alitasks/launchconfiguration.go +++ b/upup/pkg/fi/cloudup/alitasks/launchconfiguration.go @@ -54,7 +54,7 @@ func RetainLaunchConfigurationCount() int { // LaunchConfiguration is the specification for a launch configuration // +kops:fitask type LaunchConfiguration struct { - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ID *string Name *string diff --git a/upup/pkg/fi/cloudup/alitasks/launchconfiguration_fitask.go b/upup/pkg/fi/cloudup/alitasks/launchconfiguration_fitask.go index 83f7832236..cae6df9487 100644 --- a/upup/pkg/fi/cloudup/alitasks/launchconfiguration_fitask.go +++ b/upup/pkg/fi/cloudup/alitasks/launchconfiguration_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &LaunchConfiguration{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *LaunchConfiguration) GetLifecycle() *fi.Lifecycle { +func (o *LaunchConfiguration) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *LaunchConfiguration) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &LaunchConfiguration{} diff --git a/upup/pkg/fi/cloudup/alitasks/loadbalancer.go b/upup/pkg/fi/cloudup/alitasks/loadbalancer.go index 33f700fc51..ffab718bcb 100644 --- a/upup/pkg/fi/cloudup/alitasks/loadbalancer.go +++ b/upup/pkg/fi/cloudup/alitasks/loadbalancer.go @@ -38,7 +38,7 @@ type LoadBalancer struct { AddressType *string VSwitchId *string LoadBalancerAddress *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Tags map[string]string ForAPIServer bool } diff --git a/upup/pkg/fi/cloudup/alitasks/loadbalancer_fitask.go b/upup/pkg/fi/cloudup/alitasks/loadbalancer_fitask.go index 9981ead7f8..1c78d72b1a 100644 --- a/upup/pkg/fi/cloudup/alitasks/loadbalancer_fitask.go +++ b/upup/pkg/fi/cloudup/alitasks/loadbalancer_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &LoadBalancer{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *LoadBalancer) GetLifecycle() *fi.Lifecycle { +func (o *LoadBalancer) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *LoadBalancer) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &LoadBalancer{} diff --git a/upup/pkg/fi/cloudup/alitasks/loadbalanceracl.go b/upup/pkg/fi/cloudup/alitasks/loadbalanceracl.go index f445eb641e..10c0cf5050 100644 --- a/upup/pkg/fi/cloudup/alitasks/loadbalanceracl.go +++ b/upup/pkg/fi/cloudup/alitasks/loadbalanceracl.go @@ -37,7 +37,7 @@ type LoadBalancerACL struct { LoadBalancer *LoadBalancer LoadBalancerListener *LoadBalancerListener SourceItems []*string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } type AclEntry struct { diff --git a/upup/pkg/fi/cloudup/alitasks/loadbalanceracl_fitask.go b/upup/pkg/fi/cloudup/alitasks/loadbalanceracl_fitask.go index e7cd406774..513921f856 100644 --- a/upup/pkg/fi/cloudup/alitasks/loadbalanceracl_fitask.go +++ b/upup/pkg/fi/cloudup/alitasks/loadbalanceracl_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &LoadBalancerACL{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *LoadBalancerACL) GetLifecycle() *fi.Lifecycle { +func (o *LoadBalancerACL) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *LoadBalancerACL) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &LoadBalancerACL{} diff --git a/upup/pkg/fi/cloudup/alitasks/loadbalancerlistener.go b/upup/pkg/fi/cloudup/alitasks/loadbalancerlistener.go index 5015a914b4..e84e2023dd 100644 --- a/upup/pkg/fi/cloudup/alitasks/loadbalancerlistener.go +++ b/upup/pkg/fi/cloudup/alitasks/loadbalancerlistener.go @@ -37,7 +37,7 @@ type LoadBalancerListener struct { Name *string ListenerPort *int BackendServerPort *int - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ListenerStatus *string Bandwidth *int } diff --git a/upup/pkg/fi/cloudup/alitasks/loadbalancerlistener_fitask.go b/upup/pkg/fi/cloudup/alitasks/loadbalancerlistener_fitask.go index 5b3eca6492..21cb583e9e 100644 --- a/upup/pkg/fi/cloudup/alitasks/loadbalancerlistener_fitask.go +++ b/upup/pkg/fi/cloudup/alitasks/loadbalancerlistener_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &LoadBalancerListener{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *LoadBalancerListener) GetLifecycle() *fi.Lifecycle { +func (o *LoadBalancerListener) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *LoadBalancerListener) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &LoadBalancerListener{} diff --git a/upup/pkg/fi/cloudup/alitasks/natgateway.go b/upup/pkg/fi/cloudup/alitasks/natgateway.go index b5c1c4a8b4..10483de2f1 100644 --- a/upup/pkg/fi/cloudup/alitasks/natgateway.go +++ b/upup/pkg/fi/cloudup/alitasks/natgateway.go @@ -31,7 +31,7 @@ import ( // +kops:fitask type NatGateway struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle VPC *VPC Region *string diff --git a/upup/pkg/fi/cloudup/alitasks/natgateway_fitask.go b/upup/pkg/fi/cloudup/alitasks/natgateway_fitask.go index d1440afbff..280eb73192 100644 --- a/upup/pkg/fi/cloudup/alitasks/natgateway_fitask.go +++ b/upup/pkg/fi/cloudup/alitasks/natgateway_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &NatGateway{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *NatGateway) GetLifecycle() *fi.Lifecycle { +func (o *NatGateway) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *NatGateway) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &NatGateway{} diff --git a/upup/pkg/fi/cloudup/alitasks/rampolicy.go b/upup/pkg/fi/cloudup/alitasks/rampolicy.go index 67181f7f05..8895ba8a17 100644 --- a/upup/pkg/fi/cloudup/alitasks/rampolicy.go +++ b/upup/pkg/fi/cloudup/alitasks/rampolicy.go @@ -32,7 +32,7 @@ import ( // +kops:fitask type RAMPolicy struct { - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Name *string RamRole *RAMRole PolicyType *string diff --git a/upup/pkg/fi/cloudup/alitasks/rampolicy_fitask.go b/upup/pkg/fi/cloudup/alitasks/rampolicy_fitask.go index 08b96b5a4f..5ca4618740 100644 --- a/upup/pkg/fi/cloudup/alitasks/rampolicy_fitask.go +++ b/upup/pkg/fi/cloudup/alitasks/rampolicy_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &RAMPolicy{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *RAMPolicy) GetLifecycle() *fi.Lifecycle { +func (o *RAMPolicy) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *RAMPolicy) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &RAMPolicy{} diff --git a/upup/pkg/fi/cloudup/alitasks/ramrole.go b/upup/pkg/fi/cloudup/alitasks/ramrole.go index a381de76da..0ce2fcd498 100644 --- a/upup/pkg/fi/cloudup/alitasks/ramrole.go +++ b/upup/pkg/fi/cloudup/alitasks/ramrole.go @@ -33,7 +33,7 @@ import ( // +kops:fitask type RAMRole struct { ID *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Name *string AssumeRolePolicyDocument *string } diff --git a/upup/pkg/fi/cloudup/alitasks/ramrole_fitask.go b/upup/pkg/fi/cloudup/alitasks/ramrole_fitask.go index 32d5d118ec..9b67cf973a 100644 --- a/upup/pkg/fi/cloudup/alitasks/ramrole_fitask.go +++ b/upup/pkg/fi/cloudup/alitasks/ramrole_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &RAMRole{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *RAMRole) GetLifecycle() *fi.Lifecycle { +func (o *RAMRole) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *RAMRole) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &RAMRole{} diff --git a/upup/pkg/fi/cloudup/alitasks/scalinggroup.go b/upup/pkg/fi/cloudup/alitasks/scalinggroup.go index 8a42e6b547..6ad0b939b0 100644 --- a/upup/pkg/fi/cloudup/alitasks/scalinggroup.go +++ b/upup/pkg/fi/cloudup/alitasks/scalinggroup.go @@ -34,7 +34,7 @@ import ( // +kops:fitask type ScalingGroup struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ScalingGroupId *string LoadBalancer *LoadBalancer VSwitchs []*VSwitch diff --git a/upup/pkg/fi/cloudup/alitasks/scalinggroup_fitask.go b/upup/pkg/fi/cloudup/alitasks/scalinggroup_fitask.go index cf6b8b4720..e441636077 100644 --- a/upup/pkg/fi/cloudup/alitasks/scalinggroup_fitask.go +++ b/upup/pkg/fi/cloudup/alitasks/scalinggroup_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &ScalingGroup{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *ScalingGroup) GetLifecycle() *fi.Lifecycle { +func (o *ScalingGroup) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *ScalingGroup) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &ScalingGroup{} diff --git a/upup/pkg/fi/cloudup/alitasks/securitygroup.go b/upup/pkg/fi/cloudup/alitasks/securitygroup.go index 4247d5924a..94c7bec536 100644 --- a/upup/pkg/fi/cloudup/alitasks/securitygroup.go +++ b/upup/pkg/fi/cloudup/alitasks/securitygroup.go @@ -36,7 +36,7 @@ const SecurityResource = "securitygroup" type SecurityGroup struct { Name *string SecurityGroupId *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle VPC *VPC Tags map[string]string } diff --git a/upup/pkg/fi/cloudup/alitasks/securitygroup_fitask.go b/upup/pkg/fi/cloudup/alitasks/securitygroup_fitask.go index 4be3866869..7898efd894 100644 --- a/upup/pkg/fi/cloudup/alitasks/securitygroup_fitask.go +++ b/upup/pkg/fi/cloudup/alitasks/securitygroup_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &SecurityGroup{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *SecurityGroup) GetLifecycle() *fi.Lifecycle { +func (o *SecurityGroup) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *SecurityGroup) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &SecurityGroup{} diff --git a/upup/pkg/fi/cloudup/alitasks/securitygrouprule.go b/upup/pkg/fi/cloudup/alitasks/securitygrouprule.go index 0b0e9cd6cf..063756d2cd 100644 --- a/upup/pkg/fi/cloudup/alitasks/securitygrouprule.go +++ b/upup/pkg/fi/cloudup/alitasks/securitygrouprule.go @@ -37,7 +37,7 @@ type SecurityGroupRule struct { SourceCidrIp *string SecurityGroup *SecurityGroup SourceGroup *SecurityGroup - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle PortRange *string In *bool } diff --git a/upup/pkg/fi/cloudup/alitasks/securitygrouprule_fitask.go b/upup/pkg/fi/cloudup/alitasks/securitygrouprule_fitask.go index 4e31a605e9..01671b0a67 100644 --- a/upup/pkg/fi/cloudup/alitasks/securitygrouprule_fitask.go +++ b/upup/pkg/fi/cloudup/alitasks/securitygrouprule_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &SecurityGroupRule{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *SecurityGroupRule) GetLifecycle() *fi.Lifecycle { +func (o *SecurityGroupRule) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *SecurityGroupRule) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &SecurityGroupRule{} diff --git a/upup/pkg/fi/cloudup/alitasks/sshkey.go b/upup/pkg/fi/cloudup/alitasks/sshkey.go index b4f40a46c7..254e75853d 100644 --- a/upup/pkg/fi/cloudup/alitasks/sshkey.go +++ b/upup/pkg/fi/cloudup/alitasks/sshkey.go @@ -34,7 +34,7 @@ import ( // +kops:fitask type SSHKey struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle PublicKey fi.Resource KeyPairFingerPrint *string } diff --git a/upup/pkg/fi/cloudup/alitasks/sshkey_fitask.go b/upup/pkg/fi/cloudup/alitasks/sshkey_fitask.go index 8aea7613d4..f7626ebf2a 100644 --- a/upup/pkg/fi/cloudup/alitasks/sshkey_fitask.go +++ b/upup/pkg/fi/cloudup/alitasks/sshkey_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &SSHKey{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *SSHKey) GetLifecycle() *fi.Lifecycle { +func (o *SSHKey) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *SSHKey) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &SSHKey{} diff --git a/upup/pkg/fi/cloudup/alitasks/vpc.go b/upup/pkg/fi/cloudup/alitasks/vpc.go index c56a80d498..8a8ce8b1a9 100644 --- a/upup/pkg/fi/cloudup/alitasks/vpc.go +++ b/upup/pkg/fi/cloudup/alitasks/vpc.go @@ -31,7 +31,7 @@ import ( // +kops:fitask type VPC struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ID *string Region *string diff --git a/upup/pkg/fi/cloudup/alitasks/vpc_fitask.go b/upup/pkg/fi/cloudup/alitasks/vpc_fitask.go index 399d25b869..ef6a979e88 100644 --- a/upup/pkg/fi/cloudup/alitasks/vpc_fitask.go +++ b/upup/pkg/fi/cloudup/alitasks/vpc_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &VPC{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *VPC) GetLifecycle() *fi.Lifecycle { +func (o *VPC) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *VPC) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &VPC{} diff --git a/upup/pkg/fi/cloudup/alitasks/vswitch.go b/upup/pkg/fi/cloudup/alitasks/vswitch.go index 22f4021ebc..12a951d4ba 100644 --- a/upup/pkg/fi/cloudup/alitasks/vswitch.go +++ b/upup/pkg/fi/cloudup/alitasks/vswitch.go @@ -34,7 +34,7 @@ type VSwitch struct { Name *string VSwitchId *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ZoneId *string CidrBlock *string diff --git a/upup/pkg/fi/cloudup/alitasks/vswitchSNAT.go b/upup/pkg/fi/cloudup/alitasks/vswitchSNAT.go index fa7978dfce..d4bcbc433b 100644 --- a/upup/pkg/fi/cloudup/alitasks/vswitchSNAT.go +++ b/upup/pkg/fi/cloudup/alitasks/vswitchSNAT.go @@ -32,7 +32,7 @@ import ( // +kops:fitask type VSwitchSNAT struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ID *string VSwitch *VSwitch diff --git a/upup/pkg/fi/cloudup/alitasks/vswitch_fitask.go b/upup/pkg/fi/cloudup/alitasks/vswitch_fitask.go index 61d6fdcf14..5b1e0b35db 100644 --- a/upup/pkg/fi/cloudup/alitasks/vswitch_fitask.go +++ b/upup/pkg/fi/cloudup/alitasks/vswitch_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &VSwitch{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *VSwitch) GetLifecycle() *fi.Lifecycle { +func (o *VSwitch) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *VSwitch) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &VSwitch{} diff --git a/upup/pkg/fi/cloudup/alitasks/vswitchsnat_fitask.go b/upup/pkg/fi/cloudup/alitasks/vswitchsnat_fitask.go index ad949226b2..8ce99fbf8f 100644 --- a/upup/pkg/fi/cloudup/alitasks/vswitchsnat_fitask.go +++ b/upup/pkg/fi/cloudup/alitasks/vswitchsnat_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &VSwitchSNAT{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *VSwitchSNAT) GetLifecycle() *fi.Lifecycle { +func (o *VSwitchSNAT) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *VSwitchSNAT) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &VSwitchSNAT{} diff --git a/upup/pkg/fi/cloudup/apply_cluster.go b/upup/pkg/fi/cloudup/apply_cluster.go index b3bf2249fd..8877b92f03 100644 --- a/upup/pkg/fi/cloudup/apply_cluster.go +++ b/upup/pkg/fi/cloudup/apply_cluster.go @@ -516,7 +516,7 @@ func (c *ApplyClusterCmd) Run(ctx context.Context) error { bcb := bootstrapchannelbuilder.NewBootstrapChannelBuilder( modelContext, - &clusterLifecycle, + clusterLifecycle, assetBuilder, templates, addons, @@ -527,24 +527,24 @@ func (c *ApplyClusterCmd) Run(ctx context.Context) error { bcb, &model.PKIModelBuilder{ KopsModelContext: modelContext, - Lifecycle: &clusterLifecycle, + Lifecycle: clusterLifecycle, }, &model.IssuerDiscoveryModelBuilder{ KopsModelContext: modelContext, - Lifecycle: &clusterLifecycle, + Lifecycle: clusterLifecycle, Cluster: cluster, }, &kubeapiserver.KubeApiserverBuilder{ AssetBuilder: assetBuilder, KopsModelContext: modelContext, - Lifecycle: &clusterLifecycle, + Lifecycle: clusterLifecycle, }, &etcdmanager.EtcdManagerBuilder{ AssetBuilder: assetBuilder, KopsModelContext: modelContext, - Lifecycle: &clusterLifecycle, + Lifecycle: clusterLifecycle, }, - &model.MasterVolumeBuilder{KopsModelContext: modelContext, Lifecycle: &clusterLifecycle}, + &model.MasterVolumeBuilder{KopsModelContext: modelContext, Lifecycle: clusterLifecycle}, ) switch kops.CloudProviderID(cluster.Spec.CloudProvider) { @@ -554,22 +554,22 @@ func (c *ApplyClusterCmd) Run(ctx context.Context) error { } l.Builders = append(l.Builders, - &awsmodel.APILoadBalancerBuilder{AWSModelContext: awsModelContext, Lifecycle: &clusterLifecycle, SecurityLifecycle: &securityLifecycle}, - &awsmodel.BastionModelBuilder{AWSModelContext: awsModelContext, Lifecycle: &clusterLifecycle, SecurityLifecycle: &securityLifecycle}, - &awsmodel.DNSModelBuilder{AWSModelContext: awsModelContext, Lifecycle: &clusterLifecycle}, - &awsmodel.ExternalAccessModelBuilder{AWSModelContext: awsModelContext, Lifecycle: &securityLifecycle}, - &awsmodel.FirewallModelBuilder{AWSModelContext: awsModelContext, Lifecycle: &securityLifecycle}, - &awsmodel.SSHKeyModelBuilder{AWSModelContext: awsModelContext, Lifecycle: &securityLifecycle}, - &awsmodel.NetworkModelBuilder{AWSModelContext: awsModelContext, Lifecycle: &networkLifecycle}, - &awsmodel.IAMModelBuilder{AWSModelContext: awsModelContext, Lifecycle: &securityLifecycle, Cluster: cluster}, - &awsmodel.OIDCProviderBuilder{AWSModelContext: awsModelContext, Lifecycle: &securityLifecycle, KeyStore: keyStore}, + &awsmodel.APILoadBalancerBuilder{AWSModelContext: awsModelContext, Lifecycle: clusterLifecycle, SecurityLifecycle: securityLifecycle}, + &awsmodel.BastionModelBuilder{AWSModelContext: awsModelContext, Lifecycle: clusterLifecycle, SecurityLifecycle: securityLifecycle}, + &awsmodel.DNSModelBuilder{AWSModelContext: awsModelContext, Lifecycle: clusterLifecycle}, + &awsmodel.ExternalAccessModelBuilder{AWSModelContext: awsModelContext, Lifecycle: securityLifecycle}, + &awsmodel.FirewallModelBuilder{AWSModelContext: awsModelContext, Lifecycle: securityLifecycle}, + &awsmodel.SSHKeyModelBuilder{AWSModelContext: awsModelContext, Lifecycle: securityLifecycle}, + &awsmodel.NetworkModelBuilder{AWSModelContext: awsModelContext, Lifecycle: networkLifecycle}, + &awsmodel.IAMModelBuilder{AWSModelContext: awsModelContext, Lifecycle: securityLifecycle, Cluster: cluster}, + &awsmodel.OIDCProviderBuilder{AWSModelContext: awsModelContext, Lifecycle: securityLifecycle, KeyStore: keyStore}, ) awsModelBuilder := &awsmodel.AutoscalingGroupModelBuilder{ AWSModelContext: awsModelContext, BootstrapScriptBuilder: bootstrapScriptBuilder, - Lifecycle: &clusterLifecycle, - SecurityLifecycle: &securityLifecycle, + Lifecycle: clusterLifecycle, + SecurityLifecycle: securityLifecycle, Cluster: cluster, } @@ -577,8 +577,8 @@ func (c *ApplyClusterCmd) Run(ctx context.Context) error { l.Builders = append(l.Builders, &awsmodel.SpotInstanceGroupModelBuilder{ AWSModelContext: awsModelContext, BootstrapScriptBuilder: bootstrapScriptBuilder, - Lifecycle: &clusterLifecycle, - SecurityLifecycle: &securityLifecycle, + Lifecycle: clusterLifecycle, + SecurityLifecycle: securityLifecycle, }) if featureflag.SpotinstHybrid.Enabled() { @@ -592,7 +592,7 @@ func (c *ApplyClusterCmd) Run(ctx context.Context) error { if nth != nil && fi.BoolValue(nth.Enabled) && fi.BoolValue(nth.EnableSQSTerminationDraining) { l.Builders = append(l.Builders, &awsmodel.NodeTerminationHandlerBuilder{ AWSModelContext: awsModelContext, - Lifecycle: &clusterLifecycle, + Lifecycle: clusterLifecycle, }) } @@ -601,8 +601,8 @@ func (c *ApplyClusterCmd) Run(ctx context.Context) error { KopsModelContext: modelContext, } l.Builders = append(l.Builders, - &domodel.APILoadBalancerModelBuilder{DOModelContext: doModelContext, Lifecycle: &securityLifecycle}, - &domodel.DropletBuilder{DOModelContext: doModelContext, BootstrapScriptBuilder: bootstrapScriptBuilder, Lifecycle: &clusterLifecycle}, + &domodel.APILoadBalancerModelBuilder{DOModelContext: doModelContext, Lifecycle: securityLifecycle}, + &domodel.DropletBuilder{DOModelContext: doModelContext, BootstrapScriptBuilder: bootstrapScriptBuilder, Lifecycle: clusterLifecycle}, ) case kops.CloudProviderGCE: gceModelContext := &gcemodel.GCEModelContext{ @@ -617,25 +617,25 @@ func (c *ApplyClusterCmd) Run(ctx context.Context) error { l.Builders = append(l.Builders, - &gcemodel.APILoadBalancerBuilder{GCEModelContext: gceModelContext, Lifecycle: &securityLifecycle}, - &gcemodel.ExternalAccessModelBuilder{GCEModelContext: gceModelContext, Lifecycle: &securityLifecycle}, - &gcemodel.FirewallModelBuilder{GCEModelContext: gceModelContext, Lifecycle: &securityLifecycle}, - &gcemodel.NetworkModelBuilder{GCEModelContext: gceModelContext, Lifecycle: &networkLifecycle}, - &gcemodel.StorageAclBuilder{GCEModelContext: gceModelContext, Cloud: cloud.(gce.GCECloud), Lifecycle: &storageACLLifecycle}, - &gcemodel.AutoscalingGroupModelBuilder{GCEModelContext: gceModelContext, BootstrapScriptBuilder: bootstrapScriptBuilder, Lifecycle: &clusterLifecycle}, + &gcemodel.APILoadBalancerBuilder{GCEModelContext: gceModelContext, Lifecycle: securityLifecycle}, + &gcemodel.ExternalAccessModelBuilder{GCEModelContext: gceModelContext, Lifecycle: securityLifecycle}, + &gcemodel.FirewallModelBuilder{GCEModelContext: gceModelContext, Lifecycle: securityLifecycle}, + &gcemodel.NetworkModelBuilder{GCEModelContext: gceModelContext, Lifecycle: networkLifecycle}, + &gcemodel.StorageAclBuilder{GCEModelContext: gceModelContext, Cloud: cloud.(gce.GCECloud), Lifecycle: storageACLLifecycle}, + &gcemodel.AutoscalingGroupModelBuilder{GCEModelContext: gceModelContext, BootstrapScriptBuilder: bootstrapScriptBuilder, Lifecycle: clusterLifecycle}, ) case kops.CloudProviderALI: aliModelContext := &alimodel.ALIModelContext{ KopsModelContext: modelContext, } l.Builders = append(l.Builders, - &alimodel.APILoadBalancerModelBuilder{ALIModelContext: aliModelContext, Lifecycle: &clusterLifecycle}, - &alimodel.NetworkModelBuilder{ALIModelContext: aliModelContext, Lifecycle: &clusterLifecycle}, - &alimodel.RAMModelBuilder{ALIModelContext: aliModelContext, Lifecycle: &clusterLifecycle}, - &alimodel.SSHKeyModelBuilder{ALIModelContext: aliModelContext, Lifecycle: &clusterLifecycle}, - &alimodel.FirewallModelBuilder{ALIModelContext: aliModelContext, Lifecycle: &clusterLifecycle}, - &alimodel.ExternalAccessModelBuilder{ALIModelContext: aliModelContext, Lifecycle: &clusterLifecycle}, - &alimodel.ScalingGroupModelBuilder{ALIModelContext: aliModelContext, BootstrapScriptBuilder: bootstrapScriptBuilder, Lifecycle: &clusterLifecycle}, + &alimodel.APILoadBalancerModelBuilder{ALIModelContext: aliModelContext, Lifecycle: clusterLifecycle}, + &alimodel.NetworkModelBuilder{ALIModelContext: aliModelContext, Lifecycle: clusterLifecycle}, + &alimodel.RAMModelBuilder{ALIModelContext: aliModelContext, Lifecycle: clusterLifecycle}, + &alimodel.SSHKeyModelBuilder{ALIModelContext: aliModelContext, Lifecycle: clusterLifecycle}, + &alimodel.FirewallModelBuilder{ALIModelContext: aliModelContext, Lifecycle: clusterLifecycle}, + &alimodel.ExternalAccessModelBuilder{ALIModelContext: aliModelContext, Lifecycle: clusterLifecycle}, + &alimodel.ScalingGroupModelBuilder{ALIModelContext: aliModelContext, BootstrapScriptBuilder: bootstrapScriptBuilder, Lifecycle: clusterLifecycle}, ) case kops.CloudProviderAzure: @@ -643,11 +643,11 @@ func (c *ApplyClusterCmd) Run(ctx context.Context) error { KopsModelContext: modelContext, } l.Builders = append(l.Builders, - &azuremodel.APILoadBalancerModelBuilder{AzureModelContext: azureModelContext, Lifecycle: &clusterLifecycle}, - &azuremodel.NetworkModelBuilder{AzureModelContext: azureModelContext, Lifecycle: &clusterLifecycle}, - &azuremodel.ResourceGroupModelBuilder{AzureModelContext: azureModelContext, Lifecycle: &clusterLifecycle}, + &azuremodel.APILoadBalancerModelBuilder{AzureModelContext: azureModelContext, Lifecycle: clusterLifecycle}, + &azuremodel.NetworkModelBuilder{AzureModelContext: azureModelContext, Lifecycle: clusterLifecycle}, + &azuremodel.ResourceGroupModelBuilder{AzureModelContext: azureModelContext, Lifecycle: clusterLifecycle}, - &azuremodel.VMScaleSetModelBuilder{AzureModelContext: azureModelContext, BootstrapScriptBuilder: bootstrapScriptBuilder, Lifecycle: &clusterLifecycle}, + &azuremodel.VMScaleSetModelBuilder{AzureModelContext: azureModelContext, BootstrapScriptBuilder: bootstrapScriptBuilder, Lifecycle: clusterLifecycle}, ) case kops.CloudProviderOpenstack: openstackModelContext := &openstackmodel.OpenstackModelContext{ @@ -655,17 +655,17 @@ func (c *ApplyClusterCmd) Run(ctx context.Context) error { } l.Builders = append(l.Builders, - &openstackmodel.NetworkModelBuilder{OpenstackModelContext: openstackModelContext, Lifecycle: &networkLifecycle}, - &openstackmodel.SSHKeyModelBuilder{OpenstackModelContext: openstackModelContext, Lifecycle: &securityLifecycle}, - &openstackmodel.FirewallModelBuilder{OpenstackModelContext: openstackModelContext, Lifecycle: &securityLifecycle}, - &openstackmodel.ServerGroupModelBuilder{OpenstackModelContext: openstackModelContext, BootstrapScriptBuilder: bootstrapScriptBuilder, Lifecycle: &clusterLifecycle}, + &openstackmodel.NetworkModelBuilder{OpenstackModelContext: openstackModelContext, Lifecycle: networkLifecycle}, + &openstackmodel.SSHKeyModelBuilder{OpenstackModelContext: openstackModelContext, Lifecycle: securityLifecycle}, + &openstackmodel.FirewallModelBuilder{OpenstackModelContext: openstackModelContext, Lifecycle: securityLifecycle}, + &openstackmodel.ServerGroupModelBuilder{OpenstackModelContext: openstackModelContext, BootstrapScriptBuilder: bootstrapScriptBuilder, Lifecycle: clusterLifecycle}, ) default: return fmt.Errorf("unknown cloudprovider %q", cluster.Spec.CloudProvider) } } - c.TaskMap, err = l.BuildTasks(assetBuilder, &stageAssetsLifecycle, c.LifecycleOverrides) + c.TaskMap, err = l.BuildTasks(assetBuilder, stageAssetsLifecycle, c.LifecycleOverrides) if err != nil { return fmt.Errorf("error building tasks: %v", err) } diff --git a/upup/pkg/fi/cloudup/awstasks/autoscalinggroup.go b/upup/pkg/fi/cloudup/awstasks/autoscalinggroup.go index 1f92e4bb51..f5fde56dd3 100644 --- a/upup/pkg/fi/cloudup/awstasks/autoscalinggroup.go +++ b/upup/pkg/fi/cloudup/awstasks/autoscalinggroup.go @@ -42,7 +42,7 @@ type AutoscalingGroup struct { // Name is the name of the ASG Name *string // Lifecycle is the resource lifecycle - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle // Granularity specifys the granularity of the metrics Granularity *string diff --git a/upup/pkg/fi/cloudup/awstasks/autoscalinggroup_fitask.go b/upup/pkg/fi/cloudup/awstasks/autoscalinggroup_fitask.go index c62e4bfed6..7f9bb5b9cf 100644 --- a/upup/pkg/fi/cloudup/awstasks/autoscalinggroup_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/autoscalinggroup_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &AutoscalingGroup{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *AutoscalingGroup) GetLifecycle() *fi.Lifecycle { +func (o *AutoscalingGroup) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *AutoscalingGroup) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &AutoscalingGroup{} diff --git a/upup/pkg/fi/cloudup/awstasks/autoscalinglifecyclehook.go b/upup/pkg/fi/cloudup/awstasks/autoscalinglifecyclehook.go index 28356e832b..b55aab2ee0 100644 --- a/upup/pkg/fi/cloudup/awstasks/autoscalinglifecyclehook.go +++ b/upup/pkg/fi/cloudup/awstasks/autoscalinglifecyclehook.go @@ -32,7 +32,7 @@ import ( type AutoscalingLifecycleHook struct { ID *string Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle // HookName is the name of the lifecycle hook. // It needs to be unique within the autoscaling group. diff --git a/upup/pkg/fi/cloudup/awstasks/autoscalinglifecyclehook_fitask.go b/upup/pkg/fi/cloudup/awstasks/autoscalinglifecyclehook_fitask.go index 1514b11771..0e8985ca58 100644 --- a/upup/pkg/fi/cloudup/awstasks/autoscalinglifecyclehook_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/autoscalinglifecyclehook_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &AutoscalingLifecycleHook{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *AutoscalingLifecycleHook) GetLifecycle() *fi.Lifecycle { +func (o *AutoscalingLifecycleHook) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *AutoscalingLifecycleHook) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &AutoscalingLifecycleHook{} diff --git a/upup/pkg/fi/cloudup/awstasks/classic_load_balancer.go b/upup/pkg/fi/cloudup/awstasks/classic_load_balancer.go index cad49f869f..4f2ee6fccf 100644 --- a/upup/pkg/fi/cloudup/awstasks/classic_load_balancer.go +++ b/upup/pkg/fi/cloudup/awstasks/classic_load_balancer.go @@ -44,7 +44,7 @@ type ClassicLoadBalancer struct { // We use the Name tag to find the existing ELB, because we are (more or less) unrestricted when // it comes to tag values, but the LoadBalancerName is length limited Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle // LoadBalancerName is the name in ELB, possibly different from our name // (ELB is restricted as to names, so we have limited choices!) diff --git a/upup/pkg/fi/cloudup/awstasks/classicloadbalancer_fitask.go b/upup/pkg/fi/cloudup/awstasks/classicloadbalancer_fitask.go index ce61d39b1d..2c3cdfd07f 100644 --- a/upup/pkg/fi/cloudup/awstasks/classicloadbalancer_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/classicloadbalancer_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &ClassicLoadBalancer{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *ClassicLoadBalancer) GetLifecycle() *fi.Lifecycle { +func (o *ClassicLoadBalancer) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *ClassicLoadBalancer) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &ClassicLoadBalancer{} diff --git a/upup/pkg/fi/cloudup/awstasks/dhcp_options.go b/upup/pkg/fi/cloudup/awstasks/dhcp_options.go index dc8f76bc67..cc39b9f1b5 100644 --- a/upup/pkg/fi/cloudup/awstasks/dhcp_options.go +++ b/upup/pkg/fi/cloudup/awstasks/dhcp_options.go @@ -34,7 +34,7 @@ import ( // +kops:fitask type DHCPOptions struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ID *string DomainName *string diff --git a/upup/pkg/fi/cloudup/awstasks/dhcpoptions_fitask.go b/upup/pkg/fi/cloudup/awstasks/dhcpoptions_fitask.go index c38a626928..920e4e84b0 100644 --- a/upup/pkg/fi/cloudup/awstasks/dhcpoptions_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/dhcpoptions_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &DHCPOptions{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *DHCPOptions) GetLifecycle() *fi.Lifecycle { +func (o *DHCPOptions) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *DHCPOptions) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &DHCPOptions{} diff --git a/upup/pkg/fi/cloudup/awstasks/dnsname.go b/upup/pkg/fi/cloudup/awstasks/dnsname.go index d6653b2e79..b73cb8de0d 100644 --- a/upup/pkg/fi/cloudup/awstasks/dnsname.go +++ b/upup/pkg/fi/cloudup/awstasks/dnsname.go @@ -34,7 +34,7 @@ import ( // +kops:fitask type DNSName struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ID *string Zone *DNSZone diff --git a/upup/pkg/fi/cloudup/awstasks/dnsname_fitask.go b/upup/pkg/fi/cloudup/awstasks/dnsname_fitask.go index ee3dda69ec..12f4e6936e 100644 --- a/upup/pkg/fi/cloudup/awstasks/dnsname_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/dnsname_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &DNSName{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *DNSName) GetLifecycle() *fi.Lifecycle { +func (o *DNSName) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *DNSName) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &DNSName{} diff --git a/upup/pkg/fi/cloudup/awstasks/dnszone.go b/upup/pkg/fi/cloudup/awstasks/dnszone.go index 4745f5528b..fcaf02dec7 100644 --- a/upup/pkg/fi/cloudup/awstasks/dnszone.go +++ b/upup/pkg/fi/cloudup/awstasks/dnszone.go @@ -38,7 +38,7 @@ import ( // +kops:fitask type DNSZone struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle DNSName *string ZoneID *string diff --git a/upup/pkg/fi/cloudup/awstasks/dnszone_fitask.go b/upup/pkg/fi/cloudup/awstasks/dnszone_fitask.go index 91fe7efadd..20589c0298 100644 --- a/upup/pkg/fi/cloudup/awstasks/dnszone_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/dnszone_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &DNSZone{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *DNSZone) GetLifecycle() *fi.Lifecycle { +func (o *DNSZone) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *DNSZone) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &DNSZone{} diff --git a/upup/pkg/fi/cloudup/awstasks/ebsvolume.go b/upup/pkg/fi/cloudup/awstasks/ebsvolume.go index 0be4ee5513..623496946e 100644 --- a/upup/pkg/fi/cloudup/awstasks/ebsvolume.go +++ b/upup/pkg/fi/cloudup/awstasks/ebsvolume.go @@ -33,7 +33,7 @@ import ( // +kops:fitask type EBSVolume struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle AvailabilityZone *string Encrypted *bool diff --git a/upup/pkg/fi/cloudup/awstasks/ebsvolume_fitask.go b/upup/pkg/fi/cloudup/awstasks/ebsvolume_fitask.go index 6e17b800fc..cd4bfb4320 100644 --- a/upup/pkg/fi/cloudup/awstasks/ebsvolume_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/ebsvolume_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &EBSVolume{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *EBSVolume) GetLifecycle() *fi.Lifecycle { +func (o *EBSVolume) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *EBSVolume) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &EBSVolume{} diff --git a/upup/pkg/fi/cloudup/awstasks/elastic_ip.go b/upup/pkg/fi/cloudup/awstasks/elastic_ip.go index 620b4fd106..3bc89aa96f 100644 --- a/upup/pkg/fi/cloudup/awstasks/elastic_ip.go +++ b/upup/pkg/fi/cloudup/awstasks/elastic_ip.go @@ -34,7 +34,7 @@ import ( // +kops:fitask type ElasticIP struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ID *string PublicIP *string diff --git a/upup/pkg/fi/cloudup/awstasks/elastic_ip_test.go b/upup/pkg/fi/cloudup/awstasks/elastic_ip_test.go index e24d80227f..233f229a57 100644 --- a/upup/pkg/fi/cloudup/awstasks/elastic_ip_test.go +++ b/upup/pkg/fi/cloudup/awstasks/elastic_ip_test.go @@ -41,26 +41,24 @@ func TestElasticIPCreate(t *testing.T) { cloud := awsup.BuildMockAWSCloud("us-east-1", "abc") c := &mockec2.MockEC2{} cloud.MockEC2 = c - lifecycle := fi.LifecycleSync - // We define a function so we can rebuild the tasks, because we modify in-place when running buildTasks := func() map[string]fi.Task { vpc1 := &VPC{ Name: s("vpc1"), - Lifecycle: &lifecycle, + Lifecycle: fi.LifecycleSync, CIDR: s("172.20.0.0/16"), Tags: map[string]string{"Name": "vpc1"}, } subnet1 := &Subnet{ Name: s("subnet1"), - Lifecycle: &lifecycle, + Lifecycle: fi.LifecycleSync, VPC: vpc1, CIDR: s("172.20.1.0/24"), Tags: map[string]string{"Name": "subnet1"}, } eip1 := &ElasticIP{ Name: s("eip1"), - Lifecycle: &lifecycle, + Lifecycle: fi.LifecycleSync, TagOnSubnet: subnet1, Tags: map[string]string{"Name": "eip1"}, } diff --git a/upup/pkg/fi/cloudup/awstasks/elasticip_fitask.go b/upup/pkg/fi/cloudup/awstasks/elasticip_fitask.go index 1161d8862b..c3ecc75c30 100644 --- a/upup/pkg/fi/cloudup/awstasks/elasticip_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/elasticip_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &ElasticIP{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *ElasticIP) GetLifecycle() *fi.Lifecycle { +func (o *ElasticIP) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *ElasticIP) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &ElasticIP{} diff --git a/upup/pkg/fi/cloudup/awstasks/eventbridgerule.go b/upup/pkg/fi/cloudup/awstasks/eventbridgerule.go index d5b64a060e..75b84a3d7d 100644 --- a/upup/pkg/fi/cloudup/awstasks/eventbridgerule.go +++ b/upup/pkg/fi/cloudup/awstasks/eventbridgerule.go @@ -34,7 +34,7 @@ import ( type EventBridgeRule struct { ID *string Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle EventPattern *string TargetArn *string // required for cloudformation rendering diff --git a/upup/pkg/fi/cloudup/awstasks/eventbridgerule_fitask.go b/upup/pkg/fi/cloudup/awstasks/eventbridgerule_fitask.go index cb76afdb95..d4ac876c3a 100644 --- a/upup/pkg/fi/cloudup/awstasks/eventbridgerule_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/eventbridgerule_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &EventBridgeRule{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *EventBridgeRule) GetLifecycle() *fi.Lifecycle { +func (o *EventBridgeRule) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *EventBridgeRule) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &EventBridgeRule{} diff --git a/upup/pkg/fi/cloudup/awstasks/eventbridgetarget.go b/upup/pkg/fi/cloudup/awstasks/eventbridgetarget.go index 5634961023..2df8612eaa 100644 --- a/upup/pkg/fi/cloudup/awstasks/eventbridgetarget.go +++ b/upup/pkg/fi/cloudup/awstasks/eventbridgetarget.go @@ -34,7 +34,7 @@ import ( type EventBridgeTarget struct { ID *string Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Rule *EventBridgeRule TargetArn *string diff --git a/upup/pkg/fi/cloudup/awstasks/eventbridgetarget_fitask.go b/upup/pkg/fi/cloudup/awstasks/eventbridgetarget_fitask.go index 8511fe3f73..887be82f6f 100644 --- a/upup/pkg/fi/cloudup/awstasks/eventbridgetarget_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/eventbridgetarget_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &EventBridgeTarget{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *EventBridgeTarget) GetLifecycle() *fi.Lifecycle { +func (o *EventBridgeTarget) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *EventBridgeTarget) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &EventBridgeTarget{} diff --git a/upup/pkg/fi/cloudup/awstasks/iaminstanceprofile.go b/upup/pkg/fi/cloudup/awstasks/iaminstanceprofile.go index ea2262a552..86b8f20ae5 100644 --- a/upup/pkg/fi/cloudup/awstasks/iaminstanceprofile.go +++ b/upup/pkg/fi/cloudup/awstasks/iaminstanceprofile.go @@ -34,7 +34,7 @@ import ( // +kops:fitask type IAMInstanceProfile struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Tags map[string]string diff --git a/upup/pkg/fi/cloudup/awstasks/iaminstanceprofile_fitask.go b/upup/pkg/fi/cloudup/awstasks/iaminstanceprofile_fitask.go index c64d085eb1..11c02070fb 100644 --- a/upup/pkg/fi/cloudup/awstasks/iaminstanceprofile_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/iaminstanceprofile_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &IAMInstanceProfile{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *IAMInstanceProfile) GetLifecycle() *fi.Lifecycle { +func (o *IAMInstanceProfile) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *IAMInstanceProfile) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &IAMInstanceProfile{} diff --git a/upup/pkg/fi/cloudup/awstasks/iaminstanceprofilerole.go b/upup/pkg/fi/cloudup/awstasks/iaminstanceprofilerole.go index 284627e70c..6c02c7a6b1 100644 --- a/upup/pkg/fi/cloudup/awstasks/iaminstanceprofilerole.go +++ b/upup/pkg/fi/cloudup/awstasks/iaminstanceprofilerole.go @@ -33,7 +33,7 @@ import ( // +kops:fitask type IAMInstanceProfileRole struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle InstanceProfile *IAMInstanceProfile Role *IAMRole diff --git a/upup/pkg/fi/cloudup/awstasks/iaminstanceprofilerole_fitask.go b/upup/pkg/fi/cloudup/awstasks/iaminstanceprofilerole_fitask.go index a04ea862fb..40f775c87b 100644 --- a/upup/pkg/fi/cloudup/awstasks/iaminstanceprofilerole_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/iaminstanceprofilerole_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &IAMInstanceProfileRole{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *IAMInstanceProfileRole) GetLifecycle() *fi.Lifecycle { +func (o *IAMInstanceProfileRole) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *IAMInstanceProfileRole) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &IAMInstanceProfileRole{} diff --git a/upup/pkg/fi/cloudup/awstasks/iamoidcprovider.go b/upup/pkg/fi/cloudup/awstasks/iamoidcprovider.go index 1f3807b34c..bac4ae47d3 100644 --- a/upup/pkg/fi/cloudup/awstasks/iamoidcprovider.go +++ b/upup/pkg/fi/cloudup/awstasks/iamoidcprovider.go @@ -33,7 +33,7 @@ import ( // +kops:fitask type IAMOIDCProvider struct { - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ClientIDs []*string Thumbprints []*string diff --git a/upup/pkg/fi/cloudup/awstasks/iamoidcprovider_fitask.go b/upup/pkg/fi/cloudup/awstasks/iamoidcprovider_fitask.go index 48257b57b1..f8bb6b613c 100644 --- a/upup/pkg/fi/cloudup/awstasks/iamoidcprovider_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/iamoidcprovider_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &IAMOIDCProvider{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *IAMOIDCProvider) GetLifecycle() *fi.Lifecycle { +func (o *IAMOIDCProvider) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *IAMOIDCProvider) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &IAMOIDCProvider{} diff --git a/upup/pkg/fi/cloudup/awstasks/iamrole.go b/upup/pkg/fi/cloudup/awstasks/iamrole.go index 266ccee634..f60ee10658 100644 --- a/upup/pkg/fi/cloudup/awstasks/iamrole.go +++ b/upup/pkg/fi/cloudup/awstasks/iamrole.go @@ -39,7 +39,7 @@ import ( // +kops:fitask type IAMRole struct { ID *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Name *string RolePolicyDocument fi.Resource // "inline" IAM policy diff --git a/upup/pkg/fi/cloudup/awstasks/iamrole_fitask.go b/upup/pkg/fi/cloudup/awstasks/iamrole_fitask.go index 114ba12858..752f5bb7cf 100644 --- a/upup/pkg/fi/cloudup/awstasks/iamrole_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/iamrole_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &IAMRole{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *IAMRole) GetLifecycle() *fi.Lifecycle { +func (o *IAMRole) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *IAMRole) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &IAMRole{} diff --git a/upup/pkg/fi/cloudup/awstasks/iamrolepolicy.go b/upup/pkg/fi/cloudup/awstasks/iamrolepolicy.go index 50bcf7b62a..8ade752009 100644 --- a/upup/pkg/fi/cloudup/awstasks/iamrolepolicy.go +++ b/upup/pkg/fi/cloudup/awstasks/iamrolepolicy.go @@ -38,7 +38,7 @@ import ( // +kops:fitask type IAMRolePolicy struct { ID *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Name *string Role *IAMRole diff --git a/upup/pkg/fi/cloudup/awstasks/iamrolepolicy_fitask.go b/upup/pkg/fi/cloudup/awstasks/iamrolepolicy_fitask.go index ad634a0935..854d489086 100644 --- a/upup/pkg/fi/cloudup/awstasks/iamrolepolicy_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/iamrolepolicy_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &IAMRolePolicy{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *IAMRolePolicy) GetLifecycle() *fi.Lifecycle { +func (o *IAMRolePolicy) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *IAMRolePolicy) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &IAMRolePolicy{} diff --git a/upup/pkg/fi/cloudup/awstasks/instance.go b/upup/pkg/fi/cloudup/awstasks/instance.go index 5c46d699de..a8c5740709 100644 --- a/upup/pkg/fi/cloudup/awstasks/instance.go +++ b/upup/pkg/fi/cloudup/awstasks/instance.go @@ -37,7 +37,7 @@ const MaxUserDataSize = 16384 // +kops:fitask type Instance struct { ID *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle UserData fi.Resource diff --git a/upup/pkg/fi/cloudup/awstasks/instance_fitask.go b/upup/pkg/fi/cloudup/awstasks/instance_fitask.go index a35ee7df04..80c3e94b85 100644 --- a/upup/pkg/fi/cloudup/awstasks/instance_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/instance_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &Instance{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *Instance) GetLifecycle() *fi.Lifecycle { +func (o *Instance) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *Instance) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &Instance{} diff --git a/upup/pkg/fi/cloudup/awstasks/internetgateway.go b/upup/pkg/fi/cloudup/awstasks/internetgateway.go index bd076b95bb..42993fc173 100644 --- a/upup/pkg/fi/cloudup/awstasks/internetgateway.go +++ b/upup/pkg/fi/cloudup/awstasks/internetgateway.go @@ -31,7 +31,7 @@ import ( // +kops:fitask type InternetGateway struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ID *string VPC *VPC diff --git a/upup/pkg/fi/cloudup/awstasks/internetgateway_fitask.go b/upup/pkg/fi/cloudup/awstasks/internetgateway_fitask.go index 401ea7d98b..0b78d47742 100644 --- a/upup/pkg/fi/cloudup/awstasks/internetgateway_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/internetgateway_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &InternetGateway{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *InternetGateway) GetLifecycle() *fi.Lifecycle { +func (o *InternetGateway) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *InternetGateway) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &InternetGateway{} diff --git a/upup/pkg/fi/cloudup/awstasks/internetgateway_test.go b/upup/pkg/fi/cloudup/awstasks/internetgateway_test.go index f79610d227..3261a395ab 100644 --- a/upup/pkg/fi/cloudup/awstasks/internetgateway_test.go +++ b/upup/pkg/fi/cloudup/awstasks/internetgateway_test.go @@ -79,11 +79,10 @@ func TestSharedInternetGatewayDoesNotRename(t *testing.T) { } // We define a function so we can rebuild the tasks, because we modify in-place when running - lifecycle := fi.LifecycleSync buildTasks := func() map[string]fi.Task { vpc1 := &VPC{ Name: s("vpc1"), - Lifecycle: &lifecycle, + Lifecycle: fi.LifecycleSync, CIDR: s("172.20.0.0/16"), Tags: map[string]string{"kubernetes.io/cluster/cluster.example.com": "shared"}, Shared: fi.Bool(true), @@ -91,7 +90,7 @@ func TestSharedInternetGatewayDoesNotRename(t *testing.T) { } igw1 := &InternetGateway{ Name: s("igw1"), - Lifecycle: &lifecycle, + Lifecycle: fi.LifecycleSync, VPC: vpc1, Shared: fi.Bool(true), ID: internetGateway.InternetGateway.InternetGatewayId, diff --git a/upup/pkg/fi/cloudup/awstasks/launchtemplate.go b/upup/pkg/fi/cloudup/awstasks/launchtemplate.go index e156d57dc8..4fd738a347 100644 --- a/upup/pkg/fi/cloudup/awstasks/launchtemplate.go +++ b/upup/pkg/fi/cloudup/awstasks/launchtemplate.go @@ -33,7 +33,7 @@ type LaunchTemplate struct { // Name is the name of the configuration Name *string // Lifecycle is the resource lifecycle - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle // AssociatePublicIP indicates if a public ip address is assigned to instances AssociatePublicIP *bool diff --git a/upup/pkg/fi/cloudup/awstasks/launchtemplate_fitask.go b/upup/pkg/fi/cloudup/awstasks/launchtemplate_fitask.go index bcaeb072fd..b19eafae33 100644 --- a/upup/pkg/fi/cloudup/awstasks/launchtemplate_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/launchtemplate_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &LaunchTemplate{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *LaunchTemplate) GetLifecycle() *fi.Lifecycle { +func (o *LaunchTemplate) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *LaunchTemplate) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &LaunchTemplate{} diff --git a/upup/pkg/fi/cloudup/awstasks/natgateway.go b/upup/pkg/fi/cloudup/awstasks/natgateway.go index ab5293c9bc..5587a2b2ac 100644 --- a/upup/pkg/fi/cloudup/awstasks/natgateway.go +++ b/upup/pkg/fi/cloudup/awstasks/natgateway.go @@ -34,7 +34,7 @@ import ( // +kops:fitask type NatGateway struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ElasticIP *ElasticIP Subnet *Subnet diff --git a/upup/pkg/fi/cloudup/awstasks/natgateway_fitask.go b/upup/pkg/fi/cloudup/awstasks/natgateway_fitask.go index 63a5a2bceb..f4e4c3d542 100644 --- a/upup/pkg/fi/cloudup/awstasks/natgateway_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/natgateway_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &NatGateway{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *NatGateway) GetLifecycle() *fi.Lifecycle { +func (o *NatGateway) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *NatGateway) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &NatGateway{} diff --git a/upup/pkg/fi/cloudup/awstasks/network_load_balancer.go b/upup/pkg/fi/cloudup/awstasks/network_load_balancer.go index 5918b2d49d..04b9689cdc 100644 --- a/upup/pkg/fi/cloudup/awstasks/network_load_balancer.go +++ b/upup/pkg/fi/cloudup/awstasks/network_load_balancer.go @@ -42,7 +42,7 @@ type NetworkLoadBalancer struct { // We use the Name tag to find the existing NLB, because we are (more or less) unrestricted when // it comes to tag values, but the LoadBalancerName is length limited Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle // LoadBalancerName is the name in NLB, possibly different from our name // (NLB is restricted as to names, so we have limited choices!) diff --git a/upup/pkg/fi/cloudup/awstasks/networkloadbalancer_fitask.go b/upup/pkg/fi/cloudup/awstasks/networkloadbalancer_fitask.go index 546881a228..719796144c 100644 --- a/upup/pkg/fi/cloudup/awstasks/networkloadbalancer_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/networkloadbalancer_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &NetworkLoadBalancer{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *NetworkLoadBalancer) GetLifecycle() *fi.Lifecycle { +func (o *NetworkLoadBalancer) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *NetworkLoadBalancer) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &NetworkLoadBalancer{} diff --git a/upup/pkg/fi/cloudup/awstasks/route.go b/upup/pkg/fi/cloudup/awstasks/route.go index c1d28e5896..0e4ad99ec7 100644 --- a/upup/pkg/fi/cloudup/awstasks/route.go +++ b/upup/pkg/fi/cloudup/awstasks/route.go @@ -32,7 +32,7 @@ import ( // +kops:fitask type Route struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle RouteTable *RouteTable Instance *Instance diff --git a/upup/pkg/fi/cloudup/awstasks/route_fitask.go b/upup/pkg/fi/cloudup/awstasks/route_fitask.go index c1b76ff505..df7dfe2919 100644 --- a/upup/pkg/fi/cloudup/awstasks/route_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/route_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &Route{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *Route) GetLifecycle() *fi.Lifecycle { +func (o *Route) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *Route) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &Route{} diff --git a/upup/pkg/fi/cloudup/awstasks/routetable.go b/upup/pkg/fi/cloudup/awstasks/routetable.go index 62b65cce6f..8182052bfe 100644 --- a/upup/pkg/fi/cloudup/awstasks/routetable.go +++ b/upup/pkg/fi/cloudup/awstasks/routetable.go @@ -32,7 +32,7 @@ import ( // +kops:fitask type RouteTable struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ID *string VPC *VPC diff --git a/upup/pkg/fi/cloudup/awstasks/routetable_fitask.go b/upup/pkg/fi/cloudup/awstasks/routetable_fitask.go index 7ef94c0c1d..b124301854 100644 --- a/upup/pkg/fi/cloudup/awstasks/routetable_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/routetable_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &RouteTable{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *RouteTable) GetLifecycle() *fi.Lifecycle { +func (o *RouteTable) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *RouteTable) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &RouteTable{} diff --git a/upup/pkg/fi/cloudup/awstasks/routetableassociation.go b/upup/pkg/fi/cloudup/awstasks/routetableassociation.go index 8b5197fb56..ee7cb95eca 100644 --- a/upup/pkg/fi/cloudup/awstasks/routetableassociation.go +++ b/upup/pkg/fi/cloudup/awstasks/routetableassociation.go @@ -32,7 +32,7 @@ import ( // +kops:fitask type RouteTableAssociation struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ID *string RouteTable *RouteTable diff --git a/upup/pkg/fi/cloudup/awstasks/routetableassociation_fitask.go b/upup/pkg/fi/cloudup/awstasks/routetableassociation_fitask.go index 826af696f8..91f7998bf0 100644 --- a/upup/pkg/fi/cloudup/awstasks/routetableassociation_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/routetableassociation_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &RouteTableAssociation{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *RouteTableAssociation) GetLifecycle() *fi.Lifecycle { +func (o *RouteTableAssociation) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *RouteTableAssociation) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &RouteTableAssociation{} diff --git a/upup/pkg/fi/cloudup/awstasks/securitygroup.go b/upup/pkg/fi/cloudup/awstasks/securitygroup.go index dc58fdcc8d..4a2bd48be6 100644 --- a/upup/pkg/fi/cloudup/awstasks/securitygroup.go +++ b/upup/pkg/fi/cloudup/awstasks/securitygroup.go @@ -34,7 +34,7 @@ import ( // +kops:fitask type SecurityGroup struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ID *string Description *string diff --git a/upup/pkg/fi/cloudup/awstasks/securitygroup_fitask.go b/upup/pkg/fi/cloudup/awstasks/securitygroup_fitask.go index 70a2ccd21c..ac57d9390c 100644 --- a/upup/pkg/fi/cloudup/awstasks/securitygroup_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/securitygroup_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &SecurityGroup{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *SecurityGroup) GetLifecycle() *fi.Lifecycle { +func (o *SecurityGroup) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *SecurityGroup) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &SecurityGroup{} diff --git a/upup/pkg/fi/cloudup/awstasks/securitygroup_test.go b/upup/pkg/fi/cloudup/awstasks/securitygroup_test.go index ebd879ddf6..e8ef5f2cc4 100644 --- a/upup/pkg/fi/cloudup/awstasks/securitygroup_test.go +++ b/upup/pkg/fi/cloudup/awstasks/securitygroup_test.go @@ -99,17 +99,16 @@ func TestSecurityGroupCreate(t *testing.T) { cloud.MockEC2 = c // We define a function so we can rebuild the tasks, because we modify in-place when running - lifecycle := fi.LifecycleSync buildTasks := func() map[string]fi.Task { vpc1 := &VPC{ Name: s("vpc1"), - Lifecycle: &lifecycle, + Lifecycle: fi.LifecycleSync, CIDR: s("172.20.0.0/16"), Tags: map[string]string{"Name": "vpc1"}, } sg1 := &SecurityGroup{ Name: s("sg1"), - Lifecycle: &lifecycle, + Lifecycle: fi.LifecycleSync, Description: s("Description"), VPC: vpc1, Tags: map[string]string{"Name": "sg1"}, diff --git a/upup/pkg/fi/cloudup/awstasks/securitygrouprule.go b/upup/pkg/fi/cloudup/awstasks/securitygrouprule.go index 11380fbd3e..0181c562b6 100644 --- a/upup/pkg/fi/cloudup/awstasks/securitygrouprule.go +++ b/upup/pkg/fi/cloudup/awstasks/securitygrouprule.go @@ -35,7 +35,7 @@ import ( // +kops:fitask type SecurityGroupRule struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle SecurityGroup *SecurityGroup CIDR *string diff --git a/upup/pkg/fi/cloudup/awstasks/securitygrouprule_fitask.go b/upup/pkg/fi/cloudup/awstasks/securitygrouprule_fitask.go index e07abd79e3..d89f01f4c6 100644 --- a/upup/pkg/fi/cloudup/awstasks/securitygrouprule_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/securitygrouprule_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &SecurityGroupRule{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *SecurityGroupRule) GetLifecycle() *fi.Lifecycle { +func (o *SecurityGroupRule) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *SecurityGroupRule) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &SecurityGroupRule{} diff --git a/upup/pkg/fi/cloudup/awstasks/sqs.go b/upup/pkg/fi/cloudup/awstasks/sqs.go index 7cebcbebab..c2f1db8c84 100644 --- a/upup/pkg/fi/cloudup/awstasks/sqs.go +++ b/upup/pkg/fi/cloudup/awstasks/sqs.go @@ -37,7 +37,7 @@ import ( // +kops:fitask type SQS struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle URL *string MessageRetentionPeriod int diff --git a/upup/pkg/fi/cloudup/awstasks/sqs_fitask.go b/upup/pkg/fi/cloudup/awstasks/sqs_fitask.go index ff1bb8c93f..05a001764a 100644 --- a/upup/pkg/fi/cloudup/awstasks/sqs_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/sqs_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &SQS{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *SQS) GetLifecycle() *fi.Lifecycle { +func (o *SQS) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *SQS) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &SQS{} diff --git a/upup/pkg/fi/cloudup/awstasks/sshkey.go b/upup/pkg/fi/cloudup/awstasks/sshkey.go index 18b7de3a18..1505fe1324 100644 --- a/upup/pkg/fi/cloudup/awstasks/sshkey.go +++ b/upup/pkg/fi/cloudup/awstasks/sshkey.go @@ -36,7 +36,7 @@ import ( type SSHKey struct { ID *string Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Shared bool PublicKey fi.Resource diff --git a/upup/pkg/fi/cloudup/awstasks/sshkey_fitask.go b/upup/pkg/fi/cloudup/awstasks/sshkey_fitask.go index 9d09ecc374..21c2186282 100644 --- a/upup/pkg/fi/cloudup/awstasks/sshkey_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/sshkey_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &SSHKey{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *SSHKey) GetLifecycle() *fi.Lifecycle { +func (o *SSHKey) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *SSHKey) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &SSHKey{} diff --git a/upup/pkg/fi/cloudup/awstasks/subnet.go b/upup/pkg/fi/cloudup/awstasks/subnet.go index 7ed5c4a3ee..df31bf1a0e 100644 --- a/upup/pkg/fi/cloudup/awstasks/subnet.go +++ b/upup/pkg/fi/cloudup/awstasks/subnet.go @@ -40,7 +40,7 @@ type Subnet struct { // so it is typically set to the name of the Subnet, in the cluster spec. ShortName *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ID *string VPC *VPC diff --git a/upup/pkg/fi/cloudup/awstasks/subnet_fitask.go b/upup/pkg/fi/cloudup/awstasks/subnet_fitask.go index 6c143bc84a..1cf45321a6 100644 --- a/upup/pkg/fi/cloudup/awstasks/subnet_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/subnet_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &Subnet{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *Subnet) GetLifecycle() *fi.Lifecycle { +func (o *Subnet) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *Subnet) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &Subnet{} diff --git a/upup/pkg/fi/cloudup/awstasks/subnet_test.go b/upup/pkg/fi/cloudup/awstasks/subnet_test.go index 0b926c1d68..5fba0ff566 100644 --- a/upup/pkg/fi/cloudup/awstasks/subnet_test.go +++ b/upup/pkg/fi/cloudup/awstasks/subnet_test.go @@ -69,17 +69,16 @@ func TestSubnetCreate(t *testing.T) { cloud.MockEC2 = c // We define a function so we can rebuild the tasks, because we modify in-place when running - lifecycle := fi.LifecycleSync buildTasks := func() map[string]fi.Task { vpc1 := &VPC{ Name: s("vpc1"), - Lifecycle: &lifecycle, + Lifecycle: fi.LifecycleSync, CIDR: s("172.20.0.0/16"), Tags: map[string]string{"Name": "vpc1"}, } subnet1 := &Subnet{ Name: s("subnet1"), - Lifecycle: &lifecycle, + Lifecycle: fi.LifecycleSync, VPC: vpc1, CIDR: s("172.20.1.0/24"), Tags: map[string]string{"Name": "subnet1"}, @@ -184,11 +183,10 @@ func TestSharedSubnetCreateDoesNotCreateNew(t *testing.T) { } // We define a function so we can rebuild the tasks, because we modify in-place when running - lifecycle := fi.LifecycleSync buildTasks := func() map[string]fi.Task { vpc1 := &VPC{ Name: s("vpc1"), - Lifecycle: &lifecycle, + Lifecycle: fi.LifecycleSync, CIDR: s("172.20.0.0/16"), Tags: map[string]string{"kubernetes.io/cluster/cluster.example.com": "shared"}, Shared: fi.Bool(true), @@ -196,7 +194,7 @@ func TestSharedSubnetCreateDoesNotCreateNew(t *testing.T) { } subnet1 := &Subnet{ Name: s("subnet1"), - Lifecycle: &lifecycle, + Lifecycle: fi.LifecycleSync, VPC: vpc1, CIDR: s("172.20.1.0/24"), Tags: map[string]string{"kubernetes.io/cluster/cluster.example.com": "shared"}, diff --git a/upup/pkg/fi/cloudup/awstasks/targetgroup.go b/upup/pkg/fi/cloudup/awstasks/targetgroup.go index fa778fb66f..83589f3b85 100644 --- a/upup/pkg/fi/cloudup/awstasks/targetgroup.go +++ b/upup/pkg/fi/cloudup/awstasks/targetgroup.go @@ -33,7 +33,7 @@ import ( // +kops:fitask type TargetGroup struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle VPC *VPC Tags map[string]string Port *int64 diff --git a/upup/pkg/fi/cloudup/awstasks/targetgroup_fitask.go b/upup/pkg/fi/cloudup/awstasks/targetgroup_fitask.go index 484aed48ac..05f3fa15f7 100644 --- a/upup/pkg/fi/cloudup/awstasks/targetgroup_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/targetgroup_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &TargetGroup{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *TargetGroup) GetLifecycle() *fi.Lifecycle { +func (o *TargetGroup) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *TargetGroup) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &TargetGroup{} diff --git a/upup/pkg/fi/cloudup/awstasks/vpc.go b/upup/pkg/fi/cloudup/awstasks/vpc.go index 4bf4813600..0498bc5599 100644 --- a/upup/pkg/fi/cloudup/awstasks/vpc.go +++ b/upup/pkg/fi/cloudup/awstasks/vpc.go @@ -34,7 +34,7 @@ import ( // +kops:fitask type VPC struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ID *string CIDR *string diff --git a/upup/pkg/fi/cloudup/awstasks/vpc_dhcpoptions_association.go b/upup/pkg/fi/cloudup/awstasks/vpc_dhcpoptions_association.go index b62b058850..48d07ea5be 100644 --- a/upup/pkg/fi/cloudup/awstasks/vpc_dhcpoptions_association.go +++ b/upup/pkg/fi/cloudup/awstasks/vpc_dhcpoptions_association.go @@ -31,7 +31,7 @@ import ( // +kops:fitask type VPCDHCPOptionsAssociation struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle VPC *VPC DHCPOptions *DHCPOptions diff --git a/upup/pkg/fi/cloudup/awstasks/vpc_fitask.go b/upup/pkg/fi/cloudup/awstasks/vpc_fitask.go index c2e664075b..c6609fef93 100644 --- a/upup/pkg/fi/cloudup/awstasks/vpc_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/vpc_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &VPC{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *VPC) GetLifecycle() *fi.Lifecycle { +func (o *VPC) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *VPC) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &VPC{} diff --git a/upup/pkg/fi/cloudup/awstasks/vpc_test.go b/upup/pkg/fi/cloudup/awstasks/vpc_test.go index 12fa723993..da6e37eb70 100644 --- a/upup/pkg/fi/cloudup/awstasks/vpc_test.go +++ b/upup/pkg/fi/cloudup/awstasks/vpc_test.go @@ -33,11 +33,10 @@ func TestVPCCreate(t *testing.T) { cloud.MockEC2 = c // We define a function so we can rebuild the tasks, because we modify in-place when running - lifecycle := fi.LifecycleSync buildTasks := func() map[string]fi.Task { vpc1 := &VPC{ Name: s("vpc1"), - Lifecycle: &lifecycle, + Lifecycle: fi.LifecycleSync, CIDR: s("172.21.0.0/16"), Tags: map[string]string{"Name": "vpc1"}, } @@ -157,11 +156,10 @@ func TestSharedVPCAdditionalCIDR(t *testing.T) { cloud.MockEC2 = c // We define a function so we can rebuild the tasks, because we modify in-place when running - lifecycle := fi.LifecycleSync buildTasks := func() map[string]fi.Task { vpc1 := &VPC{ Name: s("vpc-1"), - Lifecycle: &lifecycle, + Lifecycle: fi.LifecycleSync, CIDR: s("172.21.0.0/16"), Tags: map[string]string{"Name": "vpc-1"}, Shared: fi.Bool(true), diff --git a/upup/pkg/fi/cloudup/awstasks/vpcamazonipv6cidrblock.go b/upup/pkg/fi/cloudup/awstasks/vpcamazonipv6cidrblock.go index bfe94e5e10..3ab85f28de 100644 --- a/upup/pkg/fi/cloudup/awstasks/vpcamazonipv6cidrblock.go +++ b/upup/pkg/fi/cloudup/awstasks/vpcamazonipv6cidrblock.go @@ -30,7 +30,7 @@ import ( // +kops:fitask type VPCAmazonIPv6CIDRBlock struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle VPC *VPC CIDRBlock *string diff --git a/upup/pkg/fi/cloudup/awstasks/vpcamazonipv6cidrblock_fitask.go b/upup/pkg/fi/cloudup/awstasks/vpcamazonipv6cidrblock_fitask.go index 35e3debfd0..b7faf02541 100644 --- a/upup/pkg/fi/cloudup/awstasks/vpcamazonipv6cidrblock_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/vpcamazonipv6cidrblock_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &VPCAmazonIPv6CIDRBlock{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *VPCAmazonIPv6CIDRBlock) GetLifecycle() *fi.Lifecycle { +func (o *VPCAmazonIPv6CIDRBlock) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *VPCAmazonIPv6CIDRBlock) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &VPCAmazonIPv6CIDRBlock{} diff --git a/upup/pkg/fi/cloudup/awstasks/vpccidrblock.go b/upup/pkg/fi/cloudup/awstasks/vpccidrblock.go index d8b9c1948f..3056e2b4a2 100644 --- a/upup/pkg/fi/cloudup/awstasks/vpccidrblock.go +++ b/upup/pkg/fi/cloudup/awstasks/vpccidrblock.go @@ -31,7 +31,7 @@ import ( // +kops:fitask type VPCCIDRBlock struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle VPC *VPC CIDRBlock *string diff --git a/upup/pkg/fi/cloudup/awstasks/vpccidrblock_fitask.go b/upup/pkg/fi/cloudup/awstasks/vpccidrblock_fitask.go index bd9431d8ca..3b04f80232 100644 --- a/upup/pkg/fi/cloudup/awstasks/vpccidrblock_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/vpccidrblock_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &VPCCIDRBlock{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *VPCCIDRBlock) GetLifecycle() *fi.Lifecycle { +func (o *VPCCIDRBlock) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *VPCCIDRBlock) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &VPCCIDRBlock{} diff --git a/upup/pkg/fi/cloudup/awstasks/vpcdhcpoptionsassociation_fitask.go b/upup/pkg/fi/cloudup/awstasks/vpcdhcpoptionsassociation_fitask.go index 7c12b1053b..336a8327c9 100644 --- a/upup/pkg/fi/cloudup/awstasks/vpcdhcpoptionsassociation_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/vpcdhcpoptionsassociation_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &VPCDHCPOptionsAssociation{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *VPCDHCPOptionsAssociation) GetLifecycle() *fi.Lifecycle { +func (o *VPCDHCPOptionsAssociation) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *VPCDHCPOptionsAssociation) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &VPCDHCPOptionsAssociation{} diff --git a/upup/pkg/fi/cloudup/awstasks/warmpool.go b/upup/pkg/fi/cloudup/awstasks/warmpool.go index f775297c13..42bbef5913 100644 --- a/upup/pkg/fi/cloudup/awstasks/warmpool.go +++ b/upup/pkg/fi/cloudup/awstasks/warmpool.go @@ -33,7 +33,7 @@ type WarmPool struct { // Name is the name of the ASG. Name *string // Lifecycle is the resource lifecycle. - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Enabled *bool // MaxSize is the max number of nodes in the warm pool. diff --git a/upup/pkg/fi/cloudup/awstasks/warmpool_fitask.go b/upup/pkg/fi/cloudup/awstasks/warmpool_fitask.go index 15607d7208..92297cedf1 100644 --- a/upup/pkg/fi/cloudup/awstasks/warmpool_fitask.go +++ b/upup/pkg/fi/cloudup/awstasks/warmpool_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &WarmPool{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *WarmPool) GetLifecycle() *fi.Lifecycle { +func (o *WarmPool) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *WarmPool) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &WarmPool{} diff --git a/upup/pkg/fi/cloudup/azuretasks/disk.go b/upup/pkg/fi/cloudup/azuretasks/disk.go index d937f68cfa..dc8c1b23ce 100644 --- a/upup/pkg/fi/cloudup/azuretasks/disk.go +++ b/upup/pkg/fi/cloudup/azuretasks/disk.go @@ -30,7 +30,7 @@ import ( // +kops:fitask type Disk struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ResourceGroup *ResourceGroup SizeGB *int32 diff --git a/upup/pkg/fi/cloudup/azuretasks/disk_fitask.go b/upup/pkg/fi/cloudup/azuretasks/disk_fitask.go index 1b398cca72..18b1417aa0 100644 --- a/upup/pkg/fi/cloudup/azuretasks/disk_fitask.go +++ b/upup/pkg/fi/cloudup/azuretasks/disk_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &Disk{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *Disk) GetLifecycle() *fi.Lifecycle { +func (o *Disk) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *Disk) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &Disk{} diff --git a/upup/pkg/fi/cloudup/azuretasks/disk_test.go b/upup/pkg/fi/cloudup/azuretasks/disk_test.go index 48f76a6305..2119e27004 100644 --- a/upup/pkg/fi/cloudup/azuretasks/disk_test.go +++ b/upup/pkg/fi/cloudup/azuretasks/disk_test.go @@ -34,10 +34,9 @@ const ( ) func newTestDisk() *Disk { - lifecycle := fi.LifecycleSync return &Disk{ Name: to.StringPtr("disk"), - Lifecycle: &lifecycle, + Lifecycle: fi.LifecycleSync, ResourceGroup: &ResourceGroup{ Name: to.StringPtr("rg"), }, diff --git a/upup/pkg/fi/cloudup/azuretasks/loadbalancer.go b/upup/pkg/fi/cloudup/azuretasks/loadbalancer.go index af9fe350b0..740405ea31 100644 --- a/upup/pkg/fi/cloudup/azuretasks/loadbalancer.go +++ b/upup/pkg/fi/cloudup/azuretasks/loadbalancer.go @@ -31,7 +31,7 @@ import ( // +kops:fitask type LoadBalancer struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ResourceGroup *ResourceGroup Subnet *Subnet diff --git a/upup/pkg/fi/cloudup/azuretasks/loadbalancer_fitask.go b/upup/pkg/fi/cloudup/azuretasks/loadbalancer_fitask.go index c07f076acf..f2c01434fc 100644 --- a/upup/pkg/fi/cloudup/azuretasks/loadbalancer_fitask.go +++ b/upup/pkg/fi/cloudup/azuretasks/loadbalancer_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &LoadBalancer{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *LoadBalancer) GetLifecycle() *fi.Lifecycle { +func (o *LoadBalancer) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *LoadBalancer) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &LoadBalancer{} diff --git a/upup/pkg/fi/cloudup/azuretasks/loadbalancer_test.go b/upup/pkg/fi/cloudup/azuretasks/loadbalancer_test.go index b9692665a8..f705f6218d 100644 --- a/upup/pkg/fi/cloudup/azuretasks/loadbalancer_test.go +++ b/upup/pkg/fi/cloudup/azuretasks/loadbalancer_test.go @@ -29,16 +29,15 @@ import ( ) func newTestLoadBalancer() *LoadBalancer { - lifecycle := fi.LifecycleSync return &LoadBalancer{ Name: to.StringPtr("loadbalancer"), - Lifecycle: &lifecycle, + Lifecycle: fi.LifecycleSync, ResourceGroup: &ResourceGroup{ Name: to.StringPtr("rg"), }, Subnet: &Subnet{ Name: to.StringPtr("subnet"), - Lifecycle: &lifecycle, + Lifecycle: fi.LifecycleSync, VirtualNetwork: &VirtualNetwork{ Name: to.StringPtr("vnet"), }, diff --git a/upup/pkg/fi/cloudup/azuretasks/publicipaddress.go b/upup/pkg/fi/cloudup/azuretasks/publicipaddress.go index b5ccbaa7c3..c32e6793f3 100644 --- a/upup/pkg/fi/cloudup/azuretasks/publicipaddress.go +++ b/upup/pkg/fi/cloudup/azuretasks/publicipaddress.go @@ -30,7 +30,7 @@ import ( // +kops:fitask type PublicIPAddress struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ResourceGroup *ResourceGroup Tags map[string]*string diff --git a/upup/pkg/fi/cloudup/azuretasks/publicipaddress_fitask.go b/upup/pkg/fi/cloudup/azuretasks/publicipaddress_fitask.go index 4e96e4aeda..d76f9de0ff 100644 --- a/upup/pkg/fi/cloudup/azuretasks/publicipaddress_fitask.go +++ b/upup/pkg/fi/cloudup/azuretasks/publicipaddress_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &PublicIPAddress{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *PublicIPAddress) GetLifecycle() *fi.Lifecycle { +func (o *PublicIPAddress) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *PublicIPAddress) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &PublicIPAddress{} diff --git a/upup/pkg/fi/cloudup/azuretasks/publicipaddress_test.go b/upup/pkg/fi/cloudup/azuretasks/publicipaddress_test.go index 4f2361c432..4015f13c50 100644 --- a/upup/pkg/fi/cloudup/azuretasks/publicipaddress_test.go +++ b/upup/pkg/fi/cloudup/azuretasks/publicipaddress_test.go @@ -29,10 +29,9 @@ import ( ) func newTestPublicIPAddress() *PublicIPAddress { - lifecycle := fi.LifecycleSync return &PublicIPAddress{ Name: to.StringPtr("publicIPAddress"), - Lifecycle: &lifecycle, + Lifecycle: fi.LifecycleSync, ResourceGroup: &ResourceGroup{ Name: to.StringPtr("rg"), }, diff --git a/upup/pkg/fi/cloudup/azuretasks/resourcegroup.go b/upup/pkg/fi/cloudup/azuretasks/resourcegroup.go index c042563541..1f908b370c 100644 --- a/upup/pkg/fi/cloudup/azuretasks/resourcegroup.go +++ b/upup/pkg/fi/cloudup/azuretasks/resourcegroup.go @@ -30,7 +30,7 @@ import ( // +kops:fitask type ResourceGroup struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Tags map[string]*string // Shared is set to true if the resource group is not solely // owned by kops. The resource group will not be deleted when diff --git a/upup/pkg/fi/cloudup/azuretasks/resourcegroup_fitask.go b/upup/pkg/fi/cloudup/azuretasks/resourcegroup_fitask.go index 1aa5877d48..331d2b92c2 100644 --- a/upup/pkg/fi/cloudup/azuretasks/resourcegroup_fitask.go +++ b/upup/pkg/fi/cloudup/azuretasks/resourcegroup_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &ResourceGroup{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *ResourceGroup) GetLifecycle() *fi.Lifecycle { +func (o *ResourceGroup) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *ResourceGroup) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &ResourceGroup{} diff --git a/upup/pkg/fi/cloudup/azuretasks/resourcegroup_test.go b/upup/pkg/fi/cloudup/azuretasks/resourcegroup_test.go index 85ac1c793c..4272c1b95b 100644 --- a/upup/pkg/fi/cloudup/azuretasks/resourcegroup_test.go +++ b/upup/pkg/fi/cloudup/azuretasks/resourcegroup_test.go @@ -149,10 +149,9 @@ func TestResourceGroupRun(t *testing.T) { key = "key" val = "val" ) - lifecycle := fi.LifecycleSync rg := &ResourceGroup{ Name: to.StringPtr("rg"), - Lifecycle: &lifecycle, + Lifecycle: fi.LifecycleSync, Tags: map[string]*string{ key: to.StringPtr(val), }, diff --git a/upup/pkg/fi/cloudup/azuretasks/roleassignment.go b/upup/pkg/fi/cloudup/azuretasks/roleassignment.go index a1ea0832bc..12b1dd5737 100644 --- a/upup/pkg/fi/cloudup/azuretasks/roleassignment.go +++ b/upup/pkg/fi/cloudup/azuretasks/roleassignment.go @@ -44,7 +44,7 @@ type RoleAssignment struct { // name generated from kops cluster config, we keep a task // name and a Role Assignment name separate. Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ResourceGroup *ResourceGroup VMScaleSet *VMScaleSet diff --git a/upup/pkg/fi/cloudup/azuretasks/roleassignment_fitask.go b/upup/pkg/fi/cloudup/azuretasks/roleassignment_fitask.go index 00f09d4200..8ccb2c4304 100644 --- a/upup/pkg/fi/cloudup/azuretasks/roleassignment_fitask.go +++ b/upup/pkg/fi/cloudup/azuretasks/roleassignment_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &RoleAssignment{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *RoleAssignment) GetLifecycle() *fi.Lifecycle { +func (o *RoleAssignment) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *RoleAssignment) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &RoleAssignment{} diff --git a/upup/pkg/fi/cloudup/azuretasks/routetable.go b/upup/pkg/fi/cloudup/azuretasks/routetable.go index 54c7734add..5ff360b674 100644 --- a/upup/pkg/fi/cloudup/azuretasks/routetable.go +++ b/upup/pkg/fi/cloudup/azuretasks/routetable.go @@ -30,7 +30,7 @@ import ( // +kops:fitask type RouteTable struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ResourceGroup *ResourceGroup Tags map[string]*string Shared *bool diff --git a/upup/pkg/fi/cloudup/azuretasks/routetable_fitask.go b/upup/pkg/fi/cloudup/azuretasks/routetable_fitask.go index fb235664f9..1d0fca0691 100644 --- a/upup/pkg/fi/cloudup/azuretasks/routetable_fitask.go +++ b/upup/pkg/fi/cloudup/azuretasks/routetable_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &RouteTable{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *RouteTable) GetLifecycle() *fi.Lifecycle { +func (o *RouteTable) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *RouteTable) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &RouteTable{} diff --git a/upup/pkg/fi/cloudup/azuretasks/subnet.go b/upup/pkg/fi/cloudup/azuretasks/subnet.go index b70f1d2c4e..f0b671e3fb 100644 --- a/upup/pkg/fi/cloudup/azuretasks/subnet.go +++ b/upup/pkg/fi/cloudup/azuretasks/subnet.go @@ -29,7 +29,7 @@ import ( // +kops:fitask type Subnet struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ResourceGroup *ResourceGroup VirtualNetwork *VirtualNetwork diff --git a/upup/pkg/fi/cloudup/azuretasks/subnet_fitask.go b/upup/pkg/fi/cloudup/azuretasks/subnet_fitask.go index 4c43939410..a3d46a0124 100644 --- a/upup/pkg/fi/cloudup/azuretasks/subnet_fitask.go +++ b/upup/pkg/fi/cloudup/azuretasks/subnet_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &Subnet{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *Subnet) GetLifecycle() *fi.Lifecycle { +func (o *Subnet) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *Subnet) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &Subnet{} diff --git a/upup/pkg/fi/cloudup/azuretasks/virtualnetwork.go b/upup/pkg/fi/cloudup/azuretasks/virtualnetwork.go index 7a23ac7ad5..643bbd449c 100644 --- a/upup/pkg/fi/cloudup/azuretasks/virtualnetwork.go +++ b/upup/pkg/fi/cloudup/azuretasks/virtualnetwork.go @@ -31,7 +31,7 @@ import ( // +kops:fitask type VirtualNetwork struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ResourceGroup *ResourceGroup CIDR *string diff --git a/upup/pkg/fi/cloudup/azuretasks/virtualnetwork_fitask.go b/upup/pkg/fi/cloudup/azuretasks/virtualnetwork_fitask.go index 52616026e4..1073619583 100644 --- a/upup/pkg/fi/cloudup/azuretasks/virtualnetwork_fitask.go +++ b/upup/pkg/fi/cloudup/azuretasks/virtualnetwork_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &VirtualNetwork{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *VirtualNetwork) GetLifecycle() *fi.Lifecycle { +func (o *VirtualNetwork) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *VirtualNetwork) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &VirtualNetwork{} diff --git a/upup/pkg/fi/cloudup/azuretasks/virtualnetwork_test.go b/upup/pkg/fi/cloudup/azuretasks/virtualnetwork_test.go index 2e1a6585d5..9c9264b36d 100644 --- a/upup/pkg/fi/cloudup/azuretasks/virtualnetwork_test.go +++ b/upup/pkg/fi/cloudup/azuretasks/virtualnetwork_test.go @@ -130,10 +130,9 @@ func TestVirtualNetworkRun(t *testing.T) { key = "key" val = "val" ) - lifecycle := fi.LifecycleSync vnet := &VirtualNetwork{ Name: to.StringPtr("rg"), - Lifecycle: &lifecycle, + Lifecycle: fi.LifecycleSync, ResourceGroup: &ResourceGroup{ Name: to.StringPtr("rg"), }, diff --git a/upup/pkg/fi/cloudup/azuretasks/vmscaleset.go b/upup/pkg/fi/cloudup/azuretasks/vmscaleset.go index 11f17a7402..402dc0252b 100644 --- a/upup/pkg/fi/cloudup/azuretasks/vmscaleset.go +++ b/upup/pkg/fi/cloudup/azuretasks/vmscaleset.go @@ -93,7 +93,7 @@ func parseLoadBalancerID(lb string) (*loadBalancerID, error) { // +kops:fitask type VMScaleSet struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ResourceGroup *ResourceGroup VirtualNetwork *VirtualNetwork diff --git a/upup/pkg/fi/cloudup/azuretasks/vmscaleset_fitask.go b/upup/pkg/fi/cloudup/azuretasks/vmscaleset_fitask.go index d55b94b121..0d264f37e5 100644 --- a/upup/pkg/fi/cloudup/azuretasks/vmscaleset_fitask.go +++ b/upup/pkg/fi/cloudup/azuretasks/vmscaleset_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &VMScaleSet{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *VMScaleSet) GetLifecycle() *fi.Lifecycle { +func (o *VMScaleSet) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *VMScaleSet) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &VMScaleSet{} diff --git a/upup/pkg/fi/cloudup/azuretasks/vmscaleset_test.go b/upup/pkg/fi/cloudup/azuretasks/vmscaleset_test.go index e65feff348..9859eb7ab2 100644 --- a/upup/pkg/fi/cloudup/azuretasks/vmscaleset_test.go +++ b/upup/pkg/fi/cloudup/azuretasks/vmscaleset_test.go @@ -62,10 +62,9 @@ func TestLoadBalancerIDParse(t *testing.T) { } func newTestVMScaleSet() *VMScaleSet { - lifecycle := fi.LifecycleSync return &VMScaleSet{ Name: to.StringPtr("vmss"), - Lifecycle: &lifecycle, + Lifecycle: fi.LifecycleSync, ResourceGroup: &ResourceGroup{ Name: to.StringPtr("rg"), }, diff --git a/upup/pkg/fi/cloudup/bootstrapchannelbuilder/bootstrapchannelbuilder.go b/upup/pkg/fi/cloudup/bootstrapchannelbuilder/bootstrapchannelbuilder.go index 6c307bb887..31e0af6f69 100644 --- a/upup/pkg/fi/cloudup/bootstrapchannelbuilder/bootstrapchannelbuilder.go +++ b/upup/pkg/fi/cloudup/bootstrapchannelbuilder/bootstrapchannelbuilder.go @@ -43,7 +43,7 @@ import ( type BootstrapChannelBuilder struct { *model.KopsModelContext ClusterAddons kubemanifest.ObjectList - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle templates *templates.Templates assetBuilder *assets.AssetBuilder } @@ -75,7 +75,7 @@ func networkingSelector() map[string]string { // NewBootstrapChannelBuilder creates a new BootstrapChannelBuilder func NewBootstrapChannelBuilder(modelContext *model.KopsModelContext, - clusterLifecycle *fi.Lifecycle, assetBuilder *assets.AssetBuilder, + clusterLifecycle fi.Lifecycle, assetBuilder *assets.AssetBuilder, templates *templates.Templates, addons kubemanifest.ObjectList, ) *BootstrapChannelBuilder { diff --git a/upup/pkg/fi/cloudup/bootstrapchannelbuilder_test.go b/upup/pkg/fi/cloudup/bootstrapchannelbuilder_test.go index 6e70fdcaf0..d0411b0c1f 100644 --- a/upup/pkg/fi/cloudup/bootstrapchannelbuilder_test.go +++ b/upup/pkg/fi/cloudup/bootstrapchannelbuilder_test.go @@ -160,7 +160,7 @@ func runChannelBuilderTest(t *testing.T, key string, addonManifests []string) { bcb := bootstrapchannelbuilder.NewBootstrapChannelBuilder( &kopsModel, - nil, + fi.LifecycleSync, assets.NewAssetBuilder(cluster, ""), templates, nil, diff --git a/upup/pkg/fi/cloudup/dotasks/droplet.go b/upup/pkg/fi/cloudup/dotasks/droplet.go index 252c247ca8..7738b7c631 100644 --- a/upup/pkg/fi/cloudup/dotasks/droplet.go +++ b/upup/pkg/fi/cloudup/dotasks/droplet.go @@ -33,7 +33,7 @@ import ( // +kops:fitask type Droplet struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Region *string Size *string diff --git a/upup/pkg/fi/cloudup/dotasks/droplet_fitask.go b/upup/pkg/fi/cloudup/dotasks/droplet_fitask.go index 1d31da818d..7ced6120f6 100644 --- a/upup/pkg/fi/cloudup/dotasks/droplet_fitask.go +++ b/upup/pkg/fi/cloudup/dotasks/droplet_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &Droplet{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *Droplet) GetLifecycle() *fi.Lifecycle { +func (o *Droplet) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *Droplet) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &Droplet{} diff --git a/upup/pkg/fi/cloudup/dotasks/loadbalancer.go b/upup/pkg/fi/cloudup/dotasks/loadbalancer.go index 8e13550fd7..8fab58127f 100644 --- a/upup/pkg/fi/cloudup/dotasks/loadbalancer.go +++ b/upup/pkg/fi/cloudup/dotasks/loadbalancer.go @@ -35,7 +35,7 @@ import ( type LoadBalancer struct { Name *string ID *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Region *string DropletTag *string diff --git a/upup/pkg/fi/cloudup/dotasks/loadbalancer_fitask.go b/upup/pkg/fi/cloudup/dotasks/loadbalancer_fitask.go index 1389380bba..5010ad3ddd 100644 --- a/upup/pkg/fi/cloudup/dotasks/loadbalancer_fitask.go +++ b/upup/pkg/fi/cloudup/dotasks/loadbalancer_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &LoadBalancer{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *LoadBalancer) GetLifecycle() *fi.Lifecycle { +func (o *LoadBalancer) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *LoadBalancer) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &LoadBalancer{} diff --git a/upup/pkg/fi/cloudup/dotasks/volume.go b/upup/pkg/fi/cloudup/dotasks/volume.go index 028b027860..2394cc4339 100644 --- a/upup/pkg/fi/cloudup/dotasks/volume.go +++ b/upup/pkg/fi/cloudup/dotasks/volume.go @@ -32,7 +32,7 @@ import ( type Volume struct { Name *string ID *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle SizeGB *int64 Region *string diff --git a/upup/pkg/fi/cloudup/dotasks/volume_fitask.go b/upup/pkg/fi/cloudup/dotasks/volume_fitask.go index 0100038eb1..ad46ac7556 100644 --- a/upup/pkg/fi/cloudup/dotasks/volume_fitask.go +++ b/upup/pkg/fi/cloudup/dotasks/volume_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &Volume{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *Volume) GetLifecycle() *fi.Lifecycle { +func (o *Volume) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *Volume) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &Volume{} diff --git a/upup/pkg/fi/cloudup/gcetasks/address.go b/upup/pkg/fi/cloudup/gcetasks/address.go index e480324ecd..39c53dd463 100644 --- a/upup/pkg/fi/cloudup/gcetasks/address.go +++ b/upup/pkg/fi/cloudup/gcetasks/address.go @@ -30,7 +30,7 @@ import ( // +kops:fitask type Address struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle IPAddress *string ForAPIServer bool diff --git a/upup/pkg/fi/cloudup/gcetasks/address_fitask.go b/upup/pkg/fi/cloudup/gcetasks/address_fitask.go index 84f36073a4..632559827d 100644 --- a/upup/pkg/fi/cloudup/gcetasks/address_fitask.go +++ b/upup/pkg/fi/cloudup/gcetasks/address_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &Address{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *Address) GetLifecycle() *fi.Lifecycle { +func (o *Address) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *Address) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &Address{} diff --git a/upup/pkg/fi/cloudup/gcetasks/disk.go b/upup/pkg/fi/cloudup/gcetasks/disk.go index bad4cc6583..faa8ad5eca 100644 --- a/upup/pkg/fi/cloudup/gcetasks/disk.go +++ b/upup/pkg/fi/cloudup/gcetasks/disk.go @@ -31,7 +31,7 @@ import ( // +kops:fitask type Disk struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle VolumeType *string SizeGB *int64 diff --git a/upup/pkg/fi/cloudup/gcetasks/disk_fitask.go b/upup/pkg/fi/cloudup/gcetasks/disk_fitask.go index 8dccbbd9de..74c88167f9 100644 --- a/upup/pkg/fi/cloudup/gcetasks/disk_fitask.go +++ b/upup/pkg/fi/cloudup/gcetasks/disk_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &Disk{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *Disk) GetLifecycle() *fi.Lifecycle { +func (o *Disk) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *Disk) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &Disk{} diff --git a/upup/pkg/fi/cloudup/gcetasks/firewallrule.go b/upup/pkg/fi/cloudup/gcetasks/firewallrule.go index 4a097dae06..da21d85a7b 100644 --- a/upup/pkg/fi/cloudup/gcetasks/firewallrule.go +++ b/upup/pkg/fi/cloudup/gcetasks/firewallrule.go @@ -31,7 +31,7 @@ import ( // +kops:fitask type FirewallRule struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Network *Network SourceTags []string diff --git a/upup/pkg/fi/cloudup/gcetasks/firewallrule_fitask.go b/upup/pkg/fi/cloudup/gcetasks/firewallrule_fitask.go index 549cda8166..2be3d0c393 100644 --- a/upup/pkg/fi/cloudup/gcetasks/firewallrule_fitask.go +++ b/upup/pkg/fi/cloudup/gcetasks/firewallrule_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &FirewallRule{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *FirewallRule) GetLifecycle() *fi.Lifecycle { +func (o *FirewallRule) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *FirewallRule) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &FirewallRule{} diff --git a/upup/pkg/fi/cloudup/gcetasks/forwardingrule.go b/upup/pkg/fi/cloudup/gcetasks/forwardingrule.go index 4606ac4cf2..2499b4bb96 100644 --- a/upup/pkg/fi/cloudup/gcetasks/forwardingrule.go +++ b/upup/pkg/fi/cloudup/gcetasks/forwardingrule.go @@ -31,7 +31,7 @@ import ( // +kops:fitask type ForwardingRule struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle PortRange string TargetPool *TargetPool diff --git a/upup/pkg/fi/cloudup/gcetasks/forwardingrule_fitask.go b/upup/pkg/fi/cloudup/gcetasks/forwardingrule_fitask.go index 3e16eb9341..e18ef0a299 100644 --- a/upup/pkg/fi/cloudup/gcetasks/forwardingrule_fitask.go +++ b/upup/pkg/fi/cloudup/gcetasks/forwardingrule_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &ForwardingRule{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *ForwardingRule) GetLifecycle() *fi.Lifecycle { +func (o *ForwardingRule) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *ForwardingRule) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &ForwardingRule{} diff --git a/upup/pkg/fi/cloudup/gcetasks/instance.go b/upup/pkg/fi/cloudup/gcetasks/instance.go index 47c421e6fe..a20f11a98c 100644 --- a/upup/pkg/fi/cloudup/gcetasks/instance.go +++ b/upup/pkg/fi/cloudup/gcetasks/instance.go @@ -34,7 +34,7 @@ var scopeAliases map[string]string // +kops:fitask type Instance struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Network *Network Tags []string diff --git a/upup/pkg/fi/cloudup/gcetasks/instance_fitask.go b/upup/pkg/fi/cloudup/gcetasks/instance_fitask.go index 94ca5b901c..64a0138e1b 100644 --- a/upup/pkg/fi/cloudup/gcetasks/instance_fitask.go +++ b/upup/pkg/fi/cloudup/gcetasks/instance_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &Instance{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *Instance) GetLifecycle() *fi.Lifecycle { +func (o *Instance) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *Instance) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &Instance{} diff --git a/upup/pkg/fi/cloudup/gcetasks/instancegroupmanager.go b/upup/pkg/fi/cloudup/gcetasks/instancegroupmanager.go index 9860ed50f2..eb07df7b3e 100644 --- a/upup/pkg/fi/cloudup/gcetasks/instancegroupmanager.go +++ b/upup/pkg/fi/cloudup/gcetasks/instancegroupmanager.go @@ -30,7 +30,7 @@ import ( // +kops:fitask type InstanceGroupManager struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Zone *string BaseInstanceName *string diff --git a/upup/pkg/fi/cloudup/gcetasks/instancegroupmanager_fitask.go b/upup/pkg/fi/cloudup/gcetasks/instancegroupmanager_fitask.go index 527cc7ae3f..1f443f9fbe 100644 --- a/upup/pkg/fi/cloudup/gcetasks/instancegroupmanager_fitask.go +++ b/upup/pkg/fi/cloudup/gcetasks/instancegroupmanager_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &InstanceGroupManager{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *InstanceGroupManager) GetLifecycle() *fi.Lifecycle { +func (o *InstanceGroupManager) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *InstanceGroupManager) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &InstanceGroupManager{} diff --git a/upup/pkg/fi/cloudup/gcetasks/instancetemplate.go b/upup/pkg/fi/cloudup/gcetasks/instancetemplate.go index 76143cf2e6..342a0bd822 100644 --- a/upup/pkg/fi/cloudup/gcetasks/instancetemplate.go +++ b/upup/pkg/fi/cloudup/gcetasks/instancetemplate.go @@ -49,7 +49,7 @@ type InstanceTemplate struct { // NamePrefix is used as the prefix for the names; we add a timestamp. Max = InstanceTemplateNamePrefixMaxLength NamePrefix *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Network *Network Tags []string diff --git a/upup/pkg/fi/cloudup/gcetasks/instancetemplate_fitask.go b/upup/pkg/fi/cloudup/gcetasks/instancetemplate_fitask.go index 06530db375..ca58765f6f 100644 --- a/upup/pkg/fi/cloudup/gcetasks/instancetemplate_fitask.go +++ b/upup/pkg/fi/cloudup/gcetasks/instancetemplate_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &InstanceTemplate{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *InstanceTemplate) GetLifecycle() *fi.Lifecycle { +func (o *InstanceTemplate) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *InstanceTemplate) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &InstanceTemplate{} diff --git a/upup/pkg/fi/cloudup/gcetasks/network.go b/upup/pkg/fi/cloudup/gcetasks/network.go index 0bcc2a7766..12107c3c9e 100644 --- a/upup/pkg/fi/cloudup/gcetasks/network.go +++ b/upup/pkg/fi/cloudup/gcetasks/network.go @@ -31,7 +31,7 @@ import ( // +kops:fitask type Network struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Mode string CIDR *string diff --git a/upup/pkg/fi/cloudup/gcetasks/network_fitask.go b/upup/pkg/fi/cloudup/gcetasks/network_fitask.go index 0b23e45784..0ac087c309 100644 --- a/upup/pkg/fi/cloudup/gcetasks/network_fitask.go +++ b/upup/pkg/fi/cloudup/gcetasks/network_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &Network{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *Network) GetLifecycle() *fi.Lifecycle { +func (o *Network) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *Network) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &Network{} diff --git a/upup/pkg/fi/cloudup/gcetasks/router.go b/upup/pkg/fi/cloudup/gcetasks/router.go index 6d31117903..b567b12840 100644 --- a/upup/pkg/fi/cloudup/gcetasks/router.go +++ b/upup/pkg/fi/cloudup/gcetasks/router.go @@ -56,7 +56,7 @@ const ( // Router is a Router task. type Router struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Network *string Region *string diff --git a/upup/pkg/fi/cloudup/gcetasks/router_fitask.go b/upup/pkg/fi/cloudup/gcetasks/router_fitask.go index 207af0ef23..c175774a3e 100644 --- a/upup/pkg/fi/cloudup/gcetasks/router_fitask.go +++ b/upup/pkg/fi/cloudup/gcetasks/router_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &Router{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *Router) GetLifecycle() *fi.Lifecycle { +func (o *Router) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *Router) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &Router{} diff --git a/upup/pkg/fi/cloudup/gcetasks/storagebucketacl.go b/upup/pkg/fi/cloudup/gcetasks/storagebucketacl.go index 70b190ea52..bc08c1f032 100644 --- a/upup/pkg/fi/cloudup/gcetasks/storagebucketacl.go +++ b/upup/pkg/fi/cloudup/gcetasks/storagebucketacl.go @@ -30,7 +30,7 @@ import ( // +kops:fitask type StorageBucketAcl struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Bucket *string Entity *string diff --git a/upup/pkg/fi/cloudup/gcetasks/storagebucketacl_fitask.go b/upup/pkg/fi/cloudup/gcetasks/storagebucketacl_fitask.go index 3b4d22f6f6..fdcd0c38e1 100644 --- a/upup/pkg/fi/cloudup/gcetasks/storagebucketacl_fitask.go +++ b/upup/pkg/fi/cloudup/gcetasks/storagebucketacl_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &StorageBucketAcl{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *StorageBucketAcl) GetLifecycle() *fi.Lifecycle { +func (o *StorageBucketAcl) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *StorageBucketAcl) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &StorageBucketAcl{} diff --git a/upup/pkg/fi/cloudup/gcetasks/storagebucketiam.go b/upup/pkg/fi/cloudup/gcetasks/storagebucketiam.go index ec869da2a8..c66f38d3ea 100644 --- a/upup/pkg/fi/cloudup/gcetasks/storagebucketiam.go +++ b/upup/pkg/fi/cloudup/gcetasks/storagebucketiam.go @@ -30,7 +30,7 @@ import ( // +kops:fitask type StorageBucketIam struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Bucket *string Entity *string diff --git a/upup/pkg/fi/cloudup/gcetasks/storagebucketiam_fitask.go b/upup/pkg/fi/cloudup/gcetasks/storagebucketiam_fitask.go index c9e951365f..098085db06 100644 --- a/upup/pkg/fi/cloudup/gcetasks/storagebucketiam_fitask.go +++ b/upup/pkg/fi/cloudup/gcetasks/storagebucketiam_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &StorageBucketIam{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *StorageBucketIam) GetLifecycle() *fi.Lifecycle { +func (o *StorageBucketIam) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *StorageBucketIam) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &StorageBucketIam{} diff --git a/upup/pkg/fi/cloudup/gcetasks/storageobjectacl.go b/upup/pkg/fi/cloudup/gcetasks/storageobjectacl.go index 39cb36698f..489da1353e 100644 --- a/upup/pkg/fi/cloudup/gcetasks/storageobjectacl.go +++ b/upup/pkg/fi/cloudup/gcetasks/storageobjectacl.go @@ -30,7 +30,7 @@ import ( // +kops:fitask type StorageObjectAcl struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Bucket *string Object *string diff --git a/upup/pkg/fi/cloudup/gcetasks/storageobjectacl_fitask.go b/upup/pkg/fi/cloudup/gcetasks/storageobjectacl_fitask.go index 947bfc11b0..188a37d7a7 100644 --- a/upup/pkg/fi/cloudup/gcetasks/storageobjectacl_fitask.go +++ b/upup/pkg/fi/cloudup/gcetasks/storageobjectacl_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &StorageObjectAcl{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *StorageObjectAcl) GetLifecycle() *fi.Lifecycle { +func (o *StorageObjectAcl) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *StorageObjectAcl) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &StorageObjectAcl{} diff --git a/upup/pkg/fi/cloudup/gcetasks/subnet.go b/upup/pkg/fi/cloudup/gcetasks/subnet.go index ac9cf063d8..d33659f447 100644 --- a/upup/pkg/fi/cloudup/gcetasks/subnet.go +++ b/upup/pkg/fi/cloudup/gcetasks/subnet.go @@ -31,7 +31,7 @@ import ( // +kops:fitask type Subnet struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle GCEName *string Network *Network diff --git a/upup/pkg/fi/cloudup/gcetasks/subnet_fitask.go b/upup/pkg/fi/cloudup/gcetasks/subnet_fitask.go index c28673ad15..0d8ef5675a 100644 --- a/upup/pkg/fi/cloudup/gcetasks/subnet_fitask.go +++ b/upup/pkg/fi/cloudup/gcetasks/subnet_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &Subnet{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *Subnet) GetLifecycle() *fi.Lifecycle { +func (o *Subnet) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *Subnet) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &Subnet{} diff --git a/upup/pkg/fi/cloudup/gcetasks/targetpool.go b/upup/pkg/fi/cloudup/gcetasks/targetpool.go index 5118852321..3f5ab02841 100644 --- a/upup/pkg/fi/cloudup/gcetasks/targetpool.go +++ b/upup/pkg/fi/cloudup/gcetasks/targetpool.go @@ -31,7 +31,7 @@ import ( // +kops:fitask type TargetPool struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.CompareWithID = &TargetPool{} diff --git a/upup/pkg/fi/cloudup/gcetasks/targetpool_fitask.go b/upup/pkg/fi/cloudup/gcetasks/targetpool_fitask.go index c6faa6ee27..9992ca2da8 100644 --- a/upup/pkg/fi/cloudup/gcetasks/targetpool_fitask.go +++ b/upup/pkg/fi/cloudup/gcetasks/targetpool_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &TargetPool{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *TargetPool) GetLifecycle() *fi.Lifecycle { +func (o *TargetPool) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *TargetPool) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &TargetPool{} diff --git a/upup/pkg/fi/cloudup/loader.go b/upup/pkg/fi/cloudup/loader.go index cee6954c42..310fcf46ab 100644 --- a/upup/pkg/fi/cloudup/loader.go +++ b/upup/pkg/fi/cloudup/loader.go @@ -38,7 +38,7 @@ func (l *Loader) Init() { l.tasks = make(map[string]fi.Task) } -func (l *Loader) BuildTasks(assetBuilder *assets.AssetBuilder, lifecycle *fi.Lifecycle, lifecycleOverrides map[string]fi.Lifecycle) (map[string]fi.Task, error) { +func (l *Loader) BuildTasks(assetBuilder *assets.AssetBuilder, lifecycle fi.Lifecycle, lifecycleOverrides map[string]fi.Lifecycle) (map[string]fi.Task, error) { for _, builder := range l.Builders { context := &fi.ModelBuilderContext{ Tasks: l.tasks, @@ -65,7 +65,7 @@ func (l *Loader) BuildTasks(assetBuilder *assets.AssetBuilder, lifecycle *fi.Lif return l.tasks, nil } -func (l *Loader) addAssetCopyTasks(assets []*assets.ImageAsset, lifecycle *fi.Lifecycle) error { +func (l *Loader) addAssetCopyTasks(assets []*assets.ImageAsset, lifecycle fi.Lifecycle) error { for _, asset := range assets { if asset.DownloadLocation != asset.CanonicalLocation { context := &fi.ModelBuilderContext{ @@ -92,7 +92,7 @@ func (l *Loader) addAssetCopyTasks(assets []*assets.ImageAsset, lifecycle *fi.Li } // addAssetFileCopyTasks creates the new tasks for copying files. -func (l *Loader) addAssetFileCopyTasks(assets []*assets.FileAsset, lifecycle *fi.Lifecycle) error { +func (l *Loader) addAssetFileCopyTasks(assets []*assets.FileAsset, lifecycle fi.Lifecycle) error { for _, asset := range assets { if asset.DownloadURL == nil { diff --git a/upup/pkg/fi/cloudup/openstacktasks/floatingip.go b/upup/pkg/fi/cloudup/openstacktasks/floatingip.go index a70113ab06..d6df35fcc2 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/floatingip.go +++ b/upup/pkg/fi/cloudup/openstacktasks/floatingip.go @@ -37,7 +37,7 @@ type FloatingIP struct { ID *string LB *LB IP *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ForAPIServer bool } diff --git a/upup/pkg/fi/cloudup/openstacktasks/floatingip_fitask.go b/upup/pkg/fi/cloudup/openstacktasks/floatingip_fitask.go index 95f2f725d2..929b3d2bf3 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/floatingip_fitask.go +++ b/upup/pkg/fi/cloudup/openstacktasks/floatingip_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &FloatingIP{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *FloatingIP) GetLifecycle() *fi.Lifecycle { +func (o *FloatingIP) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *FloatingIP) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &FloatingIP{} diff --git a/upup/pkg/fi/cloudup/openstacktasks/instance.go b/upup/pkg/fi/cloudup/openstacktasks/instance.go index 1ffc297610..7d4f36b10f 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/instance.go +++ b/upup/pkg/fi/cloudup/openstacktasks/instance.go @@ -51,7 +51,7 @@ type Instance struct { SecurityGroups []string FloatingIP *FloatingIP - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ForAPIServer bool } diff --git a/upup/pkg/fi/cloudup/openstacktasks/instance_fitask.go b/upup/pkg/fi/cloudup/openstacktasks/instance_fitask.go index 2e451810f8..947ced5025 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/instance_fitask.go +++ b/upup/pkg/fi/cloudup/openstacktasks/instance_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &Instance{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *Instance) GetLifecycle() *fi.Lifecycle { +func (o *Instance) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *Instance) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &Instance{} diff --git a/upup/pkg/fi/cloudup/openstacktasks/lb.go b/upup/pkg/fi/cloudup/openstacktasks/lb.go index ab1dc927a6..6d66b2538a 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/lb.go +++ b/upup/pkg/fi/cloudup/openstacktasks/lb.go @@ -37,7 +37,7 @@ type LB struct { Name *string Subnet *string VipSubnet *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle PortID *string SecurityGroup *SecurityGroup } @@ -106,7 +106,7 @@ func (s *LB) CompareWithID() *string { return s.ID } -func NewLBTaskFromCloud(cloud openstack.OpenstackCloud, lifecycle *fi.Lifecycle, lb *loadbalancers.LoadBalancer, find *LB) (*LB, error) { +func NewLBTaskFromCloud(cloud openstack.OpenstackCloud, lifecycle fi.Lifecycle, lb *loadbalancers.LoadBalancer, find *LB) (*LB, error) { osCloud := cloud.(openstack.OpenstackCloud) sub, err := subnets.Get(osCloud.NetworkingClient(), lb.VipSubnetID).Extract() if err != nil { diff --git a/upup/pkg/fi/cloudup/openstacktasks/lb_fitask.go b/upup/pkg/fi/cloudup/openstacktasks/lb_fitask.go index 60a773bb9c..12c2b9a336 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/lb_fitask.go +++ b/upup/pkg/fi/cloudup/openstacktasks/lb_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &LB{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *LB) GetLifecycle() *fi.Lifecycle { +func (o *LB) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *LB) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &LB{} diff --git a/upup/pkg/fi/cloudup/openstacktasks/lblistener.go b/upup/pkg/fi/cloudup/openstacktasks/lblistener.go index 3b0794d55a..694ff9bbbb 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/lblistener.go +++ b/upup/pkg/fi/cloudup/openstacktasks/lblistener.go @@ -32,7 +32,7 @@ type LBListener struct { ID *string Name *string Pool *LBPool - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle AllowedCIDRs []string } @@ -56,7 +56,7 @@ func (s *LBListener) CompareWithID() *string { return s.ID } -func NewLBListenerTaskFromCloud(cloud openstack.OpenstackCloud, lifecycle *fi.Lifecycle, lb *listeners.Listener, find *LBListener) (*LBListener, error) { +func NewLBListenerTaskFromCloud(cloud openstack.OpenstackCloud, lifecycle fi.Lifecycle, lb *listeners.Listener, find *LBListener) (*LBListener, error) { // sort for consistent comparison sort.Strings(lb.AllowedCIDRs) listenerTask := &LBListener{ diff --git a/upup/pkg/fi/cloudup/openstacktasks/lblistener_fitask.go b/upup/pkg/fi/cloudup/openstacktasks/lblistener_fitask.go index d425eef93c..32f6aec3a0 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/lblistener_fitask.go +++ b/upup/pkg/fi/cloudup/openstacktasks/lblistener_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &LBListener{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *LBListener) GetLifecycle() *fi.Lifecycle { +func (o *LBListener) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *LBListener) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &LBListener{} diff --git a/upup/pkg/fi/cloudup/openstacktasks/lbpool.go b/upup/pkg/fi/cloudup/openstacktasks/lbpool.go index b3599793bd..4751a810c7 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/lbpool.go +++ b/upup/pkg/fi/cloudup/openstacktasks/lbpool.go @@ -29,7 +29,7 @@ import ( type LBPool struct { ID *string Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Loadbalancer *LB } @@ -50,7 +50,7 @@ func (s *LBPool) CompareWithID() *string { return s.ID } -func NewLBPoolTaskFromCloud(cloud openstack.OpenstackCloud, lifecycle *fi.Lifecycle, pool *v2pools.Pool, find *LBPool) (*LBPool, error) { +func NewLBPoolTaskFromCloud(cloud openstack.OpenstackCloud, lifecycle fi.Lifecycle, pool *v2pools.Pool, find *LBPool) (*LBPool, error) { if len(pool.Loadbalancers) > 1 { return nil, fmt.Errorf("Openstack cloud pools with multiple loadbalancers not yet supported!") diff --git a/upup/pkg/fi/cloudup/openstacktasks/lbpool_fitask.go b/upup/pkg/fi/cloudup/openstacktasks/lbpool_fitask.go index 4257f2fe3b..c260dfee1f 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/lbpool_fitask.go +++ b/upup/pkg/fi/cloudup/openstacktasks/lbpool_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &LBPool{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *LBPool) GetLifecycle() *fi.Lifecycle { +func (o *LBPool) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *LBPool) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &LBPool{} diff --git a/upup/pkg/fi/cloudup/openstacktasks/network.go b/upup/pkg/fi/cloudup/openstacktasks/network.go index 62f2d5b474..ee206bc3d1 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/network.go +++ b/upup/pkg/fi/cloudup/openstacktasks/network.go @@ -29,7 +29,7 @@ import ( type Network struct { ID *string Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Tag *string AvailabilityZoneHints []*string } @@ -40,7 +40,7 @@ func (n *Network) CompareWithID() *string { return n.ID } -func NewNetworkTaskFromCloud(cloud openstack.OpenstackCloud, lifecycle *fi.Lifecycle, network *networks.Network, networkName *string) (*Network, error) { +func NewNetworkTaskFromCloud(cloud openstack.OpenstackCloud, lifecycle fi.Lifecycle, network *networks.Network, networkName *string) (*Network, error) { tag := "" if networkName != nil && fi.ArrayContains(network.Tags, fi.StringValue(networkName)) { tag = fi.StringValue(networkName) diff --git a/upup/pkg/fi/cloudup/openstacktasks/network_fitask.go b/upup/pkg/fi/cloudup/openstacktasks/network_fitask.go index f02e8d474c..49184c250d 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/network_fitask.go +++ b/upup/pkg/fi/cloudup/openstacktasks/network_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &Network{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *Network) GetLifecycle() *fi.Lifecycle { +func (o *Network) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *Network) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &Network{} diff --git a/upup/pkg/fi/cloudup/openstacktasks/poolassociation.go b/upup/pkg/fi/cloudup/openstacktasks/poolassociation.go index b2f7f91e71..6a2b95e212 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/poolassociation.go +++ b/upup/pkg/fi/cloudup/openstacktasks/poolassociation.go @@ -33,7 +33,7 @@ import ( type PoolAssociation struct { ID *string Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Pool *LBPool ServerGroup *ServerGroup InterfaceName *string diff --git a/upup/pkg/fi/cloudup/openstacktasks/poolassociation_fitask.go b/upup/pkg/fi/cloudup/openstacktasks/poolassociation_fitask.go index e0249bd84a..aa9e9b5a6f 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/poolassociation_fitask.go +++ b/upup/pkg/fi/cloudup/openstacktasks/poolassociation_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &PoolAssociation{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *PoolAssociation) GetLifecycle() *fi.Lifecycle { +func (o *PoolAssociation) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *PoolAssociation) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &PoolAssociation{} diff --git a/upup/pkg/fi/cloudup/openstacktasks/port.go b/upup/pkg/fi/cloudup/openstacktasks/port.go index 5fa4b05fb8..3256eb1fec 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/port.go +++ b/upup/pkg/fi/cloudup/openstacktasks/port.go @@ -34,7 +34,7 @@ type Port struct { Subnets []*Subnet SecurityGroups []*SecurityGroup AdditionalSecurityGroups []string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Tag *string } @@ -61,7 +61,7 @@ func (s *Port) CompareWithID() *string { return s.ID } -func newPortTaskFromCloud(cloud openstack.OpenstackCloud, lifecycle *fi.Lifecycle, port *ports.Port, find *Port) (*Port, error) { +func newPortTaskFromCloud(cloud openstack.OpenstackCloud, lifecycle fi.Lifecycle, port *ports.Port, find *Port) (*Port, error) { additionalSecurityGroupIDs := map[string]struct{}{} if find != nil { for _, sg := range find.AdditionalSecurityGroups { diff --git a/upup/pkg/fi/cloudup/openstacktasks/port_fitask.go b/upup/pkg/fi/cloudup/openstacktasks/port_fitask.go index 1c66a77935..28e3581aa7 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/port_fitask.go +++ b/upup/pkg/fi/cloudup/openstacktasks/port_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &Port{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *Port) GetLifecycle() *fi.Lifecycle { +func (o *Port) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *Port) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &Port{} diff --git a/upup/pkg/fi/cloudup/openstacktasks/port_test.go b/upup/pkg/fi/cloudup/openstacktasks/port_test.go index 74ef04c8d6..b5dc58282f 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/port_test.go +++ b/upup/pkg/fi/cloudup/openstacktasks/port_test.go @@ -58,7 +58,6 @@ func Test_Port_GetDependencies(t *testing.T) { } func Test_NewPortTaskFromCloud(t *testing.T) { - syncLifecycle := fi.LifecycleSync tests := []struct { desc string lifecycle fi.Lifecycle @@ -83,7 +82,7 @@ func Test_NewPortTaskFromCloud(t *testing.T) { SecurityGroups: []*SecurityGroup{}, Subnets: []*Subnet{}, Tag: fi.String(""), - Lifecycle: &syncLifecycle, + Lifecycle: fi.LifecycleSync, }, expectedError: nil, }, @@ -101,7 +100,7 @@ func Test_NewPortTaskFromCloud(t *testing.T) { SecurityGroups: []*SecurityGroup{}, Subnets: []*Subnet{}, Tag: fi.String(""), - Lifecycle: &syncLifecycle, + Lifecycle: fi.LifecycleSync, }, expectedError: nil, }, @@ -129,14 +128,14 @@ func Test_NewPortTaskFromCloud(t *testing.T) { Name: fi.String("name"), Network: &Network{ID: fi.String("networkID")}, SecurityGroups: []*SecurityGroup{ - {ID: fi.String("sg-1"), Lifecycle: &syncLifecycle}, - {ID: fi.String("sg-2"), Lifecycle: &syncLifecycle}, + {ID: fi.String("sg-1"), Lifecycle: fi.LifecycleSync}, + {ID: fi.String("sg-2"), Lifecycle: fi.LifecycleSync}, }, Subnets: []*Subnet{ - {ID: fi.String("subnet-a"), Lifecycle: &syncLifecycle}, - {ID: fi.String("subnet-b"), Lifecycle: &syncLifecycle}, + {ID: fi.String("subnet-a"), Lifecycle: fi.LifecycleSync}, + {ID: fi.String("subnet-b"), Lifecycle: fi.LifecycleSync}, }, - Lifecycle: &syncLifecycle, + Lifecycle: fi.LifecycleSync, Tag: fi.String(""), }, expectedError: nil, @@ -187,18 +186,18 @@ func Test_NewPortTaskFromCloud(t *testing.T) { Name: fi.String("name"), Network: &Network{ID: fi.String("networkID")}, SecurityGroups: []*SecurityGroup{ - {ID: fi.String("sg-1"), Lifecycle: &syncLifecycle}, - {ID: fi.String("sg-2"), Lifecycle: &syncLifecycle}, + {ID: fi.String("sg-1"), Lifecycle: fi.LifecycleSync}, + {ID: fi.String("sg-2"), Lifecycle: fi.LifecycleSync}, }, AdditionalSecurityGroups: []string{ "add-1", "add-2", }, Subnets: []*Subnet{ - {ID: fi.String("subnet-a"), Lifecycle: &syncLifecycle}, - {ID: fi.String("subnet-b"), Lifecycle: &syncLifecycle}, + {ID: fi.String("subnet-a"), Lifecycle: fi.LifecycleSync}, + {ID: fi.String("subnet-b"), Lifecycle: fi.LifecycleSync}, }, - Lifecycle: &syncLifecycle, + Lifecycle: fi.LifecycleSync, Tag: fi.String(""), }, expectedError: nil, @@ -207,7 +206,7 @@ func Test_NewPortTaskFromCloud(t *testing.T) { for _, testCase := range tests { t.Run(testCase.desc, func(t *testing.T) { - actual, err := newPortTaskFromCloud(testCase.cloud, &testCase.lifecycle, testCase.cloudPort, testCase.foundPort) + actual, err := newPortTaskFromCloud(testCase.cloud, testCase.lifecycle, testCase.cloudPort, testCase.foundPort) if !reflect.DeepEqual(err, testCase.expectedError) { t.Errorf("Error differs:\n%v\n\tinstead of\n%v", err, testCase.expectedError) @@ -225,7 +224,6 @@ func Test_NewPortTaskFromCloud(t *testing.T) { } func Test_Port_Find(t *testing.T) { - syncLifecycle := fi.LifecycleSync tests := []struct { desc string context *fi.Context @@ -240,7 +238,7 @@ func Test_Port_Find(t *testing.T) { }, port: &Port{ Name: fi.String("name"), - Lifecycle: &syncLifecycle, + Lifecycle: fi.LifecycleSync, }, expectedPortTask: nil, expectedError: nil, @@ -268,22 +266,22 @@ func Test_Port_Find(t *testing.T) { }, port: &Port{ Name: fi.String("name"), - Lifecycle: &syncLifecycle, + Lifecycle: fi.LifecycleSync, }, expectedPortTask: &Port{ ID: fi.String("id"), Name: fi.String("name"), Network: &Network{ID: fi.String("networkID")}, SecurityGroups: []*SecurityGroup{ - {ID: fi.String("sg-1"), Lifecycle: &syncLifecycle}, - {ID: fi.String("sg-2"), Lifecycle: &syncLifecycle}, + {ID: fi.String("sg-1"), Lifecycle: fi.LifecycleSync}, + {ID: fi.String("sg-2"), Lifecycle: fi.LifecycleSync}, }, Subnets: []*Subnet{ - {ID: fi.String("subnet-a"), Lifecycle: &syncLifecycle}, - {ID: fi.String("subnet-b"), Lifecycle: &syncLifecycle}, + {ID: fi.String("subnet-a"), Lifecycle: fi.LifecycleSync}, + {ID: fi.String("subnet-b"), Lifecycle: fi.LifecycleSync}, }, Tag: fi.String(""), - Lifecycle: &syncLifecycle, + Lifecycle: fi.LifecycleSync, }, expectedError: nil, }, @@ -305,7 +303,7 @@ func Test_Port_Find(t *testing.T) { }, port: &Port{ Name: fi.String("name"), - Lifecycle: &syncLifecycle, + Lifecycle: fi.LifecycleSync, }, expectedPortTask: nil, expectedError: fmt.Errorf("found multiple ports with name: name"), @@ -325,7 +323,7 @@ func Test_Port_Find(t *testing.T) { }, port: &Port{ Name: fi.String("name"), - Lifecycle: &syncLifecycle, + Lifecycle: fi.LifecycleSync, }, expectedPortTask: nil, expectedError: fmt.Errorf("list error"), diff --git a/upup/pkg/fi/cloudup/openstacktasks/router.go b/upup/pkg/fi/cloudup/openstacktasks/router.go index 76fbaa9fea..9cb22554f0 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/router.go +++ b/upup/pkg/fi/cloudup/openstacktasks/router.go @@ -29,7 +29,7 @@ import ( type Router struct { ID *string Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle AvailabilityZoneHints []*string } @@ -40,7 +40,7 @@ func (n *Router) CompareWithID() *string { } //NewRouterTaskFromCloud initializes and returns a new Router -func NewRouterTaskFromCloud(cloud openstack.OpenstackCloud, lifecycle *fi.Lifecycle, router *routers.Router, find *Router) (*Router, error) { +func NewRouterTaskFromCloud(cloud openstack.OpenstackCloud, lifecycle fi.Lifecycle, router *routers.Router, find *Router) (*Router, error) { actual := &Router{ ID: fi.String(router.ID), Name: fi.String(router.Name), diff --git a/upup/pkg/fi/cloudup/openstacktasks/router_fitask.go b/upup/pkg/fi/cloudup/openstacktasks/router_fitask.go index 9261d79ddd..71f75deee5 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/router_fitask.go +++ b/upup/pkg/fi/cloudup/openstacktasks/router_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &Router{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *Router) GetLifecycle() *fi.Lifecycle { +func (o *Router) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *Router) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &Router{} diff --git a/upup/pkg/fi/cloudup/openstacktasks/routerinterface.go b/upup/pkg/fi/cloudup/openstacktasks/routerinterface.go index 8f1e1bb194..2a4d1f28ba 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/routerinterface.go +++ b/upup/pkg/fi/cloudup/openstacktasks/routerinterface.go @@ -32,7 +32,7 @@ type RouterInterface struct { Name *string Router *Router Subnet *Subnet - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } // GetDependencies returns the dependencies of the RouterInterface task diff --git a/upup/pkg/fi/cloudup/openstacktasks/routerinterface_fitask.go b/upup/pkg/fi/cloudup/openstacktasks/routerinterface_fitask.go index 6345322d3d..2ab06a08ef 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/routerinterface_fitask.go +++ b/upup/pkg/fi/cloudup/openstacktasks/routerinterface_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &RouterInterface{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *RouterInterface) GetLifecycle() *fi.Lifecycle { +func (o *RouterInterface) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *RouterInterface) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &RouterInterface{} diff --git a/upup/pkg/fi/cloudup/openstacktasks/securitygroup.go b/upup/pkg/fi/cloudup/openstacktasks/securitygroup.go index 23594aa38c..8c57c172c7 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/securitygroup.go +++ b/upup/pkg/fi/cloudup/openstacktasks/securitygroup.go @@ -35,7 +35,7 @@ type SecurityGroup struct { Description *string RemoveExtraRules []string RemoveGroup bool - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.CompareWithID = &SecurityGroup{} diff --git a/upup/pkg/fi/cloudup/openstacktasks/securitygroup_fitask.go b/upup/pkg/fi/cloudup/openstacktasks/securitygroup_fitask.go index 692d5fec60..6bd91d8b98 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/securitygroup_fitask.go +++ b/upup/pkg/fi/cloudup/openstacktasks/securitygroup_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &SecurityGroup{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *SecurityGroup) GetLifecycle() *fi.Lifecycle { +func (o *SecurityGroup) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *SecurityGroup) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &SecurityGroup{} diff --git a/upup/pkg/fi/cloudup/openstacktasks/securitygrouprule.go b/upup/pkg/fi/cloudup/openstacktasks/securitygrouprule.go index 81da3cedbb..62fd6142c3 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/securitygrouprule.go +++ b/upup/pkg/fi/cloudup/openstacktasks/securitygrouprule.go @@ -47,7 +47,7 @@ type SecurityGroupRule struct { Protocol *string RemoteIPPrefix *string RemoteGroup *SecurityGroup - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Delete *bool } @@ -181,13 +181,13 @@ func (*SecurityGroupRule) RenderOpenstack(t *openstack.OpenstackAPITarget, a, e, var _ fi.HasLifecycle = &SecurityGroupRule{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *SecurityGroupRule) GetLifecycle() *fi.Lifecycle { +func (o *SecurityGroupRule) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *SecurityGroupRule) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasLifecycle = &SecurityGroupRule{} diff --git a/upup/pkg/fi/cloudup/openstacktasks/servergroup.go b/upup/pkg/fi/cloudup/openstacktasks/servergroup.go index 6431fa36b7..760928194b 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/servergroup.go +++ b/upup/pkg/fi/cloudup/openstacktasks/servergroup.go @@ -36,7 +36,7 @@ type ServerGroup struct { IGName *string Policies []string MaxSize *int32 - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle mutex sync.Mutex diff --git a/upup/pkg/fi/cloudup/openstacktasks/servergroup_fitask.go b/upup/pkg/fi/cloudup/openstacktasks/servergroup_fitask.go index 03951bbf70..2d73141dc0 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/servergroup_fitask.go +++ b/upup/pkg/fi/cloudup/openstacktasks/servergroup_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &ServerGroup{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *ServerGroup) GetLifecycle() *fi.Lifecycle { +func (o *ServerGroup) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *ServerGroup) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &ServerGroup{} diff --git a/upup/pkg/fi/cloudup/openstacktasks/sshkey.go b/upup/pkg/fi/cloudup/openstacktasks/sshkey.go index ab27366847..02a23554d1 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/sshkey.go +++ b/upup/pkg/fi/cloudup/openstacktasks/sshkey.go @@ -31,7 +31,7 @@ import ( // +kops:fitask type SSHKey struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle PublicKey fi.Resource diff --git a/upup/pkg/fi/cloudup/openstacktasks/sshkey_fitask.go b/upup/pkg/fi/cloudup/openstacktasks/sshkey_fitask.go index 0607a86a3a..6a6c92d279 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/sshkey_fitask.go +++ b/upup/pkg/fi/cloudup/openstacktasks/sshkey_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &SSHKey{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *SSHKey) GetLifecycle() *fi.Lifecycle { +func (o *SSHKey) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *SSHKey) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &SSHKey{} diff --git a/upup/pkg/fi/cloudup/openstacktasks/subnet.go b/upup/pkg/fi/cloudup/openstacktasks/subnet.go index 89057709f5..dad67e7468 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/subnet.go +++ b/upup/pkg/fi/cloudup/openstacktasks/subnet.go @@ -34,7 +34,7 @@ type Subnet struct { CIDR *string DNSServers []*string Tag *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } // GetDependencies returns the dependencies of the Port task @@ -54,7 +54,7 @@ func (s *Subnet) CompareWithID() *string { return s.ID } -func NewSubnetTaskFromCloud(cloud openstack.OpenstackCloud, lifecycle *fi.Lifecycle, subnet *subnets.Subnet, find *Subnet) (*Subnet, error) { +func NewSubnetTaskFromCloud(cloud openstack.OpenstackCloud, lifecycle fi.Lifecycle, subnet *subnets.Subnet, find *Subnet) (*Subnet, error) { network, err := cloud.GetNetwork(subnet.NetworkID) if err != nil { return nil, fmt.Errorf("NewSubnetTaskFromCloud: Failed to get network with ID %s: %v", subnet.NetworkID, err) diff --git a/upup/pkg/fi/cloudup/openstacktasks/subnet_fitask.go b/upup/pkg/fi/cloudup/openstacktasks/subnet_fitask.go index 1952c033d5..9d6412eb01 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/subnet_fitask.go +++ b/upup/pkg/fi/cloudup/openstacktasks/subnet_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &Subnet{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *Subnet) GetLifecycle() *fi.Lifecycle { +func (o *Subnet) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *Subnet) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &Subnet{} diff --git a/upup/pkg/fi/cloudup/openstacktasks/volume.go b/upup/pkg/fi/cloudup/openstacktasks/volume.go index da4eb900bd..1a91827fb3 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/volume.go +++ b/upup/pkg/fi/cloudup/openstacktasks/volume.go @@ -33,7 +33,7 @@ type Volume struct { VolumeType *string SizeGB *int64 Tags map[string]string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.CompareWithID = &Volume{} diff --git a/upup/pkg/fi/cloudup/openstacktasks/volume_fitask.go b/upup/pkg/fi/cloudup/openstacktasks/volume_fitask.go index 363273cbd7..21ff9b8665 100644 --- a/upup/pkg/fi/cloudup/openstacktasks/volume_fitask.go +++ b/upup/pkg/fi/cloudup/openstacktasks/volume_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &Volume{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *Volume) GetLifecycle() *fi.Lifecycle { +func (o *Volume) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *Volume) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &Volume{} diff --git a/upup/pkg/fi/cloudup/spotinsttasks/elastigroup.go b/upup/pkg/fi/cloudup/spotinsttasks/elastigroup.go index 002a92a2a9..ae336b6d53 100644 --- a/upup/pkg/fi/cloudup/spotinsttasks/elastigroup.go +++ b/upup/pkg/fi/cloudup/spotinsttasks/elastigroup.go @@ -44,7 +44,7 @@ import ( // +kops:fitask type Elastigroup struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ID *string Region *string diff --git a/upup/pkg/fi/cloudup/spotinsttasks/elastigroup_fitask.go b/upup/pkg/fi/cloudup/spotinsttasks/elastigroup_fitask.go index 5ab9d19825..619f3ff4af 100644 --- a/upup/pkg/fi/cloudup/spotinsttasks/elastigroup_fitask.go +++ b/upup/pkg/fi/cloudup/spotinsttasks/elastigroup_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &Elastigroup{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *Elastigroup) GetLifecycle() *fi.Lifecycle { +func (o *Elastigroup) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *Elastigroup) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &Elastigroup{} diff --git a/upup/pkg/fi/cloudup/spotinsttasks/launch_spec.go b/upup/pkg/fi/cloudup/spotinsttasks/launch_spec.go index 2c8de6746d..76b8e56189 100644 --- a/upup/pkg/fi/cloudup/spotinsttasks/launch_spec.go +++ b/upup/pkg/fi/cloudup/spotinsttasks/launch_spec.go @@ -38,7 +38,7 @@ import ( // +kops:fitask type LaunchSpec struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ID *string SpotPercentage *int64 diff --git a/upup/pkg/fi/cloudup/spotinsttasks/launchspec_fitask.go b/upup/pkg/fi/cloudup/spotinsttasks/launchspec_fitask.go index 2b57f3d9d4..0e9e0e5612 100644 --- a/upup/pkg/fi/cloudup/spotinsttasks/launchspec_fitask.go +++ b/upup/pkg/fi/cloudup/spotinsttasks/launchspec_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &LaunchSpec{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *LaunchSpec) GetLifecycle() *fi.Lifecycle { +func (o *LaunchSpec) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *LaunchSpec) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &LaunchSpec{} diff --git a/upup/pkg/fi/cloudup/spotinsttasks/ocean.go b/upup/pkg/fi/cloudup/spotinsttasks/ocean.go index c885109f54..a7cc1d6d8c 100644 --- a/upup/pkg/fi/cloudup/spotinsttasks/ocean.go +++ b/upup/pkg/fi/cloudup/spotinsttasks/ocean.go @@ -39,7 +39,7 @@ import ( // +kops:fitask type Ocean struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle ID *string MinSize *int64 diff --git a/upup/pkg/fi/cloudup/spotinsttasks/ocean_fitask.go b/upup/pkg/fi/cloudup/spotinsttasks/ocean_fitask.go index c1fc22a5f4..ac9992b1f1 100644 --- a/upup/pkg/fi/cloudup/spotinsttasks/ocean_fitask.go +++ b/upup/pkg/fi/cloudup/spotinsttasks/ocean_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &Ocean{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *Ocean) GetLifecycle() *fi.Lifecycle { +func (o *Ocean) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *Ocean) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &Ocean{} diff --git a/upup/pkg/fi/context.go b/upup/pkg/fi/context.go index ae53535ae0..6157c8ad3e 100644 --- a/upup/pkg/fi/context.go +++ b/upup/pkg/fi/context.go @@ -115,22 +115,22 @@ var typeContextPtr = reflect.TypeOf((*Context)(nil)) // it is typically called after we have checked the existing state of the Task and determined that is different // from the desired state. func (c *Context) Render(a, e, changes Task) error { - var lifecycle *Lifecycle + var lifecycle Lifecycle if hl, ok := e.(HasLifecycle); ok { lifecycle = hl.GetLifecycle() } - if lifecycle != nil { + if lifecycle != "" { if reflect.ValueOf(a).IsNil() { - switch *lifecycle { + switch lifecycle { case LifecycleExistsAndValidates: return fmt.Errorf("lifecycle set to ExistsAndValidates, but object was not found") case LifecycleExistsAndWarnIfChanges: return NewExistsAndWarnIfChangesError("Lifecycle set to ExistsAndWarnIfChanges and object was not found.") } } else { - switch *lifecycle { + switch lifecycle { case LifecycleExistsAndValidates, LifecycleExistsAndWarnIfChanges: out := os.Stderr @@ -157,7 +157,7 @@ func (c *Context) Render(a, e, changes Task) error { fmt.Fprintf(b, "\n") b.WriteTo(out) - if *lifecycle == LifecycleExistsAndValidates { + if lifecycle == LifecycleExistsAndValidates { return fmt.Errorf("lifecycle set to ExistsAndValidates, but object did not match") } // Warn, but then we continue diff --git a/upup/pkg/fi/default_methods.go b/upup/pkg/fi/default_methods.go index 1ebfc68cf5..8f41b552a8 100644 --- a/upup/pkg/fi/default_methods.go +++ b/upup/pkg/fi/default_methods.go @@ -29,13 +29,12 @@ func DefaultDeltaRunMethod(e Task, c *Context) error { var a Task var err error - var lifecycle Lifecycle = LifecycleSync + lifecycle := LifecycleSync if hl, ok := e.(HasLifecycle); ok { - l := hl.GetLifecycle() - if l == nil || *l == "" { + lifecycle = hl.GetLifecycle() + if lifecycle == "" { return fmt.Errorf("task does not have a lifecycle set") } - lifecycle = *l } if lifecycle == LifecycleIgnore { diff --git a/upup/pkg/fi/fitasks/keypair.go b/upup/pkg/fi/fitasks/keypair.go index 80f56b076e..a2fc296e24 100644 --- a/upup/pkg/fi/fitasks/keypair.go +++ b/upup/pkg/fi/fitasks/keypair.go @@ -36,7 +36,7 @@ type Keypair struct { // AlternateNames a list of alternative names for this certificate AlternateNames []string `json:"alternateNames"` // Lifecycle is context for a task - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle // Signer is the keypair to use to sign, for when we want to use an alternative CA Signer *Keypair // Subject is the certificate subject diff --git a/upup/pkg/fi/fitasks/keypair_fitask.go b/upup/pkg/fi/fitasks/keypair_fitask.go index b24f988c1f..69b0fd8609 100644 --- a/upup/pkg/fi/fitasks/keypair_fitask.go +++ b/upup/pkg/fi/fitasks/keypair_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &Keypair{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *Keypair) GetLifecycle() *fi.Lifecycle { +func (o *Keypair) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *Keypair) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &Keypair{} diff --git a/upup/pkg/fi/fitasks/managedfile.go b/upup/pkg/fi/fitasks/managedfile.go index 3fb3226a22..6028e4124b 100644 --- a/upup/pkg/fi/fitasks/managedfile.go +++ b/upup/pkg/fi/fitasks/managedfile.go @@ -30,7 +30,7 @@ import ( // +kops:fitask type ManagedFile struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle Base *string Location *string diff --git a/upup/pkg/fi/fitasks/managedfile_fitask.go b/upup/pkg/fi/fitasks/managedfile_fitask.go index a9bba794f4..6e54855709 100644 --- a/upup/pkg/fi/fitasks/managedfile_fitask.go +++ b/upup/pkg/fi/fitasks/managedfile_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &ManagedFile{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *ManagedFile) GetLifecycle() *fi.Lifecycle { +func (o *ManagedFile) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *ManagedFile) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &ManagedFile{} diff --git a/upup/pkg/fi/fitasks/mirrorkeystore.go b/upup/pkg/fi/fitasks/mirrorkeystore.go index 78858f158d..1d40c49509 100644 --- a/upup/pkg/fi/fitasks/mirrorkeystore.go +++ b/upup/pkg/fi/fitasks/mirrorkeystore.go @@ -25,7 +25,7 @@ import ( // +kops:fitask type MirrorKeystore struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle MirrorPath vfs.Path } diff --git a/upup/pkg/fi/fitasks/mirrorkeystore_fitask.go b/upup/pkg/fi/fitasks/mirrorkeystore_fitask.go index ea3b39ba7b..2daa4248d2 100644 --- a/upup/pkg/fi/fitasks/mirrorkeystore_fitask.go +++ b/upup/pkg/fi/fitasks/mirrorkeystore_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &MirrorKeystore{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *MirrorKeystore) GetLifecycle() *fi.Lifecycle { +func (o *MirrorKeystore) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *MirrorKeystore) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &MirrorKeystore{} diff --git a/upup/pkg/fi/fitasks/mirrorsecrets.go b/upup/pkg/fi/fitasks/mirrorsecrets.go index c8d97c68e7..e4720dd89b 100644 --- a/upup/pkg/fi/fitasks/mirrorsecrets.go +++ b/upup/pkg/fi/fitasks/mirrorsecrets.go @@ -26,7 +26,7 @@ import ( // +kops:fitask type MirrorSecrets struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle MirrorPath vfs.Path } diff --git a/upup/pkg/fi/fitasks/mirrorsecrets_fitask.go b/upup/pkg/fi/fitasks/mirrorsecrets_fitask.go index b8c91c73c2..ca516fcf8e 100644 --- a/upup/pkg/fi/fitasks/mirrorsecrets_fitask.go +++ b/upup/pkg/fi/fitasks/mirrorsecrets_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &MirrorSecrets{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *MirrorSecrets) GetLifecycle() *fi.Lifecycle { +func (o *MirrorSecrets) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *MirrorSecrets) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &MirrorSecrets{} diff --git a/upup/pkg/fi/fitasks/secret.go b/upup/pkg/fi/fitasks/secret.go index 6ffe73dfa8..f51b10c5dc 100644 --- a/upup/pkg/fi/fitasks/secret.go +++ b/upup/pkg/fi/fitasks/secret.go @@ -25,7 +25,7 @@ import ( // +kops:fitask type Secret struct { Name *string - Lifecycle *fi.Lifecycle + Lifecycle fi.Lifecycle } var _ fi.HasCheckExisting = &Secret{} diff --git a/upup/pkg/fi/fitasks/secret_fitask.go b/upup/pkg/fi/fitasks/secret_fitask.go index 05a16c3c86..d801ecca87 100644 --- a/upup/pkg/fi/fitasks/secret_fitask.go +++ b/upup/pkg/fi/fitasks/secret_fitask.go @@ -29,13 +29,13 @@ import ( var _ fi.HasLifecycle = &Secret{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *Secret) GetLifecycle() *fi.Lifecycle { +func (o *Secret) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *Secret) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &Secret{} diff --git a/upup/pkg/fi/lifecycle.go b/upup/pkg/fi/lifecycle.go index aad2e07c33..e41ffc457a 100644 --- a/upup/pkg/fi/lifecycle.go +++ b/upup/pkg/fi/lifecycle.go @@ -39,7 +39,7 @@ const ( // HasLifecycle indicates that the task has a Lifecycle type HasLifecycle interface { - GetLifecycle() *Lifecycle + GetLifecycle() Lifecycle // SetLifecycle is used to override a tasks lifecycle. If a lifecycle override exists for a specific task name, then the // lifecycle is modified. SetLifecycle(lifecycle Lifecycle) diff --git a/upup/tools/generators/fitask/generator.go b/upup/tools/generators/fitask/generator.go index 96c00f345c..4e133d3939 100644 --- a/upup/tools/generators/fitask/generator.go +++ b/upup/tools/generators/fitask/generator.go @@ -44,13 +44,13 @@ const perTypeDef = ` var _ fi.HasLifecycle = &{{.Name}}{} // GetLifecycle returns the Lifecycle of the object, implementing fi.HasLifecycle -func (o *{{.Name}}) GetLifecycle() *fi.Lifecycle { +func (o *{{.Name}}) GetLifecycle() fi.Lifecycle { return o.Lifecycle } // SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle func (o *{{.Name}}) SetLifecycle(lifecycle fi.Lifecycle) { - o.Lifecycle = &lifecycle + o.Lifecycle = lifecycle } var _ fi.HasName = &{{.Name}}{}