From 20c03cc9a0560c2c58f4879b1e9347e5e4f337c8 Mon Sep 17 00:00:00 2001 From: Jim Minter Date: Tue, 15 Aug 2017 11:44:39 -0500 Subject: [PATCH] populate Status.Objects in templateInstance --- ...origin_pkg_template_apis_template_v1.proto | 11 + api/swagger-spec/openshift-openapi-spec.json | 19 +- pkg/openapi/zz_generated.openapi.go | 33 +- pkg/template/apis/template/types.go | 9 + pkg/template/apis/template/v1/generated.pb.go | 352 +++++++++++++----- pkg/template/apis/template/v1/generated.proto | 11 + pkg/template/apis/template/v1/swagger_doc.go | 10 + pkg/template/apis/template/v1/types.go | 13 +- .../template/v1/zz_generated.conversion.go | 50 ++- .../apis/template/v1/zz_generated.deepcopy.go | 16 + .../apis/template/zz_generated.deepcopy.go | 16 + .../controller/templateinstance_controller.go | 34 +- .../templates/templateservicebroker_e2e.go | 18 + 13 files changed, 493 insertions(+), 99 deletions(-) diff --git a/api/protobuf-spec/github_com_openshift_origin_pkg_template_apis_template_v1.proto b/api/protobuf-spec/github_com_openshift_origin_pkg_template_apis_template_v1.proto index 4a86493211e5..e5b84927928b 100644 --- a/api/protobuf-spec/github_com_openshift_origin_pkg_template_apis_template_v1.proto +++ b/api/protobuf-spec/github_com_openshift_origin_pkg_template_apis_template_v1.proto @@ -166,6 +166,14 @@ message TemplateInstanceList { repeated TemplateInstance items = 2; } +// TemplateInstanceObject references an object created by a TemplateInstance. +message TemplateInstanceObject { + // ref is a reference to the created object. When used under .spec, only + // name and namespace are used; these can contain references to parameters + // which will be substituted following the usual rules. + optional k8s.io.kubernetes.pkg.api.v1.ObjectReference ref = 1; +} + // TemplateInstanceRequester holds the identity of an agent requesting a // template instantiation. message TemplateInstanceRequester { @@ -192,6 +200,9 @@ message TemplateInstanceStatus { // conditions represent the latest available observations of a // TemplateInstance's current state. repeated TemplateInstanceCondition conditions = 1; + + // Objects references the objects created by the TemplateInstance. + repeated TemplateInstanceObject objects = 2; } // TemplateList is a list of Template objects. diff --git a/api/swagger-spec/openshift-openapi-spec.json b/api/swagger-spec/openshift-openapi-spec.json index f15a8df9de6a..393e36376eb5 100644 --- a/api/swagger-spec/openshift-openapi-spec.json +++ b/api/swagger-spec/openshift-openapi-spec.json @@ -99448,6 +99448,15 @@ } ] }, + "com.github.openshift.origin.pkg.template.apis.template.v1.TemplateInstanceObject": { + "description": "TemplateInstanceObject references an object created by a TemplateInstance.", + "properties": { + "ref": { + "description": "ref is a reference to the created object. When used under .spec, only name and namespace are used; these can contain references to parameters which will be substituted following the usual rules.", + "$ref": "#/definitions/io.k8s.kubernetes.pkg.api.v1.ObjectReference" + } + } + }, "com.github.openshift.origin.pkg.template.apis.template.v1.TemplateInstanceRequester": { "description": "TemplateInstanceRequester holds the identity of an agent requesting a template instantiation.", "required": [ @@ -99483,9 +99492,6 @@ }, "com.github.openshift.origin.pkg.template.apis.template.v1.TemplateInstanceStatus": { "description": "TemplateInstanceStatus describes the current state of a TemplateInstance.", - "required": [ - "conditions" - ], "properties": { "conditions": { "description": "conditions represent the latest available observations of a TemplateInstance's current state.", @@ -99493,6 +99499,13 @@ "items": { "$ref": "#/definitions/com.github.openshift.origin.pkg.template.apis.template.v1.TemplateInstanceCondition" } + }, + "objects": { + "description": "Objects references the objects created by the TemplateInstance.", + "type": "array", + "items": { + "$ref": "#/definitions/com.github.openshift.origin.pkg.template.apis.template.v1.TemplateInstanceObject" + } } } }, diff --git a/pkg/openapi/zz_generated.openapi.go b/pkg/openapi/zz_generated.openapi.go index 4ed5ee17c70b..e211fbfafa20 100644 --- a/pkg/openapi/zz_generated.openapi.go +++ b/pkg/openapi/zz_generated.openapi.go @@ -9852,6 +9852,23 @@ func GetOpenAPIDefinitions(ref openapi.ReferenceCallback) map[string]openapi.Ope Dependencies: []string{ "github.com/openshift/origin/pkg/template/apis/template/v1.TemplateInstance", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, }, + "github.com/openshift/origin/pkg/template/apis/template/v1.TemplateInstanceObject": { + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TemplateInstanceObject references an object created by a TemplateInstance.", + Properties: map[string]spec.Schema{ + "ref": { + SchemaProps: spec.SchemaProps{ + Description: "ref is a reference to the created object. When used under .spec, only name and namespace are used; these can contain references to parameters which will be substituted following the usual rules.", + Ref: ref("k8s.io/kubernetes/pkg/api/v1.ObjectReference"), + }, + }, + }, + }, + }, + Dependencies: []string{ + "k8s.io/kubernetes/pkg/api/v1.ObjectReference"}, + }, "github.com/openshift/origin/pkg/template/apis/template/v1.TemplateInstanceRequester": { Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ @@ -9918,12 +9935,24 @@ func GetOpenAPIDefinitions(ref openapi.ReferenceCallback) map[string]openapi.Ope }, }, }, + "objects": { + SchemaProps: spec.SchemaProps{ + Description: "Objects references the objects created by the TemplateInstance.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/openshift/origin/pkg/template/apis/template/v1.TemplateInstanceObject"), + }, + }, + }, + }, + }, }, - Required: []string{"conditions"}, }, }, Dependencies: []string{ - "github.com/openshift/origin/pkg/template/apis/template/v1.TemplateInstanceCondition"}, + "github.com/openshift/origin/pkg/template/apis/template/v1.TemplateInstanceCondition", "github.com/openshift/origin/pkg/template/apis/template/v1.TemplateInstanceObject"}, }, "github.com/openshift/origin/pkg/template/apis/template/v1.TemplateList": { Schema: spec.Schema{ diff --git a/pkg/template/apis/template/types.go b/pkg/template/apis/template/types.go index 5a5194f7f940..b60f6c07c1e9 100644 --- a/pkg/template/apis/template/types.go +++ b/pkg/template/apis/template/types.go @@ -117,6 +117,9 @@ type TemplateInstanceStatus struct { // Conditions represent the latest available observations of a // TemplateInstance's current state. Conditions []TemplateInstanceCondition + + // Objects references the objects created by the TemplateInstance. + Objects []TemplateInstanceObject } // TemplateInstanceCondition contains condition information for a @@ -150,6 +153,12 @@ const ( TemplateInstanceInstantiateFailure TemplateInstanceConditionType = "InstantiateFailure" ) +// TemplateInstanceObject references an object created by a TemplateInstance. +type TemplateInstanceObject struct { + // ref is a reference to the created object. + Ref kapi.ObjectReference +} + // TemplateInstanceList is a list of TemplateInstance objects. type TemplateInstanceList struct { metav1.TypeMeta diff --git a/pkg/template/apis/template/v1/generated.pb.go b/pkg/template/apis/template/v1/generated.pb.go index cc7b66498b20..5b6976d76e82 100644 --- a/pkg/template/apis/template/v1/generated.pb.go +++ b/pkg/template/apis/template/v1/generated.pb.go @@ -17,6 +17,7 @@ TemplateInstance TemplateInstanceCondition TemplateInstanceList + TemplateInstanceObject TemplateInstanceRequester TemplateInstanceSpec TemplateInstanceStatus @@ -88,23 +89,27 @@ func (m *TemplateInstanceList) Reset() { *m = TemplateInstanc func (*TemplateInstanceList) ProtoMessage() {} func (*TemplateInstanceList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{7} } +func (m *TemplateInstanceObject) Reset() { *m = TemplateInstanceObject{} } +func (*TemplateInstanceObject) ProtoMessage() {} +func (*TemplateInstanceObject) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{8} } + func (m *TemplateInstanceRequester) Reset() { *m = TemplateInstanceRequester{} } func (*TemplateInstanceRequester) ProtoMessage() {} func (*TemplateInstanceRequester) Descriptor() ([]byte, []int) { - return fileDescriptorGenerated, []int{8} + return fileDescriptorGenerated, []int{9} } func (m *TemplateInstanceSpec) Reset() { *m = TemplateInstanceSpec{} } func (*TemplateInstanceSpec) ProtoMessage() {} -func (*TemplateInstanceSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{9} } +func (*TemplateInstanceSpec) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } func (m *TemplateInstanceStatus) Reset() { *m = TemplateInstanceStatus{} } func (*TemplateInstanceStatus) ProtoMessage() {} -func (*TemplateInstanceStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{10} } +func (*TemplateInstanceStatus) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} } func (m *TemplateList) Reset() { *m = TemplateList{} } func (*TemplateList) ProtoMessage() {} -func (*TemplateList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{11} } +func (*TemplateList) Descriptor() ([]byte, []int) { return fileDescriptorGenerated, []int{12} } func init() { proto.RegisterType((*BrokerTemplateInstance)(nil), "github.com.openshift.origin.pkg.template.apis.template.v1.BrokerTemplateInstance") @@ -115,6 +120,7 @@ func init() { proto.RegisterType((*TemplateInstance)(nil), "github.com.openshift.origin.pkg.template.apis.template.v1.TemplateInstance") proto.RegisterType((*TemplateInstanceCondition)(nil), "github.com.openshift.origin.pkg.template.apis.template.v1.TemplateInstanceCondition") proto.RegisterType((*TemplateInstanceList)(nil), "github.com.openshift.origin.pkg.template.apis.template.v1.TemplateInstanceList") + proto.RegisterType((*TemplateInstanceObject)(nil), "github.com.openshift.origin.pkg.template.apis.template.v1.TemplateInstanceObject") proto.RegisterType((*TemplateInstanceRequester)(nil), "github.com.openshift.origin.pkg.template.apis.template.v1.TemplateInstanceRequester") proto.RegisterType((*TemplateInstanceSpec)(nil), "github.com.openshift.origin.pkg.template.apis.template.v1.TemplateInstanceSpec") proto.RegisterType((*TemplateInstanceStatus)(nil), "github.com.openshift.origin.pkg.template.apis.template.v1.TemplateInstanceStatus") @@ -489,6 +495,32 @@ func (m *TemplateInstanceList) MarshalTo(dAtA []byte) (int, error) { return i, nil } +func (m *TemplateInstanceObject) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TemplateInstanceObject) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintGenerated(dAtA, i, uint64(m.Ref.Size())) + n12, err := m.Ref.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n12 + return i, nil +} + func (m *TemplateInstanceRequester) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -529,30 +561,30 @@ func (m *TemplateInstanceSpec) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size())) - n12, err := m.Template.MarshalTo(dAtA[i:]) + n13, err := m.Template.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n12 + i += n13 if m.Secret != nil { dAtA[i] = 0x12 i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Secret.Size())) - n13, err := m.Secret.MarshalTo(dAtA[i:]) + n14, err := m.Secret.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n13 + i += n14 } if m.Requester != nil { dAtA[i] = 0x1a i++ i = encodeVarintGenerated(dAtA, i, uint64(m.Requester.Size())) - n14, err := m.Requester.MarshalTo(dAtA[i:]) + n15, err := m.Requester.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n14 + i += n15 } return i, nil } @@ -584,6 +616,18 @@ func (m *TemplateInstanceStatus) MarshalTo(dAtA []byte) (int, error) { i += n } } + if len(m.Objects) > 0 { + for _, msg := range m.Objects { + dAtA[i] = 0x12 + i++ + i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } return i, nil } @@ -605,11 +649,11 @@ func (m *TemplateList) MarshalTo(dAtA []byte) (int, error) { dAtA[i] = 0xa i++ i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n15, err := m.ListMeta.MarshalTo(dAtA[i:]) + n16, err := m.ListMeta.MarshalTo(dAtA[i:]) if err != nil { return 0, err } - i += n15 + i += n16 if len(m.Items) > 0 { for _, msg := range m.Items { dAtA[i] = 0x12 @@ -783,6 +827,14 @@ func (m *TemplateInstanceList) Size() (n int) { return n } +func (m *TemplateInstanceObject) Size() (n int) { + var l int + _ = l + l = m.Ref.Size() + n += 1 + l + sovGenerated(uint64(l)) + return n +} + func (m *TemplateInstanceRequester) Size() (n int) { var l int _ = l @@ -816,6 +868,12 @@ func (m *TemplateInstanceStatus) Size() (n int) { n += 1 + l + sovGenerated(uint64(l)) } } + if len(m.Objects) > 0 { + for _, e := range m.Objects { + l = e.Size() + n += 1 + l + sovGenerated(uint64(l)) + } + } return n } @@ -957,6 +1015,16 @@ func (this *TemplateInstanceList) String() string { }, "") return s } +func (this *TemplateInstanceObject) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TemplateInstanceObject{`, + `Ref:` + strings.Replace(strings.Replace(this.Ref.String(), "ObjectReference", "k8s_io_kubernetes_pkg_api_v1.ObjectReference", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} func (this *TemplateInstanceRequester) String() string { if this == nil { return "nil" @@ -985,6 +1053,7 @@ func (this *TemplateInstanceStatus) String() string { } s := strings.Join([]string{`&TemplateInstanceStatus{`, `Conditions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Conditions), "TemplateInstanceCondition", "TemplateInstanceCondition", 1), `&`, ``, 1) + `,`, + `Objects:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Objects), "TemplateInstanceObject", "TemplateInstanceObject", 1), `&`, ``, 1) + `,`, `}`, }, "") return s @@ -2346,6 +2415,86 @@ func (m *TemplateInstanceList) Unmarshal(dAtA []byte) error { } return nil } +func (m *TemplateInstanceObject) 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: TemplateInstanceObject: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TemplateInstanceObject: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ref", 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 > l { + return io.ErrUnexpectedEOF + } + if err := m.Ref.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) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *TemplateInstanceRequester) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2631,6 +2780,37 @@ func (m *TemplateInstanceStatus) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Objects", 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 > l { + return io.ErrUnexpectedEOF + } + m.Objects = append(m.Objects, TemplateInstanceObject{}) + if err := m.Objects[len(m.Objects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) @@ -2873,77 +3053,79 @@ func init() { } var fileDescriptorGenerated = []byte{ - // 1138 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcd, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xfa, 0x2b, 0xf6, 0x24, 0x2d, 0xd1, 0x10, 0x55, 0x8b, 0x25, 0x9c, 0x68, 0x91, 0x50, - 0x40, 0xc9, 0x9a, 0x84, 0x0f, 0xb5, 0x1c, 0x90, 0xd8, 0xa6, 0xa0, 0x88, 0x94, 0xc2, 0x34, 0xa9, - 0x10, 0xe2, 0xc0, 0x78, 0xfd, 0xe2, 0x0c, 0xf6, 0x7e, 0x64, 0x66, 0xec, 0xd6, 0x07, 0x24, 0x7a, - 0xe3, 0xc8, 0x91, 0x3b, 0xe2, 0xdf, 0xe0, 0x9c, 0x63, 0x4f, 0xa8, 0xa7, 0x88, 0x18, 0xc1, 0x1f, - 0x00, 0xb7, 0x9e, 0xd0, 0xce, 0xce, 0x7e, 0x38, 0x76, 0xd2, 0xd2, 0x58, 0xed, 0x6d, 0xe7, 0xcd, - 0x7b, 0xbf, 0xdf, 0xfb, 0xbd, 0x79, 0xf3, 0x76, 0xd0, 0x4e, 0x87, 0xc9, 0xc3, 0x7e, 0xcb, 0x76, - 0x03, 0xaf, 0x19, 0x84, 0xe0, 0x8b, 0x43, 0x76, 0x20, 0x9b, 0x01, 0x67, 0x1d, 0xe6, 0x37, 0xc3, - 0x6e, 0xa7, 0x29, 0xc1, 0x0b, 0x7b, 0x54, 0x42, 0x93, 0x86, 0x4c, 0x64, 0xab, 0xc1, 0x66, 0xb3, - 0x03, 0x3e, 0x70, 0x2a, 0xa1, 0x6d, 0x87, 0x3c, 0x90, 0x01, 0xbe, 0x91, 0x41, 0xd9, 0x29, 0x94, - 0x1d, 0x43, 0xd9, 0x61, 0xb7, 0x63, 0x27, 0xc1, 0x76, 0x04, 0x95, 0xad, 0x06, 0x9b, 0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x31, 0xce, 0xda, 0xf1, 0x69, - 0x63, 0xee, 0xd1, 0x69, 0x63, 0xee, 0xf1, 0x69, 0x63, 0xee, 0x87, 0x51, 0xc3, 0x38, 0x1e, 0x35, - 0x8c, 0x47, 0xa3, 0x86, 0xf1, 0x78, 0xd4, 0x30, 0xfe, 0x18, 0x35, 0x8c, 0x9f, 0xfe, 0x6c, 0xcc, - 0x7d, 0x5d, 0x18, 0x6c, 0xfe, 0x17, 0x00, 0x00, 0xff, 0xff, 0x7c, 0x35, 0xfe, 0x31, 0x54, 0x0f, - 0x00, 0x00, + // 1179 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xcf, 0xfa, 0x57, 0xec, 0x71, 0xda, 0x6f, 0x34, 0xdf, 0xa8, 0x5a, 0x2c, 0xe1, 0x44, 0x8b, + 0x84, 0x02, 0x4a, 0xd6, 0x24, 0xfc, 0x50, 0xcb, 0x01, 0x09, 0x37, 0x05, 0x45, 0xa4, 0x14, 0xa6, + 0x49, 0x85, 0x10, 0x07, 0xc6, 0xeb, 0x67, 0x67, 0xb1, 0xf7, 0x47, 0x66, 0xc6, 0x6e, 0x2d, 0x81, + 0x44, 0x6f, 0x1c, 0x39, 0x72, 0xe5, 0xc0, 0xbf, 0xc1, 0x39, 0xc7, 0x9e, 0x50, 0x4f, 0x11, 0x31, + 0x82, 0x3f, 0x00, 0x6e, 0x3d, 0xa1, 0x9d, 0x9d, 0xfd, 0x61, 0xaf, 0x9d, 0x96, 0xc6, 0x6a, 0x6f, + 0xbb, 0x6f, 0xde, 0xfb, 0x7c, 0xde, 0x7b, 0xf3, 0xde, 0x9b, 0x87, 0xf6, 0xbb, 0xb6, 0x38, 0x1e, + 0xb4, 0x4c, 0xcb, 0x73, 0x1a, 0x9e, 0x0f, 0x2e, 0x3f, 0xb6, 0x3b, 0xa2, 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, 0x91, 0xdf, 0xac, 0x34, 0xaf, 0x06, 0x65, + 0xd8, 0x8c, 0xa5, 0x24, 0xa5, 0x61, 0xfc, 0x9a, 0x43, 0x95, 0xcf, 0x28, 0xa3, 0x0e, 0x08, 0x60, + 0x78, 0x03, 0x15, 0x5c, 0xea, 0x84, 0xd1, 0x57, 0x92, 0xfa, 0xf9, 0x94, 0x3a, 0x40, 0xe4, 0x09, + 0x7e, 0x17, 0x55, 0xdb, 0x36, 0xf7, 0xfb, 0x74, 0x14, 0x08, 0xa5, 0xef, 0x95, 0xe6, 0xff, 0x95, + 0x62, 0x75, 0x2f, 0x39, 0x22, 0x69, 0x3d, 0x69, 0x06, 0xdc, 0x62, 0xb6, 0x2f, 0x6c, 0xcf, 0xd5, + 0xf3, 0x53, 0x66, 0xc9, 0x11, 0x49, 0xeb, 0xe1, 0xd7, 0x50, 0x71, 0x48, 0xfb, 0x03, 0xd0, 0x0b, + 0xd2, 0x20, 0xbe, 0xdd, 0x7b, 0x81, 0x90, 0x84, 0x67, 0x78, 0x0b, 0x95, 0xa3, 0xde, 0xd6, 0x8b, + 0x52, 0x2f, 0xae, 0xc1, 0x8f, 0x95, 0x9c, 0xc4, 0x1a, 0x41, 0x88, 0x1d, 0xe6, 0x39, 0x7a, 0x69, + 0x32, 0xc4, 0x8f, 0x98, 0xe7, 0x10, 0x79, 0x12, 0xe0, 0x31, 0x38, 0x19, 0xd8, 0x0c, 0xda, 0xfa, + 0xf2, 0x86, 0xb6, 0x59, 0x4e, 0xf0, 0x88, 0x92, 0x93, 0x58, 0xc3, 0xf8, 0xa5, 0x80, 0xca, 0xd1, + 0x75, 0xbf, 0x80, 0xc1, 0xf1, 0x06, 0x5a, 0x76, 0x80, 0x73, 0xda, 0x8d, 0x72, 0xff, 0x3f, 0xa5, + 0xbe, 0x7c, 0x3b, 0x14, 0x93, 0xe8, 0x1c, 0x7f, 0x81, 0x96, 0x3d, 0x09, 0x11, 0xd6, 0x41, 0xaa, + 0xc4, 0x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, 0x86, + 0x2a, 0x2c, 0xca, 0x8f, 0x6a, 0xa1, 0xc3, 0x05, 0x56, 0x43, 0x9c, 0xfb, 0xe6, 0x95, 0xf1, 0xd9, + 0x7a, 0x25, 0xfe, 0x25, 0x09, 0xab, 0xf1, 0x73, 0x2e, 0x5b, 0x1b, 0x61, 0xc7, 0xe3, 0x1f, 0x34, + 0x84, 0xac, 0x68, 0x0a, 0x70, 0x5d, 0x93, 0xd5, 0xba, 0x48, 0xff, 0xe2, 0x11, 0x93, 0xbc, 0x0c, + 0xb1, 0x88, 0x93, 0x14, 0x37, 0xfe, 0x36, 0x59, 0x10, 0x2e, 0xbf, 0x90, 0xcf, 0x6e, 0x85, 0xf9, + 0x4b, 0x84, 0xf1, 0x9b, 0x86, 0x56, 0x22, 0xa3, 0x17, 0x30, 0x1f, 0x8e, 0x27, 0xe7, 0xc3, 0x42, + 0xca, 0x7b, 0xe6, 0x5c, 0x68, 0x6e, 0x9e, 0x9e, 0xd7, 0x97, 0x1e, 0x9d, 0xd7, 0x97, 0x1e, 0x9f, + 0xd7, 0x97, 0xbe, 0x1f, 0xd7, 0xb5, 0xd3, 0x71, 0x5d, 0x7b, 0x34, 0xae, 0x6b, 0x8f, 0xc7, 0x75, + 0xed, 0xf7, 0x71, 0x5d, 0xfb, 0xf1, 0x8f, 0xfa, 0xd2, 0x97, 0xb9, 0xe1, 0xce, 0xbf, 0x01, 0x00, + 0x00, 0xff, 0xff, 0x16, 0x0c, 0xd1, 0x84, 0x3a, 0x10, 0x00, 0x00, } diff --git a/pkg/template/apis/template/v1/generated.proto b/pkg/template/apis/template/v1/generated.proto index 4a86493211e5..e5b84927928b 100644 --- a/pkg/template/apis/template/v1/generated.proto +++ b/pkg/template/apis/template/v1/generated.proto @@ -166,6 +166,14 @@ message TemplateInstanceList { repeated TemplateInstance items = 2; } +// TemplateInstanceObject references an object created by a TemplateInstance. +message TemplateInstanceObject { + // ref is a reference to the created object. When used under .spec, only + // name and namespace are used; these can contain references to parameters + // which will be substituted following the usual rules. + optional k8s.io.kubernetes.pkg.api.v1.ObjectReference ref = 1; +} + // TemplateInstanceRequester holds the identity of an agent requesting a // template instantiation. message TemplateInstanceRequester { @@ -192,6 +200,9 @@ message TemplateInstanceStatus { // conditions represent the latest available observations of a // TemplateInstance's current state. repeated TemplateInstanceCondition conditions = 1; + + // Objects references the objects created by the TemplateInstance. + repeated TemplateInstanceObject objects = 2; } // TemplateList is a list of Template objects. diff --git a/pkg/template/apis/template/v1/swagger_doc.go b/pkg/template/apis/template/v1/swagger_doc.go index 095cbb15ba85..c68e95456aec 100644 --- a/pkg/template/apis/template/v1/swagger_doc.go +++ b/pkg/template/apis/template/v1/swagger_doc.go @@ -98,6 +98,15 @@ func (TemplateInstanceList) SwaggerDoc() map[string]string { return map_TemplateInstanceList } +var map_TemplateInstanceObject = map[string]string{ + "": "TemplateInstanceObject references an object created by a TemplateInstance.", + "ref": "ref is a reference to the created object. When used under .spec, only name and namespace are used; these can contain references to parameters which will be substituted following the usual rules.", +} + +func (TemplateInstanceObject) SwaggerDoc() map[string]string { + return map_TemplateInstanceObject +} + var map_TemplateInstanceRequester = map[string]string{ "": "TemplateInstanceRequester holds the identity of an agent requesting a template instantiation.", "username": "username is the username of the agent requesting a template instantiation.", @@ -121,6 +130,7 @@ func (TemplateInstanceSpec) SwaggerDoc() map[string]string { var map_TemplateInstanceStatus = map[string]string{ "": "TemplateInstanceStatus describes the current state of a TemplateInstance.", "conditions": "conditions represent the latest available observations of a TemplateInstance's current state.", + "objects": "Objects references the objects created by the TemplateInstance.", } func (TemplateInstanceStatus) SwaggerDoc() map[string]string { diff --git a/pkg/template/apis/template/v1/types.go b/pkg/template/apis/template/v1/types.go index af7bb47d8b5f..ae8a0a2de45c 100644 --- a/pkg/template/apis/template/v1/types.go +++ b/pkg/template/apis/template/v1/types.go @@ -135,7 +135,10 @@ type TemplateInstanceRequester struct { type TemplateInstanceStatus struct { // conditions represent the latest available observations of a // TemplateInstance's current state. - Conditions []TemplateInstanceCondition `json:"conditions" protobuf:"bytes,1,rep,name=conditions"` + Conditions []TemplateInstanceCondition `json:"conditions,omitempty" protobuf:"bytes,1,rep,name=conditions"` + + // Objects references the objects created by the TemplateInstance. + Objects []TemplateInstanceObject `json:"objects,omitempty" protobuf:"bytes,2,rep,name=objects"` } // TemplateInstanceCondition contains condition information for a @@ -169,6 +172,14 @@ const ( TemplateInstanceInstantiateFailure TemplateInstanceConditionType = "InstantiateFailure" ) +// TemplateInstanceObject references an object created by a TemplateInstance. +type TemplateInstanceObject struct { + // ref is a reference to the created object. When used under .spec, only + // name and namespace are used; these can contain references to parameters + // which will be substituted following the usual rules. + Ref kapiv1.ObjectReference `json:"ref,omitempty" protobuf:"bytes,1,opt,name=ref"` +} + // TemplateInstanceList is a list of TemplateInstance objects. type TemplateInstanceList struct { metav1.TypeMeta `json:",inline"` diff --git a/pkg/template/apis/template/v1/zz_generated.conversion.go b/pkg/template/apis/template/v1/zz_generated.conversion.go index 0f5cf1ca2354..6a9ca85905fd 100644 --- a/pkg/template/apis/template/v1/zz_generated.conversion.go +++ b/pkg/template/apis/template/v1/zz_generated.conversion.go @@ -37,6 +37,8 @@ func RegisterConversions(scheme *runtime.Scheme) error { Convert_template_TemplateInstanceCondition_To_v1_TemplateInstanceCondition, Convert_v1_TemplateInstanceList_To_template_TemplateInstanceList, Convert_template_TemplateInstanceList_To_v1_TemplateInstanceList, + Convert_v1_TemplateInstanceObject_To_template_TemplateInstanceObject, + Convert_template_TemplateInstanceObject_To_v1_TemplateInstanceObject, Convert_v1_TemplateInstanceRequester_To_template_TemplateInstanceRequester, Convert_template_TemplateInstanceRequester_To_v1_TemplateInstanceRequester, Convert_v1_TemplateInstanceSpec_To_template_TemplateInstanceSpec, @@ -330,6 +332,30 @@ func Convert_template_TemplateInstanceList_To_v1_TemplateInstanceList(in *templa return autoConvert_template_TemplateInstanceList_To_v1_TemplateInstanceList(in, out, s) } +func autoConvert_v1_TemplateInstanceObject_To_template_TemplateInstanceObject(in *TemplateInstanceObject, out *template.TemplateInstanceObject, s conversion.Scope) error { + if err := api_v1.Convert_v1_ObjectReference_To_api_ObjectReference(&in.Ref, &out.Ref, s); err != nil { + return err + } + return nil +} + +// Convert_v1_TemplateInstanceObject_To_template_TemplateInstanceObject is an autogenerated conversion function. +func Convert_v1_TemplateInstanceObject_To_template_TemplateInstanceObject(in *TemplateInstanceObject, out *template.TemplateInstanceObject, s conversion.Scope) error { + return autoConvert_v1_TemplateInstanceObject_To_template_TemplateInstanceObject(in, out, s) +} + +func autoConvert_template_TemplateInstanceObject_To_v1_TemplateInstanceObject(in *template.TemplateInstanceObject, out *TemplateInstanceObject, s conversion.Scope) error { + if err := api_v1.Convert_api_ObjectReference_To_v1_ObjectReference(&in.Ref, &out.Ref, s); err != nil { + return err + } + return nil +} + +// Convert_template_TemplateInstanceObject_To_v1_TemplateInstanceObject is an autogenerated conversion function. +func Convert_template_TemplateInstanceObject_To_v1_TemplateInstanceObject(in *template.TemplateInstanceObject, out *TemplateInstanceObject, s conversion.Scope) error { + return autoConvert_template_TemplateInstanceObject_To_v1_TemplateInstanceObject(in, out, s) +} + func autoConvert_v1_TemplateInstanceRequester_To_template_TemplateInstanceRequester(in *TemplateInstanceRequester, out *template.TemplateInstanceRequester, s conversion.Scope) error { out.Username = in.Username return nil @@ -396,6 +422,17 @@ func Convert_template_TemplateInstanceSpec_To_v1_TemplateInstanceSpec(in *templa func autoConvert_v1_TemplateInstanceStatus_To_template_TemplateInstanceStatus(in *TemplateInstanceStatus, out *template.TemplateInstanceStatus, s conversion.Scope) error { out.Conditions = *(*[]template.TemplateInstanceCondition)(unsafe.Pointer(&in.Conditions)) + if in.Objects != nil { + in, out := &in.Objects, &out.Objects + *out = make([]template.TemplateInstanceObject, len(*in)) + for i := range *in { + if err := Convert_v1_TemplateInstanceObject_To_template_TemplateInstanceObject(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } + } else { + out.Objects = nil + } return nil } @@ -405,10 +442,17 @@ func Convert_v1_TemplateInstanceStatus_To_template_TemplateInstanceStatus(in *Te } func autoConvert_template_TemplateInstanceStatus_To_v1_TemplateInstanceStatus(in *template.TemplateInstanceStatus, out *TemplateInstanceStatus, s conversion.Scope) error { - if in.Conditions == nil { - out.Conditions = make([]TemplateInstanceCondition, 0) + out.Conditions = *(*[]TemplateInstanceCondition)(unsafe.Pointer(&in.Conditions)) + if in.Objects != nil { + in, out := &in.Objects, &out.Objects + *out = make([]TemplateInstanceObject, len(*in)) + for i := range *in { + if err := Convert_template_TemplateInstanceObject_To_v1_TemplateInstanceObject(&(*in)[i], &(*out)[i], s); err != nil { + return err + } + } } else { - out.Conditions = *(*[]TemplateInstanceCondition)(unsafe.Pointer(&in.Conditions)) + out.Objects = nil } return nil } diff --git a/pkg/template/apis/template/v1/zz_generated.deepcopy.go b/pkg/template/apis/template/v1/zz_generated.deepcopy.go index 308f1fb67f67..1bd3a5ed6db2 100644 --- a/pkg/template/apis/template/v1/zz_generated.deepcopy.go +++ b/pkg/template/apis/template/v1/zz_generated.deepcopy.go @@ -28,6 +28,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_TemplateInstance, InType: reflect.TypeOf(&TemplateInstance{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_TemplateInstanceCondition, InType: reflect.TypeOf(&TemplateInstanceCondition{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_TemplateInstanceList, InType: reflect.TypeOf(&TemplateInstanceList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_TemplateInstanceObject, InType: reflect.TypeOf(&TemplateInstanceObject{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_TemplateInstanceRequester, InType: reflect.TypeOf(&TemplateInstanceRequester{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_TemplateInstanceSpec, InType: reflect.TypeOf(&TemplateInstanceSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1_TemplateInstanceStatus, InType: reflect.TypeOf(&TemplateInstanceStatus{})}, @@ -186,6 +187,16 @@ func DeepCopy_v1_TemplateInstanceList(in interface{}, out interface{}, c *conver } } +// DeepCopy_v1_TemplateInstanceObject is an autogenerated deepcopy function. +func DeepCopy_v1_TemplateInstanceObject(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*TemplateInstanceObject) + out := out.(*TemplateInstanceObject) + *out = *in + return nil + } +} + // DeepCopy_v1_TemplateInstanceRequester is an autogenerated deepcopy function. func DeepCopy_v1_TemplateInstanceRequester(in interface{}, out interface{}, c *conversion.Cloner) error { { @@ -234,6 +245,11 @@ func DeepCopy_v1_TemplateInstanceStatus(in interface{}, out interface{}, c *conv } } } + if in.Objects != nil { + in, out := &in.Objects, &out.Objects + *out = make([]TemplateInstanceObject, len(*in)) + copy(*out, *in) + } return nil } } diff --git a/pkg/template/apis/template/zz_generated.deepcopy.go b/pkg/template/apis/template/zz_generated.deepcopy.go index 1c289a033091..15d0eb696e44 100644 --- a/pkg/template/apis/template/zz_generated.deepcopy.go +++ b/pkg/template/apis/template/zz_generated.deepcopy.go @@ -28,6 +28,7 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_template_TemplateInstance, InType: reflect.TypeOf(&TemplateInstance{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_template_TemplateInstanceCondition, InType: reflect.TypeOf(&TemplateInstanceCondition{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_template_TemplateInstanceList, InType: reflect.TypeOf(&TemplateInstanceList{})}, + conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_template_TemplateInstanceObject, InType: reflect.TypeOf(&TemplateInstanceObject{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_template_TemplateInstanceRequester, InType: reflect.TypeOf(&TemplateInstanceRequester{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_template_TemplateInstanceSpec, InType: reflect.TypeOf(&TemplateInstanceSpec{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_template_TemplateInstanceStatus, InType: reflect.TypeOf(&TemplateInstanceStatus{})}, @@ -186,6 +187,16 @@ func DeepCopy_template_TemplateInstanceList(in interface{}, out interface{}, c * } } +// DeepCopy_template_TemplateInstanceObject is an autogenerated deepcopy function. +func DeepCopy_template_TemplateInstanceObject(in interface{}, out interface{}, c *conversion.Cloner) error { + { + in := in.(*TemplateInstanceObject) + out := out.(*TemplateInstanceObject) + *out = *in + return nil + } +} + // DeepCopy_template_TemplateInstanceRequester is an autogenerated deepcopy function. func DeepCopy_template_TemplateInstanceRequester(in interface{}, out interface{}, c *conversion.Cloner) error { { @@ -234,6 +245,11 @@ func DeepCopy_template_TemplateInstanceStatus(in interface{}, out interface{}, c } } } + if in.Objects != nil { + in, out := &in.Objects, &out.Objects + *out = make([]TemplateInstanceObject, len(*in)) + copy(*out, *in) + } return nil } } diff --git a/pkg/template/controller/templateinstance_controller.go b/pkg/template/controller/templateinstance_controller.go index 3a0921b3bb49..be24f4b42e51 100644 --- a/pkg/template/controller/templateinstance_controller.go +++ b/pkg/template/controller/templateinstance_controller.go @@ -10,6 +10,7 @@ import ( "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + kerrs "k8s.io/apimachinery/pkg/util/errors" utilerrors "k8s.io/apimachinery/pkg/util/errors" utilruntime "k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/wait" @@ -294,7 +295,7 @@ func (c *TemplateInstanceController) instantiate(templateInstance *templateapi.T errs := runtime.DecodeList(template.Objects, kapi.Codecs.UniversalDecoder()) if len(errs) > 0 { - return errs[0] + return kerrs.NewAggregate(errs) } // We add an OwnerReference to all objects we create - this is also needed @@ -360,26 +361,49 @@ func (c *TemplateInstanceController) instantiate(templateInstance *templateapi.T if kerrors.IsAlreadyExists(createErr) { obj, err := helper.Get(namespace, info.Name, false) if err != nil { - return createObj, createErr + return nil, err } meta, err := meta.Accessor(obj) if err != nil { - return createObj, createErr + return nil, err } if meta.GetLabels()[templateapi.TemplateInstanceLabel] == templateInstance.Name { - return obj, nil + createObj, createErr = obj, nil } } - return createObj, createErr + if createErr != nil { + return createObj, createErr + } + + meta, err := meta.Accessor(createObj) + if err != nil { + return nil, err + } + + templateInstance.Status.Objects = append(templateInstance.Status.Objects, + templateapi.TemplateInstanceObject{ + Ref: kapi.ObjectReference{ + Kind: info.Mapping.GroupVersionKind.Kind, + Namespace: namespace, + Name: info.Name, + UID: meta.GetUID(), + APIVersion: info.Mapping.GroupVersionKind.GroupVersion().String(), + }, + }, + ) + + return createObj, nil } // Second, create the objects, being tolerant if they already exist and are // labelled as having previously been created by us. glog.V(4).Infof("TemplateInstance controller: creating objects for %s/%s", templateInstance.Namespace, templateInstance.Name) + templateInstance.Status.Objects = nil + errs = bulk.Run(&kapi.List{Items: template.Objects}, templateInstance.Namespace) if len(errs) > 0 { return utilerrors.NewAggregate(errs) diff --git a/test/extended/templates/templateservicebroker_e2e.go b/test/extended/templates/templateservicebroker_e2e.go index 11936e4bde4a..84399532d984 100644 --- a/test/extended/templates/templateservicebroker_e2e.go +++ b/test/extended/templates/templateservicebroker_e2e.go @@ -10,6 +10,8 @@ import ( kerrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" kapi "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/v1" "k8s.io/kubernetes/test/e2e/framework" @@ -35,6 +37,7 @@ var _ = g.Describe("[Conformance][templates] templateservicebroker end-to-end te instanceID = uuid.NewRandom().String() bindingID = uuid.NewRandom().String() template *templateapi.Template + processedtemplate *templateapi.Template privatetemplate *templateapi.Template clusterrolebinding *authorizationapi.ClusterRoleBinding brokercli client.Client @@ -52,6 +55,12 @@ var _ = g.Describe("[Conformance][templates] templateservicebroker end-to-end te template, err = cli.TemplateClient().Template().Templates("openshift").Get("cakephp-mysql-persistent", metav1.GetOptions{}) o.Expect(err).NotTo(o.HaveOccurred()) + processedtemplate, err = cli.AdminClient().TemplateConfigs("openshift").Create(template) + o.Expect(err).NotTo(o.HaveOccurred()) + + errs := runtime.DecodeList(processedtemplate.Objects, unstructured.UnstructuredJSONScheme) + o.Expect(errs).To(o.BeEmpty()) + // privatetemplate is an additional template in our namespace privatetemplate, err = cli.Client().Templates(cli.Namespace()).Create(&templateapi.Template{ ObjectMeta: metav1.ObjectMeta{ @@ -176,6 +185,15 @@ var _ = g.Describe("[Conformance][templates] templateservicebroker end-to-end te o.Expect(templateInstance.Status.Conditions[0].Type).To(o.Equal(templateapi.TemplateInstanceReady)) o.Expect(templateInstance.Status.Conditions[0].Status).To(o.Equal(kapi.ConditionTrue)) + o.Expect(templateInstance.Status.Objects).To(o.HaveLen(len(template.Objects))) + for i, obj := range templateInstance.Status.Objects { + u := processedtemplate.Objects[i].(*unstructured.Unstructured) + o.Expect(obj.Ref.Kind).To(o.Equal(u.GetKind())) + o.Expect(obj.Ref.Namespace).To(o.Equal(cli.Namespace())) + o.Expect(obj.Ref.Name).To(o.Equal(u.GetName())) + o.Expect(obj.Ref.UID).ToNot(o.BeEmpty()) + } + o.Expect(secret.Type).To(o.Equal(v1.SecretTypeOpaque)) o.Expect(secret.Data).To(o.Equal(map[string][]byte{ "DATABASE_USER": []byte("test"),