mirror of https://github.com/kubernetes/kops.git
Merge pull request #2964 from chrislovecnm/inventory-01-add-api
Automatic merge from submit-queue New inventory assets API First PR of many for the Assets functionality. See https://github.com/kubernetes/kops/pull/2917 for details
This commit is contained in:
commit
6aedfd4695
|
@ -249,6 +249,16 @@ type ClusterSpec struct {
|
||||||
|
|
||||||
// Hooks for custom actions e.g. on first installation
|
// Hooks for custom actions e.g. on first installation
|
||||||
Hooks []HookSpec `json:"hooks,omitempty"`
|
Hooks []HookSpec `json:"hooks,omitempty"`
|
||||||
|
|
||||||
|
// Alternative locations for files and containers
|
||||||
|
// This API component is under contruction, will remove this comment
|
||||||
|
// once this API is fully functional.
|
||||||
|
Assets *Assets `json:"assets,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Assets struct {
|
||||||
|
ContainerRegistry *string `json:"containerRegistry,omitempty"`
|
||||||
|
FileRepository *string `json:"fileRepository,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type HookSpec struct {
|
type HookSpec struct {
|
||||||
|
|
|
@ -243,6 +243,14 @@ type ClusterSpec struct {
|
||||||
|
|
||||||
// Hooks for custom actions e.g. on first installation
|
// Hooks for custom actions e.g. on first installation
|
||||||
Hooks []HookSpec `json:"hooks,omitempty"`
|
Hooks []HookSpec `json:"hooks,omitempty"`
|
||||||
|
|
||||||
|
// Alternative locations for files and containers
|
||||||
|
Assets *Assets `json:"assets,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Assets struct {
|
||||||
|
ContainerRegistry *string `json:"containerRegistry,omitempty"`
|
||||||
|
FileRepository *string `json:"fileRepository,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type HookSpec struct {
|
type HookSpec struct {
|
||||||
|
|
|
@ -39,6 +39,8 @@ func RegisterConversions(scheme *runtime.Scheme) error {
|
||||||
Convert_kops_AccessSpec_To_v1alpha1_AccessSpec,
|
Convert_kops_AccessSpec_To_v1alpha1_AccessSpec,
|
||||||
Convert_v1alpha1_AlwaysAllowAuthorizationSpec_To_kops_AlwaysAllowAuthorizationSpec,
|
Convert_v1alpha1_AlwaysAllowAuthorizationSpec_To_kops_AlwaysAllowAuthorizationSpec,
|
||||||
Convert_kops_AlwaysAllowAuthorizationSpec_To_v1alpha1_AlwaysAllowAuthorizationSpec,
|
Convert_kops_AlwaysAllowAuthorizationSpec_To_v1alpha1_AlwaysAllowAuthorizationSpec,
|
||||||
|
Convert_v1alpha1_Assets_To_kops_Assets,
|
||||||
|
Convert_kops_Assets_To_v1alpha1_Assets,
|
||||||
Convert_v1alpha1_AuthenticationSpec_To_kops_AuthenticationSpec,
|
Convert_v1alpha1_AuthenticationSpec_To_kops_AuthenticationSpec,
|
||||||
Convert_kops_AuthenticationSpec_To_v1alpha1_AuthenticationSpec,
|
Convert_kops_AuthenticationSpec_To_v1alpha1_AuthenticationSpec,
|
||||||
Convert_v1alpha1_AuthorizationSpec_To_kops_AuthorizationSpec,
|
Convert_v1alpha1_AuthorizationSpec_To_kops_AuthorizationSpec,
|
||||||
|
@ -194,6 +196,28 @@ func Convert_kops_AlwaysAllowAuthorizationSpec_To_v1alpha1_AlwaysAllowAuthorizat
|
||||||
return autoConvert_kops_AlwaysAllowAuthorizationSpec_To_v1alpha1_AlwaysAllowAuthorizationSpec(in, out, s)
|
return autoConvert_kops_AlwaysAllowAuthorizationSpec_To_v1alpha1_AlwaysAllowAuthorizationSpec(in, out, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func autoConvert_v1alpha1_Assets_To_kops_Assets(in *Assets, out *kops.Assets, s conversion.Scope) error {
|
||||||
|
out.ContainerRegistry = in.ContainerRegistry
|
||||||
|
out.FileRepository = in.FileRepository
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_v1alpha1_Assets_To_kops_Assets is an autogenerated conversion function.
|
||||||
|
func Convert_v1alpha1_Assets_To_kops_Assets(in *Assets, out *kops.Assets, s conversion.Scope) error {
|
||||||
|
return autoConvert_v1alpha1_Assets_To_kops_Assets(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_kops_Assets_To_v1alpha1_Assets(in *kops.Assets, out *Assets, s conversion.Scope) error {
|
||||||
|
out.ContainerRegistry = in.ContainerRegistry
|
||||||
|
out.FileRepository = in.FileRepository
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_kops_Assets_To_v1alpha1_Assets is an autogenerated conversion function.
|
||||||
|
func Convert_kops_Assets_To_v1alpha1_Assets(in *kops.Assets, out *Assets, s conversion.Scope) error {
|
||||||
|
return autoConvert_kops_Assets_To_v1alpha1_Assets(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
func autoConvert_v1alpha1_AuthenticationSpec_To_kops_AuthenticationSpec(in *AuthenticationSpec, out *kops.AuthenticationSpec, s conversion.Scope) error {
|
func autoConvert_v1alpha1_AuthenticationSpec_To_kops_AuthenticationSpec(in *AuthenticationSpec, out *kops.AuthenticationSpec, s conversion.Scope) error {
|
||||||
if in.Kopeio != nil {
|
if in.Kopeio != nil {
|
||||||
in, out := &in.Kopeio, &out.Kopeio
|
in, out := &in.Kopeio, &out.Kopeio
|
||||||
|
@ -641,6 +665,15 @@ func autoConvert_v1alpha1_ClusterSpec_To_kops_ClusterSpec(in *ClusterSpec, out *
|
||||||
} else {
|
} else {
|
||||||
out.Hooks = nil
|
out.Hooks = nil
|
||||||
}
|
}
|
||||||
|
if in.Assets != nil {
|
||||||
|
in, out := &in.Assets, &out.Assets
|
||||||
|
*out = new(kops.Assets)
|
||||||
|
if err := Convert_v1alpha1_Assets_To_kops_Assets(*in, *out, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.Assets = nil
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -817,6 +850,15 @@ func autoConvert_kops_ClusterSpec_To_v1alpha1_ClusterSpec(in *kops.ClusterSpec,
|
||||||
} else {
|
} else {
|
||||||
out.Hooks = nil
|
out.Hooks = nil
|
||||||
}
|
}
|
||||||
|
if in.Assets != nil {
|
||||||
|
in, out := &in.Assets, &out.Assets
|
||||||
|
*out = new(Assets)
|
||||||
|
if err := Convert_kops_Assets_To_v1alpha1_Assets(*in, *out, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.Assets = nil
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -169,6 +169,14 @@ type ClusterSpec struct {
|
||||||
|
|
||||||
// Hooks for custom actions e.g. on first installation
|
// Hooks for custom actions e.g. on first installation
|
||||||
Hooks []HookSpec `json:"hooks,omitempty"`
|
Hooks []HookSpec `json:"hooks,omitempty"`
|
||||||
|
|
||||||
|
// Alternative locations for files and containers
|
||||||
|
Assets *Assets `json:"assets,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type Assets struct {
|
||||||
|
ContainerRegistry *string `json:"containerRegistry,omitempty"`
|
||||||
|
FileRepository *string `json:"fileRepository,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type HookSpec struct {
|
type HookSpec struct {
|
||||||
|
|
|
@ -39,6 +39,8 @@ func RegisterConversions(scheme *runtime.Scheme) error {
|
||||||
Convert_kops_AccessSpec_To_v1alpha2_AccessSpec,
|
Convert_kops_AccessSpec_To_v1alpha2_AccessSpec,
|
||||||
Convert_v1alpha2_AlwaysAllowAuthorizationSpec_To_kops_AlwaysAllowAuthorizationSpec,
|
Convert_v1alpha2_AlwaysAllowAuthorizationSpec_To_kops_AlwaysAllowAuthorizationSpec,
|
||||||
Convert_kops_AlwaysAllowAuthorizationSpec_To_v1alpha2_AlwaysAllowAuthorizationSpec,
|
Convert_kops_AlwaysAllowAuthorizationSpec_To_v1alpha2_AlwaysAllowAuthorizationSpec,
|
||||||
|
Convert_v1alpha2_Assets_To_kops_Assets,
|
||||||
|
Convert_kops_Assets_To_v1alpha2_Assets,
|
||||||
Convert_v1alpha2_AuthenticationSpec_To_kops_AuthenticationSpec,
|
Convert_v1alpha2_AuthenticationSpec_To_kops_AuthenticationSpec,
|
||||||
Convert_kops_AuthenticationSpec_To_v1alpha2_AuthenticationSpec,
|
Convert_kops_AuthenticationSpec_To_v1alpha2_AuthenticationSpec,
|
||||||
Convert_v1alpha2_AuthorizationSpec_To_kops_AuthorizationSpec,
|
Convert_v1alpha2_AuthorizationSpec_To_kops_AuthorizationSpec,
|
||||||
|
@ -200,6 +202,28 @@ func Convert_kops_AlwaysAllowAuthorizationSpec_To_v1alpha2_AlwaysAllowAuthorizat
|
||||||
return autoConvert_kops_AlwaysAllowAuthorizationSpec_To_v1alpha2_AlwaysAllowAuthorizationSpec(in, out, s)
|
return autoConvert_kops_AlwaysAllowAuthorizationSpec_To_v1alpha2_AlwaysAllowAuthorizationSpec(in, out, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func autoConvert_v1alpha2_Assets_To_kops_Assets(in *Assets, out *kops.Assets, s conversion.Scope) error {
|
||||||
|
out.ContainerRegistry = in.ContainerRegistry
|
||||||
|
out.FileRepository = in.FileRepository
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_v1alpha2_Assets_To_kops_Assets is an autogenerated conversion function.
|
||||||
|
func Convert_v1alpha2_Assets_To_kops_Assets(in *Assets, out *kops.Assets, s conversion.Scope) error {
|
||||||
|
return autoConvert_v1alpha2_Assets_To_kops_Assets(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func autoConvert_kops_Assets_To_v1alpha2_Assets(in *kops.Assets, out *Assets, s conversion.Scope) error {
|
||||||
|
out.ContainerRegistry = in.ContainerRegistry
|
||||||
|
out.FileRepository = in.FileRepository
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert_kops_Assets_To_v1alpha2_Assets is an autogenerated conversion function.
|
||||||
|
func Convert_kops_Assets_To_v1alpha2_Assets(in *kops.Assets, out *Assets, s conversion.Scope) error {
|
||||||
|
return autoConvert_kops_Assets_To_v1alpha2_Assets(in, out, s)
|
||||||
|
}
|
||||||
|
|
||||||
func autoConvert_v1alpha2_AuthenticationSpec_To_kops_AuthenticationSpec(in *AuthenticationSpec, out *kops.AuthenticationSpec, s conversion.Scope) error {
|
func autoConvert_v1alpha2_AuthenticationSpec_To_kops_AuthenticationSpec(in *AuthenticationSpec, out *kops.AuthenticationSpec, s conversion.Scope) error {
|
||||||
if in.Kopeio != nil {
|
if in.Kopeio != nil {
|
||||||
in, out := &in.Kopeio, &out.Kopeio
|
in, out := &in.Kopeio, &out.Kopeio
|
||||||
|
@ -679,6 +703,15 @@ func autoConvert_v1alpha2_ClusterSpec_To_kops_ClusterSpec(in *ClusterSpec, out *
|
||||||
} else {
|
} else {
|
||||||
out.Hooks = nil
|
out.Hooks = nil
|
||||||
}
|
}
|
||||||
|
if in.Assets != nil {
|
||||||
|
in, out := &in.Assets, &out.Assets
|
||||||
|
*out = new(kops.Assets)
|
||||||
|
if err := Convert_v1alpha2_Assets_To_kops_Assets(*in, *out, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.Assets = nil
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -870,6 +903,15 @@ func autoConvert_kops_ClusterSpec_To_v1alpha2_ClusterSpec(in *kops.ClusterSpec,
|
||||||
} else {
|
} else {
|
||||||
out.Hooks = nil
|
out.Hooks = nil
|
||||||
}
|
}
|
||||||
|
if in.Assets != nil {
|
||||||
|
in, out := &in.Assets, &out.Assets
|
||||||
|
*out = new(Assets)
|
||||||
|
if err := Convert_kops_Assets_To_v1alpha2_Assets(*in, *out, s); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
out.Assets = nil
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue