From 61cff4dfcf4478e2f968d1901495edf2c442f644 Mon Sep 17 00:00:00 2001 From: chrislovecnm Date: Thu, 9 Nov 2017 14:31:40 -0700 Subject: [PATCH 1/2] updating missed api machinery --- pkg/apis/kops/v1alpha1/zz_generated.conversion.go | 4 ++-- pkg/apis/kops/v1alpha1/zz_generated.deepcopy.go | 8 ++++++-- pkg/apis/kops/v1alpha2/zz_generated.conversion.go | 4 ++-- pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go | 8 ++++++-- pkg/apis/kops/zz_generated.deepcopy.go | 8 ++++++-- .../clientset_generated/clientset/scheme/register.go | 3 +-- .../internalclientset/scheme/register.go | 3 +-- 7 files changed, 24 insertions(+), 14 deletions(-) diff --git a/pkg/apis/kops/v1alpha1/zz_generated.conversion.go b/pkg/apis/kops/v1alpha1/zz_generated.conversion.go index 1dc8974492c00..2560e85cae193 100644 --- a/pkg/apis/kops/v1alpha1/zz_generated.conversion.go +++ b/pkg/apis/kops/v1alpha1/zz_generated.conversion.go @@ -587,7 +587,6 @@ func autoConvert_v1alpha1_ClusterSpec_To_kops_ClusterSpec(in *ClusterSpec, out * out.Project = in.Project out.MasterPublicName = in.MasterPublicName out.MasterInternalName = in.MasterInternalName - out.AdditionalSANs = in.AdditionalSANs out.NetworkCIDR = in.NetworkCIDR out.NetworkID = in.NetworkID if in.Topology != nil { @@ -603,6 +602,7 @@ func autoConvert_v1alpha1_ClusterSpec_To_kops_ClusterSpec(in *ClusterSpec, out * out.KeyStore = in.KeyStore out.ConfigStore = in.ConfigStore out.DNSZone = in.DNSZone + out.AdditionalSANs = in.AdditionalSANs out.ClusterDNSDomain = in.ClusterDNSDomain // WARNING: in.Multizone requires manual conversion: does not exist in peer-type out.ServiceClusterIPRange = in.ServiceClusterIPRange @@ -822,7 +822,6 @@ func autoConvert_kops_ClusterSpec_To_v1alpha1_ClusterSpec(in *kops.ClusterSpec, out.Project = in.Project out.MasterPublicName = in.MasterPublicName out.MasterInternalName = in.MasterInternalName - out.AdditionalSANs = in.AdditionalSANs out.NetworkCIDR = in.NetworkCIDR out.NetworkID = in.NetworkID if in.Topology != nil { @@ -838,6 +837,7 @@ func autoConvert_kops_ClusterSpec_To_v1alpha1_ClusterSpec(in *kops.ClusterSpec, out.KeyStore = in.KeyStore out.ConfigStore = in.ConfigStore out.DNSZone = in.DNSZone + out.AdditionalSANs = in.AdditionalSANs out.ClusterDNSDomain = in.ClusterDNSDomain out.ServiceClusterIPRange = in.ServiceClusterIPRange out.NonMasqueradeCIDR = in.NonMasqueradeCIDR diff --git a/pkg/apis/kops/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/kops/v1alpha1/zz_generated.deepcopy.go index 964ad95e155f0..2efce9671aa31 100644 --- a/pkg/apis/kops/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/kops/v1alpha1/zz_generated.deepcopy.go @@ -21,11 +21,10 @@ limitations under the License. package v1alpha1 import ( - reflect "reflect" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" + reflect "reflect" ) func init() { @@ -759,6 +758,11 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { (*in).DeepCopyInto(*out) } } + if in.AdditionalSANs != nil { + in, out := &in.AdditionalSANs, &out.AdditionalSANs + *out = make([]string, len(*in)) + copy(*out, *in) + } if in.Multizone != nil { in, out := &in.Multizone, &out.Multizone if *in == nil { diff --git a/pkg/apis/kops/v1alpha2/zz_generated.conversion.go b/pkg/apis/kops/v1alpha2/zz_generated.conversion.go index fb2c0424a28af..c4dac67f67404 100644 --- a/pkg/apis/kops/v1alpha2/zz_generated.conversion.go +++ b/pkg/apis/kops/v1alpha2/zz_generated.conversion.go @@ -633,7 +633,6 @@ func autoConvert_v1alpha2_ClusterSpec_To_kops_ClusterSpec(in *ClusterSpec, out * out.Project = in.Project out.MasterPublicName = in.MasterPublicName out.MasterInternalName = in.MasterInternalName - out.AdditionalSANs = in.AdditionalSANs out.NetworkCIDR = in.NetworkCIDR out.NetworkID = in.NetworkID if in.Topology != nil { @@ -649,6 +648,7 @@ func autoConvert_v1alpha2_ClusterSpec_To_kops_ClusterSpec(in *ClusterSpec, out * out.KeyStore = in.KeyStore out.ConfigStore = in.ConfigStore out.DNSZone = in.DNSZone + out.AdditionalSANs = in.AdditionalSANs out.ClusterDNSDomain = in.ClusterDNSDomain out.ServiceClusterIPRange = in.ServiceClusterIPRange out.NonMasqueradeCIDR = in.NonMasqueradeCIDR @@ -884,7 +884,6 @@ func autoConvert_kops_ClusterSpec_To_v1alpha2_ClusterSpec(in *kops.ClusterSpec, out.Project = in.Project out.MasterPublicName = in.MasterPublicName out.MasterInternalName = in.MasterInternalName - out.AdditionalSANs = in.AdditionalSANs out.NetworkCIDR = in.NetworkCIDR out.NetworkID = in.NetworkID if in.Topology != nil { @@ -900,6 +899,7 @@ func autoConvert_kops_ClusterSpec_To_v1alpha2_ClusterSpec(in *kops.ClusterSpec, out.KeyStore = in.KeyStore out.ConfigStore = in.ConfigStore out.DNSZone = in.DNSZone + out.AdditionalSANs = in.AdditionalSANs out.ClusterDNSDomain = in.ClusterDNSDomain out.ServiceClusterIPRange = in.ServiceClusterIPRange out.NonMasqueradeCIDR = in.NonMasqueradeCIDR diff --git a/pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go b/pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go index e65eddfab6c86..ea5e1b9d42836 100644 --- a/pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go +++ b/pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go @@ -21,11 +21,10 @@ limitations under the License. package v1alpha2 import ( - reflect "reflect" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" + reflect "reflect" ) func init() { @@ -768,6 +767,11 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { (*in).DeepCopyInto(*out) } } + if in.AdditionalSANs != nil { + in, out := &in.AdditionalSANs, &out.AdditionalSANs + *out = make([]string, len(*in)) + copy(*out, *in) + } if in.SSHAccess != nil { in, out := &in.SSHAccess, &out.SSHAccess *out = make([]string, len(*in)) diff --git a/pkg/apis/kops/zz_generated.deepcopy.go b/pkg/apis/kops/zz_generated.deepcopy.go index eb212227201a6..5e062917d3bb4 100644 --- a/pkg/apis/kops/zz_generated.deepcopy.go +++ b/pkg/apis/kops/zz_generated.deepcopy.go @@ -21,11 +21,10 @@ limitations under the License. package kops import ( - reflect "reflect" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" conversion "k8s.io/apimachinery/pkg/conversion" runtime "k8s.io/apimachinery/pkg/runtime" + reflect "reflect" ) func init() { @@ -913,6 +912,11 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { (*in).DeepCopyInto(*out) } } + if in.AdditionalSANs != nil { + in, out := &in.AdditionalSANs, &out.AdditionalSANs + *out = make([]string, len(*in)) + copy(*out, *in) + } if in.SSHAccess != nil { in, out := &in.SSHAccess, &out.SSHAccess *out = make([]string, len(*in)) diff --git a/pkg/client/clientset_generated/clientset/scheme/register.go b/pkg/client/clientset_generated/clientset/scheme/register.go index 3284ad953b408..0c46a3329cd2c 100644 --- a/pkg/client/clientset_generated/clientset/scheme/register.go +++ b/pkg/client/clientset_generated/clientset/scheme/register.go @@ -17,8 +17,6 @@ limitations under the License. package scheme import ( - os "os" - announced "k8s.io/apimachinery/pkg/apimachinery/announced" registered "k8s.io/apimachinery/pkg/apimachinery/registered" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -26,6 +24,7 @@ import ( schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" kops "k8s.io/kops/pkg/apis/kops/install" + os "os" ) var Scheme = runtime.NewScheme() diff --git a/pkg/client/clientset_generated/internalclientset/scheme/register.go b/pkg/client/clientset_generated/internalclientset/scheme/register.go index 3284ad953b408..0c46a3329cd2c 100644 --- a/pkg/client/clientset_generated/internalclientset/scheme/register.go +++ b/pkg/client/clientset_generated/internalclientset/scheme/register.go @@ -17,8 +17,6 @@ limitations under the License. package scheme import ( - os "os" - announced "k8s.io/apimachinery/pkg/apimachinery/announced" registered "k8s.io/apimachinery/pkg/apimachinery/registered" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -26,6 +24,7 @@ import ( schema "k8s.io/apimachinery/pkg/runtime/schema" serializer "k8s.io/apimachinery/pkg/runtime/serializer" kops "k8s.io/kops/pkg/apis/kops/install" + os "os" ) var Scheme = runtime.NewScheme() From 6de1828e14edd9146f809c028d0811a5668a79b9 Mon Sep 17 00:00:00 2001 From: chrislovecnm Date: Thu, 9 Nov 2017 14:32:57 -0700 Subject: [PATCH 2/2] updating api reference docs --- docs/apireference/build/index.html | 4 ++++ pkg/openapi/openapi_generated.go | 28 ++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/docs/apireference/build/index.html b/docs/apireference/build/index.html index a037464cb738c..ba9da309ff021 100644 --- a/docs/apireference/build/index.html +++ b/docs/apireference/build/index.html @@ -98,6 +98,10 @@

ClusterSpec v1alpha2 kops

Additional policies to add for roles +additionalSans
string array +AdditionalSANs adds additional Subject Alternate Names to apiserver cert that kops generates + + api
AccessSpec API field controls how the API is exposed outside the cluster diff --git a/pkg/openapi/openapi_generated.go b/pkg/openapi/openapi_generated.go index cfdcaf11c3ac9..bfe763d1f7693 100644 --- a/pkg/openapi/openapi_generated.go +++ b/pkg/openapi/openapi_generated.go @@ -21374,6 +21374,20 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA Format: "", }, }, + "additionalSans": { + SchemaProps: spec.SchemaProps{ + Description: "AdditionalSANs adds additional Subject Alternate Names to apiserver cert that kops generates", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, "clusterDNSDomain": { SchemaProps: spec.SchemaProps{ Description: "ClusterDNSDomain is the suffix we use for internal DNS names (normally cluster.local)", @@ -24588,6 +24602,20 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA Format: "", }, }, + "additionalSans": { + SchemaProps: spec.SchemaProps{ + Description: "AdditionalSANs adds additional Subject Alternate Names to apiserver cert that kops generates", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, "clusterDNSDomain": { SchemaProps: spec.SchemaProps{ Description: "ClusterDNSDomain is the suffix we use for internal DNS names (normally cluster.local)",