Add spoke operator

This commit is contained in:
Jian Qiu
2020-04-30 14:14:17 +08:00
parent fdbe918b1b
commit ce565e6380
24 changed files with 1598 additions and 125 deletions

View File

@@ -50,7 +50,11 @@ spec:
to be deployed on the spoke cluster.
type: array
items:
description: Manifest represents a resource to be deployed on
spoke cluster
type: object
x-kubernetes-preserve-unknown-fields: true
x-kubernetes-embedded-resource: true
status:
description: Status represents the current status of work
type: object

View File

@@ -10,7 +10,6 @@ import (
proto "github.com/gogo/protobuf/proto"
k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
math "math"
math_bits "math/bits"
@@ -29,10 +28,38 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
func (m *Manifest) Reset() { *m = Manifest{} }
func (*Manifest) ProtoMessage() {}
func (*Manifest) Descriptor() ([]byte, []int) {
return fileDescriptor_97234883da270a20, []int{0}
}
func (m *Manifest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Manifest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
func (m *Manifest) XXX_Merge(src proto.Message) {
xxx_messageInfo_Manifest.Merge(m, src)
}
func (m *Manifest) XXX_Size() int {
return m.Size()
}
func (m *Manifest) XXX_DiscardUnknown() {
xxx_messageInfo_Manifest.DiscardUnknown(m)
}
var xxx_messageInfo_Manifest proto.InternalMessageInfo
func (m *ManifestCondition) Reset() { *m = ManifestCondition{} }
func (*ManifestCondition) ProtoMessage() {}
func (*ManifestCondition) Descriptor() ([]byte, []int) {
return fileDescriptor_97234883da270a20, []int{0}
return fileDescriptor_97234883da270a20, []int{1}
}
func (m *ManifestCondition) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -60,7 +87,7 @@ var xxx_messageInfo_ManifestCondition proto.InternalMessageInfo
func (m *ManifestResourceMeta) Reset() { *m = ManifestResourceMeta{} }
func (*ManifestResourceMeta) ProtoMessage() {}
func (*ManifestResourceMeta) Descriptor() ([]byte, []int) {
return fileDescriptor_97234883da270a20, []int{1}
return fileDescriptor_97234883da270a20, []int{2}
}
func (m *ManifestResourceMeta) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -88,7 +115,7 @@ var xxx_messageInfo_ManifestResourceMeta proto.InternalMessageInfo
func (m *ManifestResourceStatus) Reset() { *m = ManifestResourceStatus{} }
func (*ManifestResourceStatus) ProtoMessage() {}
func (*ManifestResourceStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_97234883da270a20, []int{2}
return fileDescriptor_97234883da270a20, []int{3}
}
func (m *ManifestResourceStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -116,7 +143,7 @@ var xxx_messageInfo_ManifestResourceStatus proto.InternalMessageInfo
func (m *ManifestWork) Reset() { *m = ManifestWork{} }
func (*ManifestWork) ProtoMessage() {}
func (*ManifestWork) Descriptor() ([]byte, []int) {
return fileDescriptor_97234883da270a20, []int{3}
return fileDescriptor_97234883da270a20, []int{4}
}
func (m *ManifestWork) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -144,7 +171,7 @@ var xxx_messageInfo_ManifestWork proto.InternalMessageInfo
func (m *ManifestWorkList) Reset() { *m = ManifestWorkList{} }
func (*ManifestWorkList) ProtoMessage() {}
func (*ManifestWorkList) Descriptor() ([]byte, []int) {
return fileDescriptor_97234883da270a20, []int{4}
return fileDescriptor_97234883da270a20, []int{5}
}
func (m *ManifestWorkList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -172,7 +199,7 @@ var xxx_messageInfo_ManifestWorkList proto.InternalMessageInfo
func (m *ManifestWorkSpec) Reset() { *m = ManifestWorkSpec{} }
func (*ManifestWorkSpec) ProtoMessage() {}
func (*ManifestWorkSpec) Descriptor() ([]byte, []int) {
return fileDescriptor_97234883da270a20, []int{5}
return fileDescriptor_97234883da270a20, []int{6}
}
func (m *ManifestWorkSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -200,7 +227,7 @@ var xxx_messageInfo_ManifestWorkSpec proto.InternalMessageInfo
func (m *ManifestWorkStatus) Reset() { *m = ManifestWorkStatus{} }
func (*ManifestWorkStatus) ProtoMessage() {}
func (*ManifestWorkStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_97234883da270a20, []int{6}
return fileDescriptor_97234883da270a20, []int{7}
}
func (m *ManifestWorkStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -228,7 +255,7 @@ var xxx_messageInfo_ManifestWorkStatus proto.InternalMessageInfo
func (m *ManifestsTemplate) Reset() { *m = ManifestsTemplate{} }
func (*ManifestsTemplate) ProtoMessage() {}
func (*ManifestsTemplate) Descriptor() ([]byte, []int) {
return fileDescriptor_97234883da270a20, []int{7}
return fileDescriptor_97234883da270a20, []int{8}
}
func (m *ManifestsTemplate) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -256,7 +283,7 @@ var xxx_messageInfo_ManifestsTemplate proto.InternalMessageInfo
func (m *StatusCondition) Reset() { *m = StatusCondition{} }
func (*StatusCondition) ProtoMessage() {}
func (*StatusCondition) Descriptor() ([]byte, []int) {
return fileDescriptor_97234883da270a20, []int{8}
return fileDescriptor_97234883da270a20, []int{9}
}
func (m *StatusCondition) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -282,6 +309,7 @@ func (m *StatusCondition) XXX_DiscardUnknown() {
var xxx_messageInfo_StatusCondition proto.InternalMessageInfo
func init() {
proto.RegisterType((*Manifest)(nil), "github.com.open_cluster_management.api.work.v1.Manifest")
proto.RegisterType((*ManifestCondition)(nil), "github.com.open_cluster_management.api.work.v1.ManifestCondition")
proto.RegisterType((*ManifestResourceMeta)(nil), "github.com.open_cluster_management.api.work.v1.ManifestResourceMeta")
proto.RegisterType((*ManifestResourceStatus)(nil), "github.com.open_cluster_management.api.work.v1.ManifestResourceStatus")
@@ -298,63 +326,97 @@ func init() {
}
var fileDescriptor_97234883da270a20 = []byte{
// 884 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcb, 0x8b, 0x1c, 0x45,
0x18, 0x9f, 0xee, 0xec, 0xec, 0xa3, 0x76, 0xdd, 0x24, 0x45, 0x08, 0xcd, 0x1e, 0x7a, 0x97, 0x16,
0x64, 0x15, 0xb7, 0xda, 0x5d, 0x44, 0x3c, 0x88, 0x8f, 0x56, 0x23, 0x62, 0x36, 0x81, 0xca, 0x62,
0x40, 0x24, 0xb1, 0xb6, 0xa7, 0xd2, 0x5b, 0x99, 0xe9, 0xaa, 0xa6, 0xaa, 0x66, 0xe2, 0x5e, 0x44,
0x10, 0xc4, 0x83, 0x07, 0xf1, 0x6f, 0xf1, 0x0f, 0xf0, 0xb8, 0xc7, 0x80, 0x97, 0x9c, 0x06, 0x77,
0xfc, 0x2f, 0x3c, 0x49, 0x55, 0x57, 0x3f, 0x66, 0x66, 0x43, 0xf6, 0x01, 0x9e, 0x66, 0xfa, 0x7b,
0xfc, 0x7e, 0xdf, 0xf7, 0xd5, 0xf7, 0x00, 0x1f, 0x66, 0x4c, 0x1f, 0x0d, 0x0f, 0x51, 0x2a, 0xf2,
0x58, 0x14, 0x94, 0xef, 0xa4, 0x83, 0xa1, 0xd2, 0x54, 0xee, 0xe4, 0x84, 0x93, 0x8c, 0xe6, 0x94,
0xeb, 0x98, 0x14, 0x2c, 0x7e, 0x26, 0x64, 0x3f, 0x1e, 0xed, 0xc6, 0x19, 0xe5, 0x54, 0x12, 0x4d,
0x7b, 0xa8, 0x90, 0x42, 0x0b, 0x88, 0x1a, 0x7f, 0x64, 0xfc, 0x1f, 0x3b, 0xff, 0xc7, 0x8d, 0x3f,
0x22, 0x05, 0x43, 0xc6, 0x1f,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4, 0x8d, 0x93, 0x71,
0xdc, 0x06, 0xd7, 0xe7, 0x6a, 0x67, 0x0e, 0xa5, 0x3e, 0x2c, 0xa8, 0x1d, 0x8a, 0xc6, 0xa1, 0xdc,
0x3b, 0x2c, 0x28, 0xb6, 0x1a, 0xf8, 0xb5, 0xdf, 0xc8, 0xf2, 0xd6, 0xdf, 0x9d, 0xdd, 0xa6, 0x7f,
0x8e, 0xd7, 0xcf, 0xf5, 0x7b, 0x03, 0x79, 0xce, 0xd9, 0x2d, 0x84, 0x13, 0x00, 0x47, 0x44, 0xe9,
0x3d, 0x49, 0xb8, 0xb2, 0xfa, 0x3d, 0x96, 0x53, 0xb7, 0xfd, 0x6f, 0x9c, 0x6f, 0xf5, 0x8c, 0x47,
0xb2, 0xe6, 0xe2, 0x82, 0xf7, 0x4e, 0xa1, 0xe1, 0x33, 0x18, 0xe0, 0x6b, 0x60, 0x51, 0x52, 0xa2,
0x04, 0x77, 0x8f, 0x8e, 0xbf, 0x12, 0xd8, 0x4a, 0xb1, 0xd3, 0x9a, 0x57, 0x2c, 0xa7, 0x4a, 0x91,
0xac, 0x7a, 0x77, 0xfc, 0x2b, 0xb6, 0x5b, 0x8a, 0x71, 0xa5, 0x4f, 0x36, 0x8f, 0x4e, 0xc2, 0xd6,
0xf3, 0x93, 0xb0, 0xf5, 0xe2, 0x24, 0x6c, 0xfd, 0x30, 0x0d, 0x83, 0xa3, 0x69, 0x18, 0x3c, 0x9f,
0x86, 0xc1, 0x8b, 0x69, 0x18, 0xfc, 0x35, 0x0d, 0x83, 0x5f, 0xff, 0x0e, 0x5b, 0x5f, 0xb6, 0x27,
0xdb, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xd8, 0x4c, 0x96, 0x74, 0x42, 0x0a, 0x00, 0x00,
}
func (m *Manifest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Manifest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Manifest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
{
size, err := m.RawExtension.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGenerated(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
return len(dAtA) - i, nil
}
func (m *ManifestCondition) Marshal() (dAtA []byte, err error) {
@@ -697,10 +759,10 @@ func (m *ManifestsTemplate) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
if len(m.Manifests) > 0 {
for iNdEx := len(m.Manifests) - 1; iNdEx >= 0; iNdEx-- {
if len(m.Manifest) > 0 {
for iNdEx := len(m.Manifest) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Manifests[iNdEx].MarshalToSizedBuffer(dAtA[:i])
size, err := m.Manifest[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
@@ -708,7 +770,7 @@ func (m *ManifestsTemplate) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i = encodeVarintGenerated(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil
@@ -778,6 +840,17 @@ func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int {
dAtA[offset] = uint8(v)
return base
}
func (m *Manifest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = m.RawExtension.Size()
n += 1 + l + sovGenerated(uint64(l))
return n
}
func (m *ManifestCondition) Size() (n int) {
if m == nil {
return 0
@@ -898,8 +971,8 @@ func (m *ManifestsTemplate) Size() (n int) {
}
var l int
_ = l
if len(m.Manifests) > 0 {
for _, e := range m.Manifests {
if len(m.Manifest) > 0 {
for _, e := range m.Manifest {
l = e.Size()
n += 1 + l + sovGenerated(uint64(l))
}
@@ -932,6 +1005,16 @@ func sovGenerated(x uint64) (n int) {
func sozGenerated(x uint64) (n int) {
return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (this *Manifest) String() string {
if this == nil {
return "nil"
}
s := strings.Join([]string{`&Manifest{`,
`RawExtension:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.RawExtension), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`,
`}`,
}, "")
return s
}
func (this *ManifestCondition) String() string {
if this == nil {
return "nil"
@@ -1037,13 +1120,13 @@ func (this *ManifestsTemplate) String() string {
if this == nil {
return "nil"
}
repeatedStringForManifests := "[]RawExtension{"
for _, f := range this.Manifests {
repeatedStringForManifests += fmt.Sprintf("%v", f) + ","
repeatedStringForManifest := "[]Manifest{"
for _, f := range this.Manifest {
repeatedStringForManifest += strings.Replace(strings.Replace(f.String(), "Manifest", "Manifest", 1), `&`, ``, 1) + ","
}
repeatedStringForManifests += "}"
repeatedStringForManifest += "}"
s := strings.Join([]string{`&ManifestsTemplate{`,
`Manifests:` + repeatedStringForManifests + `,`,
`Manifest:` + repeatedStringForManifest + `,`,
`}`,
}, "")
return s
@@ -1070,6 +1153,92 @@ func valueToStringGenerated(v interface{}) string {
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("*%v", pv)
}
func (m *Manifest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Manifest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Manifest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field RawExtension", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenerated
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenerated
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenerated
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.RawExtension.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthGenerated
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *ManifestCondition) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
@@ -2048,9 +2217,9 @@ func (m *ManifestsTemplate) Unmarshal(dAtA []byte) error {
return fmt.Errorf("proto: ManifestsTemplate: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 2:
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Manifests", wireType)
return fmt.Errorf("proto: wrong wireType = %d for field Manifest", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
@@ -2077,8 +2246,8 @@ func (m *ManifestsTemplate) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Manifests = append(m.Manifests, runtime.RawExtension{})
if err := m.Manifests[len(m.Manifests)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
m.Manifest = append(m.Manifest, Manifest{})
if err := m.Manifest[len(m.Manifest)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex

View File

@@ -12,6 +12,13 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
// Package-wide variables from generator "generated".
option go_package = "v1";
// Manifest represents a resource to be deployed on spoke cluster
message Manifest {
// +kubebuilder:validation:EmbeddedResource
// +kubebuilder:pruning:PreserveUnknownFields
optional k8s.io.apimachinery.pkg.runtime.RawExtension rawExtension = 1;
}
// ManifestCondition represents the conditions of the resources deployed on
// spoke cluster
message ManifestCondition {
@@ -122,7 +129,7 @@ message ManifestWorkStatus {
message ManifestsTemplate {
// Manifests represents a list of kuberenetes resources to be deployed on the spoke cluster.
// +optional
repeated k8s.io.apimachinery.pkg.runtime.RawExtension manifests = 2;
repeated Manifest manifests = 1;
}
// StatusCondition contains condition information for a spoke work.

View File

@@ -55,11 +55,18 @@ type ManifestWorkSpec struct {
Workload ManifestsTemplate `json:"workload,omitempty" protobuf:"bytes,1,opt,name=workload"`
}
// Manifest represents a resource to be deployed on spoke cluster
type Manifest struct {
// +kubebuilder:validation:EmbeddedResource
// +kubebuilder:pruning:PreserveUnknownFields
runtime.RawExtension `json:",inline" protobuf:"bytes,1,opt,name=rawExtension"`
}
// ManifestsTemplate represents the manifest workload to be deployed on spoke cluster
type ManifestsTemplate struct {
// Manifests represents a list of kuberenetes resources to be deployed on the spoke cluster.
// +optional
Manifests []runtime.RawExtension `json:"manifests,omitempty" protobuf:"bytes,2,rep,name=manifests"`
Manifest []Manifest `json:"manifests,omitempty" protobuf:"bytes,1,rep,name=manifests"`
}
// ManifestResourceMeta represents the gvk, gvr, name and namespace of a resoure

View File

@@ -8,6 +8,23 @@ import (
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Manifest) DeepCopyInto(out *Manifest) {
*out = *in
in.RawExtension.DeepCopyInto(&out.RawExtension)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Manifest.
func (in *Manifest) DeepCopy() *Manifest {
if in == nil {
return nil
}
out := new(Manifest)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ManifestCondition) DeepCopyInto(out *ManifestCondition) {
*out = *in
@@ -176,9 +193,9 @@ func (in *ManifestWorkStatus) DeepCopy() *ManifestWorkStatus {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ManifestsTemplate) DeepCopyInto(out *ManifestsTemplate) {
*out = *in
if in.Manifests != nil {
in, out := &in.Manifests, &out.Manifests
*out = make([]runtime.RawExtension, len(*in))
if in.Manifest != nil {
in, out := &in.Manifest, &out.Manifest
*out = make([]Manifest, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}

View File

@@ -11,6 +11,14 @@ package v1
// Those methods can be generated by using hack/update-swagger-docs.sh
// AUTO-GENERATED FUNCTIONS START HERE
var map_Manifest = map[string]string{
"": "Manifest represents a resource to be deployed on spoke cluster",
}
func (Manifest) SwaggerDoc() map[string]string {
return map_Manifest
}
var map_ManifestCondition = map[string]string{
"": "ManifestCondition represents the conditions of the resources deployed on spoke cluster",
"resourceMeta": "ResourceMeta represents the gvk, name and namespace of a resoure",