diff --git a/api/rbac/v1alpha1/generated.pb.go b/api/rbac/v1alpha1/generated.pb.go index b995b62b4..fc82ae238 100644 --- a/api/rbac/v1alpha1/generated.pb.go +++ b/api/rbac/v1alpha1/generated.pb.go @@ -152,48 +152,47 @@ func init() { } var fileDescriptor_0ed74b0f425c3672 = []byte{ - // 646 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0xcd, 0x6e, 0xd3, 0x40, - 0x18, 0x8c, 0xe3, 0xb8, 0x6a, 0x37, 0x4d, 0x91, 0x2c, 0x40, 0x56, 0x85, 0xec, 0xca, 0xa7, 0xf6, - 0xc0, 0x9a, 0x46, 0x08, 0x15, 0x21, 0x0e, 0xb8, 0x20, 0x0e, 0xa8, 0x14, 0x6d, 0x01, 0x09, 0x4e, - 0xac, 0x9d, 0xc5, 0x59, 0x62, 0x7b, 0xad, 0x5d, 0x3b, 0x52, 0x6e, 0x3c, 0x02, 0x8f, 0xd5, 0x0b, - 0x52, 0x8f, 0x3d, 0x45, 0xd4, 0x7d, 0x00, 0x5e, 0x01, 0xed, 0xda, 0x69, 0xec, 0xfe, 0xa8, 0x3d, - 0x71, 0x8a, 0x77, 0xbe, 0x99, 0xcf, 0x3b, 0xf3, 0x7d, 0x0e, 0x78, 0x1e, 0xd1, 0x7c, 0x5c, 0x04, - 0x30, 0x64, 0x89, 0x87, 0x27, 0x05, 0xcd, 0x67, 0xde, 0x04, 0xf3, 0x88, 0x79, 0x38, 0xa3, 0x1e, - 0x0f, 0x70, 0xe8, 0x4d, 0x77, 0x71, 0x9c, 0x8d, 0xf1, 0xae, 0x17, 0x91, 0x94, 0x70, 0x9c, 0x93, - 0x11, 0xcc, 0x38, 0xcb, 0x99, 0xb9, 0xb3, 0x94, 0xc2, 0x4a, 0x0a, 0x95, 0x14, 0xe2, 0x8c, 0x42, - 0x29, 0x85, 0x0b, 0xe9, 0xe6, 0xe3, 0xc6, 0x5b, 0x22, 0x16, 0x31, 0x4f, 0x75, 0x08, 0x8a, 0xef, - 0xea, 0xa4, 0x0e, 0xea, 0xa9, 0xea, 0xbc, 0xe9, 0x4e, 0xf6, 0x04, 0xa4, 0xd5, 0x1d, 0x42, 0xc6, - 0x89, 0x37, 0xbd, 0xf2, 0xf6, 0x16, 0xa7, 0xbe, 0xe7, 0x15, 0xce, 0xd3, 0x25, 0x27, 0xc1, 0xe1, - 0x98, 0xa6, 0x84, 0xcf, 0xbc, 0x6c, 0x12, 0x49, 0x40, 0x78, 0x09, 0xc9, 0xf1, 0x75, 0x2a, 0xef, - 0x26, 0x15, 0x2f, 0xd2, 0x9c, 0x26, 0xe4, 0x8a, 0xe0, 0xd9, 0x6d, 0x02, 0x11, 0x8e, 0x49, 0x82, - 0x2f, 0xeb, 0xdc, 0x73, 0x0d, 0xdc, 0x43, 0x44, 0xb0, 0x82, 0x87, 0xe4, 0x35, 0xc9, 0x31, 0x8d, - 0x85, 0xf9, 0x02, 0x0c, 0x78, 0x0d, 0xbd, 0xe5, 0xac, 0xc8, 0x2c, 0x6d, 0x4b, 0xdb, 0x5e, 0xf3, - 0x1f, 0x1c, 0xcf, 0x9d, 0x4e, 0x39, 0x77, 0x06, 0xa8, 0x59, 0x44, 0x6d, 0xae, 0xb9, 0x07, 0xd6, - 0x17, 0xc0, 0xc7, 0x59, 0x46, 0xac, 0xae, 0xd2, 0xde, 0xaf, 0xb5, 0xeb, 0xa8, 0x51, 0x43, 0x2d, - 0x66, 0x53, 0xf9, 0x1e, 0x27, 0xc4, 0xd2, 0xaf, 0x57, 0xca, 0x1a, 0x6a, 0x31, 0x4d, 0x07, 0x18, - 0x53, 0xc2, 0x03, 0x61, 0xf5, 0xb6, 0xf4, 0xed, 0x35, 0x7f, 0xad, 0x9c, 0x3b, 0xc6, 0x67, 0x09, - 0xa0, 0x0a, 0x77, 0x7f, 0x77, 0x41, 0x0f, 0xb1, 0x98, 0x98, 0xdf, 0xc0, 0xaa, 0x8c, 0x7c, 0x84, - 0x73, 0xac, 0x5c, 0xf5, 0x87, 0x4f, 0x60, 0x95, 0x1c, 0x6c, 0x26, 0x07, 0xb3, 0x49, 0x24, 0x01, - 0x01, 0x25, 0x1b, 0x4e, 0x77, 0xe1, 0x61, 0xf0, 0x83, 0x84, 0xf9, 0x01, 0xc9, 0xb1, 0x6f, 0xd6, - 0x37, 0x02, 0x4b, 0x0c, 0x5d, 0x74, 0x95, 0x2e, 0xd4, 0x06, 0x1e, 0xe0, 0x14, 0x47, 0x64, 0xa4, - 0xfc, 0xaf, 0x2e, 0x5d, 0xbc, 0x6b, 0xd4, 0x50, 0x8b, 0x69, 0x3e, 0x02, 0x3d, 0x51, 0x04, 0xc2, - 0xd2, 0x95, 0x89, 0xd5, 0x72, 0xee, 0xf4, 0x8e, 0x8a, 0x40, 0x20, 0x85, 0x9a, 0x2e, 0x58, 0x21, - 0x89, 0x1c, 0x4f, 0x6d, 0x12, 0x94, 0x73, 0x67, 0xe5, 0x8d, 0x42, 0x50, 0x5d, 0x91, 0x9c, 0x48, - 0x0e, 0x41, 0x58, 0xc6, 0x92, 0xa3, 0xc6, 0x22, 0x50, 0x5d, 0x31, 0xf7, 0x81, 0xc1, 0x8b, 0x98, - 0x08, 0x6b, 0x65, 0x4b, 0xdf, 0xee, 0x0f, 0xed, 0x86, 0xfd, 0xc5, 0x07, 0x03, 0x3f, 0xb0, 0x98, - 0x86, 0x33, 0x54, 0xc4, 0xc4, 0x1f, 0xd4, 0x17, 0x37, 0xe4, 0x49, 0xa0, 0x4a, 0xeb, 0xfe, 0xed, - 0x82, 0x81, 0xcc, 0x73, 0x31, 0x13, 0xf1, 0x1f, 0x82, 0x0d, 0xc0, 0x86, 0x20, 0x7c, 0x4a, 0x43, - 0xf2, 0x2a, 0x0c, 0x59, 0x91, 0xe6, 0x2a, 0xda, 0xfe, 0xd0, 0x6d, 0x3a, 0x90, 0x5f, 0xaa, 0xec, - 0x7a, 0xd4, 0x62, 0xfa, 0x0f, 0xeb, 0xce, 0x1b, 0x6d, 0x1c, 0x5d, 0xea, 0x68, 0xbe, 0x04, 0x06, - 0x67, 0x32, 0x1c, 0x5d, 0x85, 0x63, 0x5d, 0x17, 0x8e, 0xf4, 0xdd, 0x88, 0x85, 0x55, 0xb1, 0xc8, - 0x1f, 0xf3, 0x0b, 0x58, 0x97, 0x0f, 0x3e, 0x4d, 0x47, 0x34, 0x8d, 0xaa, 0x49, 0xf5, 0x87, 0xce, - 0x8d, 0x5d, 0x2a, 0x5e, 0x63, 0xc5, 0x1b, 0x62, 0xd4, 0x6a, 0xe5, 0x72, 0x00, 0x3e, 0x09, 0xc2, - 0xf7, 0x63, 0x4c, 0x13, 0x71, 0xb1, 0x2a, 0xda, 0x2d, 0xab, 0xd2, 0xbd, 0xc3, 0xaa, 0xe8, 0x37, - 0xad, 0x8a, 0x7f, 0x78, 0x7c, 0x66, 0x77, 0x4e, 0xce, 0xec, 0xce, 0xe9, 0x99, 0xdd, 0xf9, 0x59, - 0xda, 0xda, 0x71, 0x69, 0x6b, 0x27, 0xa5, 0xad, 0x9d, 0x96, 0xb6, 0xf6, 0xa7, 0xb4, 0xb5, 0x5f, - 0xe7, 0x76, 0xe7, 0xeb, 0xce, 0x9d, 0xff, 0xbd, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x31, 0x40, - 0xab, 0x33, 0xe9, 0x05, 0x00, 0x00, + // 625 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0x41, 0x6e, 0xd3, 0x40, + 0x14, 0x8d, 0x93, 0xb8, 0x6a, 0x27, 0x6d, 0x91, 0x2c, 0x84, 0xac, 0x0a, 0xd9, 0x95, 0x57, 0xed, + 0x82, 0x31, 0x8d, 0x10, 0x2a, 0x0b, 0x16, 0xb8, 0x20, 0x16, 0xa8, 0x14, 0x4d, 0x01, 0x09, 0x56, + 0x8c, 0x9d, 0xc1, 0x19, 0x62, 0x7b, 0xac, 0x19, 0x3b, 0x52, 0x76, 0x1c, 0x81, 0x53, 0x70, 0x96, + 0x6e, 0x90, 0xba, 0xec, 0x2a, 0xa2, 0xe6, 0x00, 0x5c, 0x01, 0xcd, 0xd8, 0x49, 0xec, 0x26, 0x51, + 0xbb, 0x62, 0x15, 0xcf, 0xfb, 0xef, 0x7d, 0xff, 0xf7, 0xe6, 0xc7, 0xe0, 0x59, 0x48, 0xb3, 0x61, + 0xee, 0xc3, 0x80, 0xc5, 0x2e, 0x1e, 0xe5, 0x34, 0x9b, 0xb8, 0x23, 0xcc, 0x43, 0xe6, 0xe2, 0x94, + 0xba, 0xdc, 0xc7, 0x81, 0x3b, 0x3e, 0xc2, 0x51, 0x3a, 0xc4, 0x47, 0x6e, 0x48, 0x12, 0xc2, 0x71, + 0x46, 0x06, 0x30, 0xe5, 0x2c, 0x63, 0xc6, 0xe1, 0x42, 0x0a, 0x4b, 0x29, 0x54, 0x52, 0x88, 0x53, + 0x0a, 0xa5, 0x14, 0xce, 0xa4, 0x7b, 0x8f, 0x6a, 0x6f, 0x09, 0x59, 0xc8, 0x5c, 0xd5, 0xc1, 0xcf, + 0xbf, 0xaa, 0x93, 0x3a, 0xa8, 0xa7, 0xb2, 0xf3, 0x9e, 0x33, 0x3a, 0x16, 0x90, 0x96, 0x33, 0x04, + 0x8c, 0x13, 0x77, 0xbc, 0xf4, 0xf6, 0x06, 0xa7, 0x9a, 0x73, 0x89, 0xf3, 0x64, 0xc1, 0x89, 0x71, + 0x30, 0xa4, 0x09, 0xe1, 0x13, 0x37, 0x1d, 0x85, 0x12, 0x10, 0x6e, 0x4c, 0x32, 0xbc, 0x4a, 0xe5, + 0xae, 0x53, 0xf1, 0x3c, 0xc9, 0x68, 0x4c, 0x96, 0x04, 0x4f, 0x6f, 0x13, 0x88, 0x60, 0x48, 0x62, + 0x7c, 0x53, 0xe7, 0xfc, 0xd4, 0xc0, 0x3d, 0x44, 0x04, 0xcb, 0x79, 0x40, 0x5e, 0x92, 0x0c, 0xd3, + 0x48, 0x18, 0xc7, 0x60, 0x9b, 0x57, 0xd0, 0xfb, 0x49, 0x4a, 0x4c, 0x6d, 0x5f, 0x3b, 0xd8, 0xf2, + 0xee, 0x5f, 0x4c, 0xed, 0x56, 0x31, 0xb5, 0xb7, 0x51, 0xad, 0x86, 0x1a, 0xcc, 0xba, 0xf2, 0x2d, + 0x8e, 0x89, 0xd9, 0x5e, 0xad, 0x94, 0x35, 0xd4, 0x60, 0x1a, 0x36, 0xd0, 0xc7, 0x84, 0xfb, 0xc2, + 0xec, 0xec, 0x77, 0x0e, 0xb6, 0xbc, 0xad, 0x62, 0x6a, 0xeb, 0x1f, 0x25, 0x80, 0x4a, 0xdc, 0xf9, + 0xd5, 0x06, 0x5d, 0xc4, 0x22, 0x62, 0x7c, 0x01, 0x9b, 0x32, 0xb5, 0x01, 0xce, 0xb0, 0x9a, 0xac, + 0xd7, 0x7f, 0x0c, 0x4b, 0xf3, 0xb0, 0x6e, 0x1e, 0xa6, 0xa3, 0x50, 0x02, 0x02, 0x4a, 0x36, 0x1c, + 0x1f, 0xc1, 0x33, 0xff, 0x1b, 0x09, 0xb2, 0x53, 0x92, 0x61, 0xcf, 0xa8, 0x26, 0x02, 0x0b, 0x0c, + 0xcd, 0xbb, 0x4a, 0x17, 0x6a, 0x89, 0x4e, 0x71, 0x82, 0x43, 0x32, 0x50, 0x2e, 0x36, 0x17, 0x2e, + 0xde, 0xd4, 0x6a, 0xa8, 0xc1, 0x34, 0x1e, 0x82, 0xae, 0xc8, 0xe7, 0x26, 0x36, 0x8b, 0xa9, 0xdd, + 0x3d, 0xcf, 0x7d, 0x81, 0x14, 0x6a, 0x38, 0x60, 0x83, 0xc4, 0x32, 0x61, 0xb3, 0xab, 0xea, 0xa0, + 0x98, 0xda, 0x1b, 0xaf, 0x14, 0x82, 0xaa, 0x8a, 0xe4, 0x84, 0x9c, 0xe5, 0xa9, 0x30, 0xf5, 0x05, + 0xe7, 0xb5, 0x42, 0x50, 0x55, 0x31, 0x4e, 0x80, 0xce, 0xf3, 0x88, 0x08, 0x73, 0x63, 0xbf, 0x73, + 0xd0, 0xeb, 0x5b, 0x35, 0xfb, 0xb3, 0x9d, 0x87, 0xef, 0x58, 0x44, 0x83, 0x09, 0xca, 0x23, 0xe2, + 0xed, 0x54, 0x83, 0xeb, 0xf2, 0x24, 0x50, 0xa9, 0x75, 0xfe, 0xb6, 0xc1, 0x8e, 0xcc, 0x73, 0x76, + 0x27, 0xe2, 0x3f, 0x04, 0xeb, 0x83, 0x5d, 0x41, 0xf8, 0x98, 0x06, 0xe4, 0x45, 0x10, 0xb0, 0x3c, + 0xc9, 0x54, 0xb4, 0xbd, 0xbe, 0x53, 0x77, 0x20, 0xff, 0x6c, 0xb2, 0xeb, 0x79, 0x83, 0xe9, 0x3d, + 0xa8, 0x3a, 0xef, 0x36, 0x71, 0x74, 0xa3, 0xa3, 0xf1, 0x1c, 0xe8, 0x9c, 0xc9, 0x70, 0x3a, 0x2a, + 0x1c, 0x73, 0x55, 0x38, 0xd2, 0x77, 0x2d, 0x16, 0x56, 0xc6, 0x22, 0x7f, 0x8c, 0x4f, 0x60, 0x5b, + 0x3e, 0x78, 0x34, 0x19, 0xd0, 0x24, 0x2c, 0x6f, 0xaa, 0xd7, 0xb7, 0xd7, 0x76, 0x29, 0x79, 0xb5, + 0x15, 0xaf, 0x89, 0x51, 0xa3, 0x95, 0xc3, 0x01, 0xf8, 0x20, 0x08, 0x3f, 0x89, 0x30, 0x8d, 0xc5, + 0x7c, 0x55, 0xb4, 0x5b, 0x56, 0xa5, 0x7d, 0x87, 0x55, 0xe9, 0xac, 0x5b, 0x15, 0xef, 0xec, 0xe2, + 0xda, 0x6a, 0x5d, 0x5e, 0x5b, 0xad, 0xab, 0x6b, 0xab, 0xf5, 0xbd, 0xb0, 0xb4, 0x8b, 0xc2, 0xd2, + 0x2e, 0x0b, 0x4b, 0xbb, 0x2a, 0x2c, 0xed, 0x77, 0x61, 0x69, 0x3f, 0xfe, 0x58, 0xad, 0xcf, 0x87, + 0x77, 0xfe, 0x00, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xb5, 0x07, 0x58, 0xc7, 0xac, 0x05, 0x00, + 0x00, } func (m *ResourceDetails) Marshal() (dAtA []byte, err error) { @@ -222,23 +221,18 @@ func (m *ResourceDetails) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Verbs[iNdEx]) i = encodeVarintGenerated(dAtA, i, uint64(len(m.Verbs[iNdEx]))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } } i -= len(m.ResourceName) copy(dAtA[i:], m.ResourceName) i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceName))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 i -= len(m.ResourceType) copy(dAtA[i:], m.ResourceType) i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceType))) i-- - dAtA[i] = 0x12 - i -= len(m.ResourceGroup) - copy(dAtA[i:], m.ResourceGroup) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceGroup))) - i-- dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -463,8 +457,6 @@ func (m *ResourceDetails) Size() (n int) { } var l int _ = l - l = len(m.ResourceGroup) - n += 1 + l + sovGenerated(uint64(l)) l = len(m.ResourceType) n += 1 + l + sovGenerated(uint64(l)) l = len(m.ResourceName) @@ -577,7 +569,6 @@ func (this *ResourceDetails) String() string { return "nil" } s := strings.Join([]string{`&ResourceDetails{`, - `ResourceGroup:` + fmt.Sprintf("%v", this.ResourceGroup) + `,`, `ResourceType:` + fmt.Sprintf("%v", this.ResourceType) + `,`, `ResourceName:` + fmt.Sprintf("%v", this.ResourceName) + `,`, `Verbs:` + fmt.Sprintf("%v", this.Verbs) + `,`, @@ -678,38 +669,6 @@ func (m *ResourceDetails) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceGroup", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceGroup = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ResourceType", wireType) } @@ -741,7 +700,7 @@ func (m *ResourceDetails) Unmarshal(dAtA []byte) error { } m.ResourceType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ResourceName", wireType) } @@ -773,7 +732,7 @@ func (m *ResourceDetails) Unmarshal(dAtA []byte) error { } m.ResourceName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType) } diff --git a/api/rbac/v1alpha1/generated.proto b/api/rbac/v1alpha1/generated.proto index fab11776c..db50c7b27 100644 --- a/api/rbac/v1alpha1/generated.proto +++ b/api/rbac/v1alpha1/generated.proto @@ -15,13 +15,11 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; option go_package = "github.com/akuity/kargo/api/rbac/v1alpha1"; message ResourceDetails { - optional string resourceGroup = 1; + optional string resourceType = 1; - optional string resourceType = 2; + optional string resourceName = 2; - optional string resourceName = 3; - - repeated string verbs = 4; + repeated string verbs = 3; } // +kubebuilder:object:root=true diff --git a/api/rbac/v1alpha1/role_types.go b/api/rbac/v1alpha1/role_types.go index cbdf8cae5..03012cbfc 100644 --- a/api/rbac/v1alpha1/role_types.go +++ b/api/rbac/v1alpha1/role_types.go @@ -27,10 +27,9 @@ type RoleResources struct { } type ResourceDetails struct { - ResourceGroup string `json:"resourceGroup,omitempty"` - ResourceType string `json:"resourceType,omitempty"` - ResourceName string `json:"resourceName,omitempty"` - Verbs []string `json:"verbs,omitempty"` + ResourceType string `json:"resourceType,omitempty"` + ResourceName string `json:"resourceName,omitempty"` + Verbs []string `json:"verbs,omitempty"` } type UserClaims struct { diff --git a/charts/kargo/templates/api/cluster-role.yaml b/charts/kargo/templates/api/cluster-role.yaml index cf06717e7..7b982a304 100644 --- a/charts/kargo/templates/api/cluster-role.yaml +++ b/charts/kargo/templates/api/cluster-role.yaml @@ -100,6 +100,10 @@ rules: - "*" {{- end }} --- +# This role is bound to the API server ServiceAccount and the kargo-admin +# ServiceAccount in project namespaces as they are created. This dynamically +# extends the API server's and any (global) admin's most sensitive permissions +# on a per-namespace basis instead of granting them cluster-wide. apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: diff --git a/charts/kargo/templates/users/cluster-roles.yaml b/charts/kargo/templates/users/cluster-roles.yaml index 24fe1fa96..7b672d50c 100644 --- a/charts/kargo/templates/users/cluster-roles.yaml +++ b/charts/kargo/templates/users/cluster-roles.yaml @@ -10,22 +10,18 @@ rules: - "" resources: - events - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - namespaces + # secrets permissions are granted dynamically at the project-level + - serviceaccounts # writes on serviceaccounts are granted dynamically at the project-level verbs: - get - list - watch - apiGroups: - - "" + - rbac.authorization.k8s.io resources: - - serviceaccounts + - rolebindings # writes on rolebindings are granted dynamically at the project-level + - roles # writes on roles are granted dynamically at the project-level verbs: - get - list @@ -34,52 +30,49 @@ rules: - kargo.akuity.io resources: - freights + - projects + - stages + - warehouses verbs: - - delete - - get - - list - - patch - - watch -- apiGroups: - - kargo.akuity.io - resources: - - freights/status - verbs: - - patch - - update + - "*" # full access to all mutable Kargo resource types - apiGroups: - kargo.akuity.io resources: - - projects - stages - - warehouses verbs: - - "*" + - promote # promotion permission for all stages - apiGroups: - kargo.akuity.io resources: - promotions - verbs: + verbs: # nearly full access to all promotions, but they are immutable - create + - delete - get - list - - patch - watch -{{- if .Values.api.rollouts.integrationEnabled }} - apiGroups: - - argoproj.io + - kargo.akuity.io resources: - - analysistemplates + - freights/status verbs: - - "*" + - patch # for manual approvals +{{- if .Values.api.rollouts.integrationEnabled }} - apiGroups: - argoproj.io resources: - analysisruns - verbs: + verbs: # view and delete analysisruns + - delete - get - list - watch +- apiGroups: + - argoproj.io + resources: + - analysistemplates + verbs: + - "*" # full access to analysistemplates {{- end }} --- apiVersion: rbac.authorization.k8s.io/v1 @@ -93,22 +86,17 @@ rules: - "" resources: - events - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - namespaces + - serviceaccounts verbs: - get - list - watch - apiGroups: - - "" + - rbac.authorization.k8s.io resources: - - serviceaccounts + - rolebindings + - roles verbs: - get - list @@ -126,18 +114,11 @@ rules: - list - watch {{- if .Values.api.rollouts.integrationEnabled }} -- apiGroups: - - argoproj.io - resources: - - analysistemplates - verbs: - - get - - list - - watch - apiGroups: - argoproj.io resources: - analysisruns + - analysistemplates verbs: - get - list diff --git a/docs/docs/30-how-to-guides/30-managing-user-permissions.md b/docs/docs/30-how-to-guides/30-managing-user-permissions.md index 3ce70c328..024d8e9e6 100644 --- a/docs/docs/30-how-to-guides/30-managing-user-permissions.md +++ b/docs/docs/30-how-to-guides/30-managing-user-permissions.md @@ -201,7 +201,7 @@ Role: ```shell kargo grant --role developer \ - --resource-group kargo.akuity.io --resource-type stages --verb '*' \ + --resource-type stages --verb '*' \ --project kargo-demo ``` diff --git a/docs/docs/50-roadmap.md b/docs/docs/50-roadmap.md index 4bea25508..f73c7066f 100644 --- a/docs/docs/50-roadmap.md +++ b/docs/docs/50-roadmap.md @@ -5,10 +5,14 @@ Description: See what's on the roadmap of Kargo and find out more about the late # Kargo Roadmap -Over a series of releases, Kargo's maintainers intend to establish and settle into a predictable, but yet to be determined release cadence. +Over a series of releases, Kargo's maintainers have settled into a cadence of a +minor release roughly every five weeks, with two or three major features +completed per release. :::caution -This roadmap is subject to change at any time, for the most up to date information, please see the [GitHub Project](https://github.com/akuity/kargo/milestones) +This roadmap tracks only _major_ features and is subject to change at any time, +for the most up to date information, please see the [GitHub +Project](https://github.com/akuity/kargo/milestones) ::: ## v0.2.0 @@ -54,17 +58,27 @@ __Status:__ Completed ## v0.6.0 +__Status:__ Completed + +| Name | Type | Description | +| ---- | ---- | ----------- | +| Project Management | feature | Added user / role / permission management capabilities to the CLI and UI. | +| Events | feature | Kargo emits noteworthy events as Kubernetes events. Events are also viewable in the UI. | +| Production Readiness | chore | Prioritized stability of existing features. **This does not mean v0.6.0 is production-ready. It means it is several steps closer to it.** | + +## v0.7.0 + __Status:__ In Progress +__Expected:__ 2024-06-07 | Name | Type | Description | | ---- | ---- | ----------- | | Multiple `Warehouse`s | feature | Improve UI support for multiple Freightlines rooted in different `Warehouse`s. | | Manual `Freight` Creation | feature | Add CLI and UI support for manual `Freight` creation. This will give users the flexibility to create novel combinations of artifacts that `Warehouse`s will not -- for instance, pairing the most recent version of a container image with an _older_ version of application manifests. | -| Project Management | feature | | -| Production Readiness | chore | | -| [Patch Promotions](https://github.com/akuity/kargo/issues/1250) | poc | Support a generalized option to promote arbitrary configuration (e.g. strings, files, and directories) to other paths of the Git repository. | +| [Patch Promotions](https://github.com/akuity/kargo/issues/1250) | poc | Support a generalized option to promote arbitrary configuration (e.g. strings, files, and directories) to other paths of a GitOps repository. | +| Production Readiness | chore | | -## v0.7.0 .. v0.n.0 +## v0.8.0 .. v0.n.0 | Name | Type | Description | | ---- | ---- | ----------- | @@ -74,7 +88,7 @@ __Status:__ In Progress | `kargo init` | feature | Addition of an `init` sub-command to the Kargo CLI for streamlining project / pipeline creation. | | Standalone Image Writeback | feature | Write back image changes without having to subscribe to an image repository. | -## Criteria for 1.0.0 Release +## Criteria for a Production-Ready 1.0.0 Release Maintainers will consider cutting a stable v1.0.0 release once: diff --git a/internal/api/rbac/policy_rules.go b/internal/api/rbac/policy_rules.go index 69543185b..5422b3a68 100644 --- a/internal/api/rbac/policy_rules.go +++ b/internal/api/rbac/policy_rules.go @@ -7,6 +7,10 @@ import ( "strings" rbacv1 "k8s.io/api/rbac/v1" + kubeerr "k8s.io/apimachinery/pkg/api/errors" + + kargoapi "github.com/akuity/kargo/api/v1alpha1" + rolloutsapi "github.com/akuity/kargo/internal/controller/rollouts/api/v1alpha1" ) var allVerbs = []string{ @@ -49,27 +53,23 @@ func BuildNormalizedPolicyRulesMap( ) (map[string]rbacv1.PolicyRule, error) { rulesMap := make(map[string]rbacv1.PolicyRule) for _, rule := range rules { - for _, group := range rule.APIGroups { - group = strings.TrimSpace(group) - if group == "*" { - return nil, fmt.Errorf("wildcard APIGroup is not allowed") + for _, resource := range rule.Resources { + if err := validateResourceTypeName(resource); err != nil { + return nil, err } - for _, resource := range rule.Resources { - resource = strings.TrimSpace(resource) - if resource == "*" { - return nil, fmt.Errorf("wildcard Resource is not allowed") - } - if len(rule.ResourceNames) == 0 { - rule.ResourceNames = append(rule.ResourceNames, "") - } - for _, resourceName := range rule.ResourceNames { - verbs := rule.Verbs - key := RuleKey(group, resource, resourceName) - if existingRule, ok := rulesMap[key]; ok { - verbs = append(existingRule.Verbs, verbs...) - } - rulesMap[key] = buildRule(group, resource, resourceName, verbs) + // We ignore the group in the rule and use what we know to be the correct + // group for the resource type. + group := getGroupName(resource) + if len(rule.ResourceNames) == 0 { + rule.ResourceNames = append(rule.ResourceNames, "") + } + for _, resourceName := range rule.ResourceNames { + verbs := rule.Verbs + key := RuleKey(group, resource, resourceName) + if existingRule, ok := rulesMap[key]; ok { + verbs = append(existingRule.Verbs, verbs...) } + rulesMap[key] = buildRule(group, resource, resourceName, verbs) } } } @@ -150,3 +150,40 @@ func buildRule( } return rule } + +// nolint: goconst +func validateResourceTypeName(resource string) error { + switch resource { + case "analysisruns", "analysistemplates", "events", "freights", "freights/status", "roles", + "rolebindings", "promotions", "secrets", "serviceaccounts", "stages", "warehouses": + return nil + case "analysisrun", "analysistemplate", "event", "freight", "role", + "rolebinding", "promotion", "secret", "serviceaccount", "stage", "warehouse": + return kubeerr.NewBadRequest( + fmt.Sprintf(`unrecognized resource type %q; did you mean "%ss"?`, resource, resource), + ) + case "freight/status": + return kubeerr.NewBadRequest( + `unrecognized resource type "freight/status"; did you mean "freights/status"?`, + ) + default: + return kubeerr.NewBadRequest(fmt.Sprintf(`unrecognized resource type %q`, resource)) + } +} + +// nolint: goconst +func getGroupName(resourceType string) string { + // resourceType must already be validated + switch resourceType { + case "events", "secrets", "serviceaccounts": + return "" + case "rolebindings", "roles": + return rbacv1.SchemeGroupVersion.Group + case "freights", "freights/status", "promotions", "stages", "warehouses": + return kargoapi.GroupVersion.Group + case "analysisruns", "analysistemplates": + return rolloutsapi.GroupVersion.Group + default: + return "" // If the resourceType was validated, this will never happen + } +} diff --git a/internal/api/rbac/policy_rules_test.go b/internal/api/rbac/policy_rules_test.go index b8249d016..5dd2f7a6d 100644 --- a/internal/api/rbac/policy_rules_test.go +++ b/internal/api/rbac/policy_rules_test.go @@ -10,61 +10,34 @@ import ( ) func TestNormalizePolicyRules(t *testing.T) { - - t.Run("wildcard group not allowed", func(t *testing.T) { + t.Run("invalid resource type", func(t *testing.T) { _, err := NormalizePolicyRules([]rbacv1.PolicyRule{ { - APIGroups: []string{"*"}, - Resources: []string{"pods"}, + APIGroups: []string{""}, + Resources: []string{"fake-resource"}, Verbs: []string{"get"}, }, }) - require.ErrorContains(t, err, "wildcard APIGroup is not allowed") + require.ErrorContains(t, err, "unrecognized resource type") }) - t.Run("wildcard resource not allowed", func(t *testing.T) { + t.Run("singular resource type", func(t *testing.T) { _, err := NormalizePolicyRules([]rbacv1.PolicyRule{ { APIGroups: []string{""}, - Resources: []string{"*"}, - Verbs: []string{"get"}, - }, - }) - require.ErrorContains(t, err, "wildcard Resource is not allowed") - }) - - t.Run("multiple groups expand", func(t *testing.T) { - rules, err := NormalizePolicyRules([]rbacv1.PolicyRule{ - { // Never mind that this doesn't make sense - APIGroups: []string{"", rbacv1.GroupName}, - Resources: []string{"pods"}, + Resources: []string{"stage"}, Verbs: []string{"get"}, }, }) - require.NoError(t, err) - require.Equal( - t, - []rbacv1.PolicyRule{ - { - APIGroups: []string{""}, - Resources: []string{"pods"}, - Verbs: []string{"get"}, - }, - { - APIGroups: []string{rbacv1.GroupName}, - Resources: []string{"pods"}, - Verbs: []string{"get"}, - }, - }, - rules, - ) + require.ErrorContains(t, err, `unrecognized resource type "stage"`) + require.ErrorContains(t, err, `did you mean "stages"`) }) t.Run("multiple resources expand", func(t *testing.T) { rules, err := NormalizePolicyRules([]rbacv1.PolicyRule{ { APIGroups: []string{""}, - Resources: []string{"pods", "services"}, + Resources: []string{"secrets", "serviceaccounts"}, Verbs: []string{"get"}, }, }) @@ -74,12 +47,12 @@ func TestNormalizePolicyRules(t *testing.T) { []rbacv1.PolicyRule{ { APIGroups: []string{""}, - Resources: []string{"pods"}, + Resources: []string{"secrets"}, Verbs: []string{"get"}, }, { APIGroups: []string{""}, - Resources: []string{"services"}, + Resources: []string{"serviceaccounts"}, Verbs: []string{"get"}, }, }, @@ -91,7 +64,7 @@ func TestNormalizePolicyRules(t *testing.T) { rules, err := NormalizePolicyRules([]rbacv1.PolicyRule{ { APIGroups: []string{""}, - Resources: []string{"pods"}, + Resources: []string{"serviceaccounts"}, ResourceNames: []string{"foo", "bar"}, Verbs: []string{"get"}, }, @@ -102,13 +75,13 @@ func TestNormalizePolicyRules(t *testing.T) { []rbacv1.PolicyRule{ { APIGroups: []string{""}, - Resources: []string{"pods"}, + Resources: []string{"serviceaccounts"}, ResourceNames: []string{"bar"}, Verbs: []string{"get"}, }, { APIGroups: []string{""}, - Resources: []string{"pods"}, + Resources: []string{"serviceaccounts"}, ResourceNames: []string{"foo"}, Verbs: []string{"get"}, }, @@ -121,7 +94,7 @@ func TestNormalizePolicyRules(t *testing.T) { rules, err := NormalizePolicyRules([]rbacv1.PolicyRule{ { APIGroups: []string{""}, - Resources: []string{"pods"}, + Resources: []string{"serviceaccounts"}, Verbs: []string{"list", "get"}, }, }) @@ -131,7 +104,7 @@ func TestNormalizePolicyRules(t *testing.T) { []rbacv1.PolicyRule{ { APIGroups: []string{""}, - Resources: []string{"pods"}, + Resources: []string{"serviceaccounts"}, Verbs: []string{"get", "list"}, }, }, @@ -143,7 +116,7 @@ func TestNormalizePolicyRules(t *testing.T) { rules, err := NormalizePolicyRules([]rbacv1.PolicyRule{ { APIGroups: []string{""}, - Resources: []string{"pods"}, + Resources: []string{"serviceaccounts"}, Verbs: []string{"get", "get"}, }, }) @@ -153,7 +126,7 @@ func TestNormalizePolicyRules(t *testing.T) { []rbacv1.PolicyRule{ { APIGroups: []string{""}, - Resources: []string{"pods"}, + Resources: []string{"serviceaccounts"}, Verbs: []string{"get"}, }, }, @@ -165,7 +138,7 @@ func TestNormalizePolicyRules(t *testing.T) { rules, err := NormalizePolicyRules([]rbacv1.PolicyRule{ { APIGroups: []string{""}, - Resources: []string{"pods"}, + Resources: []string{"serviceaccounts"}, Verbs: []string{"*"}, }, }) @@ -175,7 +148,7 @@ func TestNormalizePolicyRules(t *testing.T) { []rbacv1.PolicyRule{ { APIGroups: []string{""}, - Resources: []string{"pods"}, + Resources: []string{"serviceaccounts"}, Verbs: allVerbs, }, }, @@ -183,21 +156,43 @@ func TestNormalizePolicyRules(t *testing.T) { ) }) + t.Run("correct groups are determined automatically", func(t *testing.T) { + rules, err := NormalizePolicyRules([]rbacv1.PolicyRule{ + { + APIGroups: []string{"", "foo", "bar"}, + Resources: []string{"stages"}, + Verbs: []string{"get"}, + }, + }) + require.NoError(t, err) + require.Equal( + t, + []rbacv1.PolicyRule{ + { + APIGroups: []string{kargoapi.GroupVersion.Group}, + Resources: []string{"stages"}, + Verbs: []string{"get"}, + }, + }, + rules, + ) + }) + t.Run("kitchen sink", func(t *testing.T) { rules, err := NormalizePolicyRules([]rbacv1.PolicyRule{ - { // Never mind that this doesn't make sense - APIGroups: []string{"", rbacv1.GroupName}, - Resources: []string{"pods", "services"}, + { // Never mind that this doesn't make sense. It should all get fixed + APIGroups: []string{""}, + Resources: []string{"serviceaccounts", "stages"}, Verbs: []string{"*"}, }, { // These should get de-duped - APIGroups: []string{""}, - Resources: []string{"pods"}, + APIGroups: []string{kargoapi.GroupVersion.Group}, + Resources: []string{"stages"}, Verbs: []string{"*"}, }, { APIGroups: []string{kargoapi.GroupVersion.Group}, - Resources: []string{"stages"}, + Resources: []string{"warehouses"}, ResourceNames: []string{"foo", "bar"}, Verbs: []string{"get", "list"}, }, @@ -208,36 +203,26 @@ func TestNormalizePolicyRules(t *testing.T) { []rbacv1.PolicyRule{ { APIGroups: []string{""}, - Resources: []string{"pods"}, + Resources: []string{"serviceaccounts"}, Verbs: allVerbs, }, { - APIGroups: []string{""}, - Resources: []string{"services"}, + APIGroups: []string{kargoapi.GroupVersion.Group}, + Resources: []string{"stages"}, Verbs: allVerbs, }, { APIGroups: []string{kargoapi.GroupVersion.Group}, - Resources: []string{"stages"}, + Resources: []string{"warehouses"}, ResourceNames: []string{"bar"}, Verbs: []string{"get", "list"}, }, { APIGroups: []string{kargoapi.GroupVersion.Group}, - Resources: []string{"stages"}, + Resources: []string{"warehouses"}, ResourceNames: []string{"foo"}, Verbs: []string{"get", "list"}, }, - { - APIGroups: []string{rbacv1.GroupName}, - Resources: []string{"pods"}, - Verbs: allVerbs, - }, - { - APIGroups: []string{rbacv1.GroupName}, - Resources: []string{"services"}, - Verbs: allVerbs, - }, }, rules, ) diff --git a/internal/api/rbac/roles.go b/internal/api/rbac/roles.go index 127d2a81f..83003cf7c 100644 --- a/internal/api/rbac/roles.go +++ b/internal/api/rbac/roles.go @@ -339,12 +339,18 @@ func (r *rolesDatabase) GrantPermissionsToRole( return nil, err } + if err = validateResourceTypeName(resourceDetails.ResourceType); err != nil { + return nil, err + } + + group := getGroupName(resourceDetails.ResourceType) + newRole := role if newRole == nil { newRole = buildNewRole(project, name) } newRule := rbacv1.PolicyRule{ - APIGroups: []string{resourceDetails.ResourceGroup}, + APIGroups: []string{group}, Resources: []string{resourceDetails.ResourceType}, Verbs: resourceDetails.Verbs, } @@ -496,10 +502,15 @@ func (r *rolesDatabase) RevokePermissionsFromRole( slices.Sort(resourceDetails.Verbs) resourceDetails.Verbs = slices.Compact(resourceDetails.Verbs) + if err = validateResourceTypeName(resourceDetails.ResourceType); err != nil { + return nil, err + } + + group := getGroupName(resourceDetails.ResourceType) + filteredRules := make([]rbacv1.PolicyRule, 0, len(role.Rules)) for _, rule := range role.Rules { - if rule.APIGroups[0] != resourceDetails.ResourceGroup || - rule.Resources[0] != resourceDetails.ResourceType || + if rule.APIGroups[0] != group || rule.Resources[0] != resourceDetails.ResourceType || (resourceDetails.ResourceName != "" && rule.ResourceNames[0] != resourceDetails.ResourceName) { filteredRules = append(filteredRules, rule) continue @@ -565,9 +576,9 @@ func (r *rolesDatabase) Update( return nil, err } - amendClaimAnnotation(sa, rbacapi.AnnotationKeyOIDCSubjects, kargoRole.Subs) - amendClaimAnnotation(sa, rbacapi.AnnotationKeyOIDCEmails, kargoRole.Emails) - amendClaimAnnotation(sa, rbacapi.AnnotationKeyOIDCGroups, kargoRole.Groups) + replaceClaimAnnotation(sa, rbacapi.AnnotationKeyOIDCSubjects, kargoRole.Subs) + replaceClaimAnnotation(sa, rbacapi.AnnotationKeyOIDCEmails, kargoRole.Emails) + replaceClaimAnnotation(sa, rbacapi.AnnotationKeyOIDCGroups, kargoRole.Groups) if err = r.client.Update(ctx, sa); err != nil { return nil, fmt.Errorf( "error updating ServiceAccount %q in namespace %q: %w", kargoRole.Name, kargoRole.Namespace, err, @@ -620,6 +631,13 @@ func ResourcesToRole( CreationTimestamp: sa.CreationTimestamp, }, } + + if isKargoManaged(sa) && + (len(roles) == 0 || (len(roles) == 1 && isKargoManaged(&roles[0]))) && + (len(rbs) == 0 || (len(rbs) == 1 && isKargoManaged(&rbs[0]))) { + kargoRole.KargoManaged = true + } + if sa.Annotations[rbacapi.AnnotationKeyOIDCSubjects] != "" { kargoRole.Subs = strings.Split(sa.Annotations[rbacapi.AnnotationKeyOIDCSubjects], ",") slices.Sort(kargoRole.Subs) @@ -633,20 +651,20 @@ func ResourcesToRole( slices.Sort(kargoRole.Groups) } - rules := []rbacv1.PolicyRule{} + kargoRole.Rules = []rbacv1.PolicyRule{} for _, role := range roles { - rules = append(rules, role.Rules...) + kargoRole.Rules = append(kargoRole.Rules, role.Rules...) } - var err error - if kargoRole.Rules, err = NormalizePolicyRules(rules); err != nil { - return nil, fmt.Errorf("error normalizing RBAC policy rules: %w", err) - } - - if isKargoManaged(sa) && - (len(roles) == 0 || (len(roles) == 1 && isKargoManaged(&roles[0]))) && - (len(rbs) == 0 || (len(rbs) == 1 && isKargoManaged(&rbs[0]))) { - kargoRole.KargoManaged = true + // Since we cannot make any assumptions that they only contain resource types + // we recognize, or that they don't do something really unusual like using a + // wildcard resource type, never attempt to normalize rules if any of the + // underlying resources are not Kargo-managed. + if kargoRole.KargoManaged { + var err error + if kargoRole.Rules, err = NormalizePolicyRules(kargoRole.Rules); err != nil { + return nil, fmt.Errorf("error normalizing RBAC policy rules: %w", err) + } } return kargoRole, nil @@ -673,6 +691,15 @@ func RoleToResources( return sa, role, rb, nil } +func replaceClaimAnnotation(sa *corev1.ServiceAccount, key string, values []string) { + slices.Sort(values) + values = slices.Compact(values) + if sa.Annotations == nil { + sa.Annotations = map[string]string{} + } + sa.Annotations[key] = strings.Join(values, ",") +} + func amendClaimAnnotation(sa *corev1.ServiceAccount, key string, values []string) { existing := sa.Annotations[key] if existing != "" { diff --git a/internal/api/rbac/roles_test.go b/internal/api/rbac/roles_test.go index f73d6f1b0..e38002664 100644 --- a/internal/api/rbac/roles_test.go +++ b/internal/api/rbac/roles_test.go @@ -219,11 +219,20 @@ func TestGet(t *testing.T) { rbacapi.AnnotationKeyOIDCEmails: "foo-email,bar-email", rbacapi.AnnotationKeyOIDCGroups: "foo-group,bar-group", }), - plainRole([]rbacv1.PolicyRule{{ - APIGroups: []string{kargoapi.GroupVersion.Group}, - Resources: []string{"stages", "promotions"}, - Verbs: []string{"list", "get"}, - }}), + plainRole([]rbacv1.PolicyRule{ + { // This rule has groups and types that we don't recognize. Let's + // make sure we don't choke on them. This could happen with roles + // that aren't Kargo-managed. + APIGroups: []string{"fake-group-1", "fake-group-2"}, + Resources: []string{"fake-type-1", "fake-type-2"}, + Verbs: []string{"get", "list"}, + }, + { + APIGroups: []string{kargoapi.GroupVersion.Group}, + Resources: []string{"stages", "promotions"}, + Verbs: []string{"list", "get"}, + }, + }), plainRoleBinding(), ).Build() db := NewKubernetesRolesDatabase(c) @@ -244,16 +253,17 @@ func TestGet(t *testing.T) { Subs: []string{"bar-sub", "foo-sub"}, Emails: []string{"bar-email", "foo-email"}, Groups: []string{"bar-group", "foo-group"}, + // There should have been no attempt to normalize these rules Rules: []rbacv1.PolicyRule{ { - APIGroups: []string{kargoapi.GroupVersion.Group}, - Resources: []string{"promotions"}, + APIGroups: []string{"fake-group-1", "fake-group-2"}, + Resources: []string{"fake-type-1", "fake-type-2"}, Verbs: []string{"get", "list"}, }, { APIGroups: []string{kargoapi.GroupVersion.Group}, - Resources: []string{"stages"}, - Verbs: []string{"get", "list"}, + Resources: []string{"stages", "promotions"}, + Verbs: []string{"list", "get"}, }, }, }, @@ -365,9 +375,8 @@ func TestGrantPermissionToRole(t *testing.T) { testProject, testKargoRoleName, &rbacapi.ResourceDetails{ - ResourceGroup: "fake-group", - ResourceType: "fake-resource-type", - Verbs: []string{"get", "list"}, + ResourceType: "fake-resource-type", + Verbs: []string{"get", "list"}, }, ) require.True(t, kubeerr.IsNotFound(err)) @@ -383,9 +392,8 @@ func TestGrantPermissionToRole(t *testing.T) { testProject, testKargoRoleName, &rbacapi.ResourceDetails{ - ResourceGroup: "fake-group", - ResourceType: "fake-resource-type", - Verbs: []string{"get", "list"}, + ResourceType: "fake-resource-type", + Verbs: []string{"get", "list"}, }, ) require.True(t, kubeerr.IsBadRequest(err)) @@ -401,9 +409,8 @@ func TestGrantPermissionToRole(t *testing.T) { testProject, testKargoRoleName, &rbacapi.ResourceDetails{ - ResourceGroup: kargoapi.GroupVersion.Group, - ResourceType: "stages", - Verbs: []string{"get", "list"}, + ResourceType: "stages", + Verbs: []string{"get", "list"}, }, ) require.NoError(t, err) @@ -461,9 +468,8 @@ func TestGrantPermissionToRole(t *testing.T) { testProject, testKargoRoleName, &rbacapi.ResourceDetails{ - ResourceGroup: kargoapi.GroupVersion.Group, - ResourceType: "stages", - Verbs: []string{"get", "list"}, + ResourceType: "stages", + Verbs: []string{"get", "list"}, }, ) require.NoError(t, err) @@ -563,56 +569,119 @@ func TestGrantRoleToUsers(t *testing.T) { } func TestList(t *testing.T) { - c := fake.NewClientBuilder().WithScheme(scheme).WithObjects( - managedServiceAccount(map[string]string{ - rbacapi.AnnotationKeyOIDCSubjects: "foo-sub,bar-sub", - rbacapi.AnnotationKeyOIDCEmails: "foo-email,bar-email", - rbacapi.AnnotationKeyOIDCGroups: "foo-group,bar-group", - }), - managedRole([]rbacv1.PolicyRule{ - { - APIGroups: []string{kargoapi.GroupVersion.Group}, - Resources: []string{"stages", "promotions"}, - Verbs: []string{"list", "get"}, - }, - }), - managedRoleBinding(), - ).Build() - db := NewKubernetesRolesDatabase(c) - kargoRoles, err := db.List(context.Background(), testProject) - require.NoError(t, err) - // Do not factor creation timestamp into the comparison - now := metav1.NewTime(time.Now()) - for _, kargoRole := range kargoRoles { - kargoRole.CreationTimestamp = now - } - require.Equal( - t, - []*rbacapi.Role{{ - ObjectMeta: metav1.ObjectMeta{ - Namespace: testProject, - Name: testKargoRoleName, - CreationTimestamp: now, - }, - KargoManaged: true, - Subs: []string{"bar-sub", "foo-sub"}, - Emails: []string{"bar-email", "foo-email"}, - Groups: []string{"bar-group", "foo-group"}, - Rules: []rbacv1.PolicyRule{ + t.Run("with only kargo-managed roles", func(t *testing.T) { + c := fake.NewClientBuilder().WithScheme(scheme).WithObjects( + managedServiceAccount(map[string]string{ + rbacapi.AnnotationKeyOIDCSubjects: "foo-sub,bar-sub", + rbacapi.AnnotationKeyOIDCEmails: "foo-email,bar-email", + rbacapi.AnnotationKeyOIDCGroups: "foo-group,bar-group", + }), + managedRole([]rbacv1.PolicyRule{ { APIGroups: []string{kargoapi.GroupVersion.Group}, - Resources: []string{"promotions"}, + Resources: []string{"stages", "promotions"}, + Verbs: []string{"list", "get"}, + }, + }), + managedRoleBinding(), + ).Build() + db := NewKubernetesRolesDatabase(c) + kargoRoles, err := db.List(context.Background(), testProject) + require.NoError(t, err) + // Do not factor creation timestamp into the comparison + now := metav1.NewTime(time.Now()) + for _, kargoRole := range kargoRoles { + kargoRole.CreationTimestamp = now + } + require.Equal( + t, + []*rbacapi.Role{{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: testProject, + Name: testKargoRoleName, + CreationTimestamp: now, + }, + KargoManaged: true, + Subs: []string{"bar-sub", "foo-sub"}, + Emails: []string{"bar-email", "foo-email"}, + Groups: []string{"bar-group", "foo-group"}, + Rules: []rbacv1.PolicyRule{ + { + APIGroups: []string{kargoapi.GroupVersion.Group}, + Resources: []string{"promotions"}, + Verbs: []string{"get", "list"}, + }, + { + APIGroups: []string{kargoapi.GroupVersion.Group}, + Resources: []string{"stages"}, + Verbs: []string{"get", "list"}, + }, + }, + }}, + kargoRoles, + ) + }) + + t.Run("with a non-kargo-managed role", func(t *testing.T) { + c := fake.NewClientBuilder().WithScheme(scheme).WithObjects( + plainServiceAccount(map[string]string{ + rbacapi.AnnotationKeyOIDCSubjects: "foo-sub,bar-sub", + rbacapi.AnnotationKeyOIDCEmails: "foo-email,bar-email", + rbacapi.AnnotationKeyOIDCGroups: "foo-group,bar-group", + }), + plainRole([]rbacv1.PolicyRule{ + { // This rule has groups and types that we don't recognize. Let's + // make sure we don't choke on them. This could happen with roles + // that aren't Kargo-managed. + APIGroups: []string{"fake-group-1", "fake-group-2"}, + Resources: []string{"fake-type-1", "fake-type-2"}, Verbs: []string{"get", "list"}, }, { APIGroups: []string{kargoapi.GroupVersion.Group}, - Resources: []string{"stages"}, - Verbs: []string{"get", "list"}, + Resources: []string{"stages", "promotions"}, + Verbs: []string{"list", "get"}, }, - }, - }}, - kargoRoles, - ) + }), + plainRoleBinding(), + ).Build() + db := NewKubernetesRolesDatabase(c) + kargoRoles, err := db.List(context.Background(), testProject) + require.NoError(t, err) + // Do not factor creation timestamp into the comparison + now := metav1.NewTime(time.Now()) + for _, kargoRole := range kargoRoles { + kargoRole.CreationTimestamp = now + } + require.Equal( + t, + []*rbacapi.Role{{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: testProject, + Name: testKargoRoleName, + CreationTimestamp: now, + }, + KargoManaged: false, + Subs: []string{"bar-sub", "foo-sub"}, + Emails: []string{"bar-email", "foo-email"}, + Groups: []string{"bar-group", "foo-group"}, + // There should have been no attempt to normalize these rules + Rules: []rbacv1.PolicyRule{ + { + APIGroups: []string{"fake-group-1", "fake-group-2"}, + Resources: []string{"fake-type-1", "fake-type-2"}, + Verbs: []string{"get", "list"}, + }, + { + APIGroups: []string{kargoapi.GroupVersion.Group}, + Resources: []string{"stages", "promotions"}, + Verbs: []string{"list", "get"}, + }, + }, + }}, + kargoRoles, + ) + }) } func TestRevokePermissionsFromRole(t *testing.T) { @@ -624,9 +693,8 @@ func TestRevokePermissionsFromRole(t *testing.T) { testProject, testKargoRoleName, &rbacapi.ResourceDetails{ - ResourceGroup: "fake-group", - ResourceType: "fake-resource-type", - Verbs: []string{"get", "list"}, + ResourceType: "fake-resource-type", + Verbs: []string{"get", "list"}, }, ) require.True(t, kubeerr.IsNotFound(err)) @@ -642,9 +710,8 @@ func TestRevokePermissionsFromRole(t *testing.T) { testProject, testKargoRoleName, &rbacapi.ResourceDetails{ - ResourceGroup: "fake-group", - ResourceType: "fake-resource-type", - Verbs: []string{"get", "list"}, + ResourceType: "fake-resource-type", + Verbs: []string{"get", "list"}, }, ) require.True(t, kubeerr.IsBadRequest(err)) @@ -660,9 +727,8 @@ func TestRevokePermissionsFromRole(t *testing.T) { testProject, testKargoRoleName, &rbacapi.ResourceDetails{ - ResourceGroup: "fake-group", - ResourceType: "fake-resource-type", - Verbs: []string{"get", "list"}, + ResourceType: "fake-resource-type", + Verbs: []string{"get", "list"}, }, ) require.NoError(t, err) @@ -685,9 +751,8 @@ func TestRevokePermissionsFromRole(t *testing.T) { testProject, testKargoRoleName, &rbacapi.ResourceDetails{ - ResourceGroup: kargoapi.GroupVersion.Group, - ResourceType: "stages", - Verbs: []string{"get", "list"}, + ResourceType: "stages", + Verbs: []string{"get", "list"}, }, ) require.NoError(t, err) @@ -893,7 +958,11 @@ func TestUpdate(t *testing.T) { t.Run("success with updated ServiceAccount and Role", func(t *testing.T) { c := fake.NewClientBuilder().WithScheme(scheme).WithObjects( - managedServiceAccount(nil), + managedServiceAccount(map[string]string{ + rbacapi.AnnotationKeyOIDCSubjects: "foo-sub,bar-sub", + rbacapi.AnnotationKeyOIDCEmails: "foo-email,bar-email", + rbacapi.AnnotationKeyOIDCGroups: "foo-group,bar-group", + }), managedRole([]rbacv1.PolicyRule{{ APIGroups: []string{kargoapi.GroupVersion.Group}, Resources: []string{"promotions"}, @@ -909,9 +978,9 @@ func TestUpdate(t *testing.T) { Namespace: testProject, Name: testKargoRoleName, }, - Subs: []string{"foo-sub", "bar-sub"}, - Emails: []string{"foo-email", "bar-email"}, - Groups: []string{"foo-group", "bar-group"}, + Subs: []string{"foo-sub"}, + Emails: []string{"foo-email"}, + Groups: []string{"foo-group"}, Rules: []rbacv1.PolicyRule{{ APIGroups: []string{kargoapi.GroupVersion.Group}, Resources: []string{"stages", "promotions"}, @@ -928,9 +997,9 @@ func TestUpdate(t *testing.T) { t, map[string]string{ rbacapi.AnnotationKeyManaged: rbacapi.AnnotationValueTrue, - rbacapi.AnnotationKeyOIDCSubjects: "bar-sub,foo-sub", - rbacapi.AnnotationKeyOIDCEmails: "bar-email,foo-email", - rbacapi.AnnotationKeyOIDCGroups: "bar-group,foo-group", + rbacapi.AnnotationKeyOIDCSubjects: "foo-sub", + rbacapi.AnnotationKeyOIDCEmails: "foo-email", + rbacapi.AnnotationKeyOIDCGroups: "foo-group", }, sa.Annotations, ) diff --git a/internal/cli/cmd/grant/grant.go b/internal/cli/cmd/grant/grant.go index 162431a85..6e799801c 100644 --- a/internal/cli/cmd/grant/grant.go +++ b/internal/cli/cmd/grant/grant.go @@ -27,15 +27,14 @@ type grantOptions struct { Config config.CLIConfig ClientOptions client.Options - Project string - Role string - Subs []string - Emails []string - Groups []string - ResourceGroup string - ResourceType string - ResourceName string - Verbs []string + Project string + Role string + Subs []string + Emails []string + Groups []string + ResourceType string + ResourceName string + Verbs []string } func NewCommand(cfg config.CLIConfig, streams genericiooptions.IOStreams) *cobra.Command { @@ -100,7 +99,6 @@ func (o *grantOptions) addFlags(cmd *cobra.Command) { option.Emails(cmd.Flags(), &o.Emails, "The email address of a user to be granted the role.") option.Groups(cmd.Flags(), &o.Groups, "A group to be granted the role.") - option.ResourceGroup(cmd.Flags(), &o.ResourceGroup, "The group of resources to grant permissions to.") option.ResourceType(cmd.Flags(), &o.ResourceType, "A type of resource to grant permissions to.") option.ResourceName(cmd.Flags(), &o.ResourceName, "The name of a resource to grant permissions to.") option.Verbs(cmd.Flags(), &o.Verbs, "A verb to grant on the resource.") @@ -114,20 +112,16 @@ func (o *grantOptions) addFlags(cmd *cobra.Command) { option.SubFlag, option.EmailFlag, option.GroupFlag, - option.ResourceGroupFlag, + option.ResourceTypeFlag, ) // You can't grant a role to users and grant permissions to a role at the same // time. - cmd.MarkFlagsMutuallyExclusive(option.SubFlag, option.ResourceGroupFlag) - cmd.MarkFlagsMutuallyExclusive(option.EmailFlag, option.ResourceGroupFlag) - cmd.MarkFlagsMutuallyExclusive(option.GroupFlag, option.ResourceGroupFlag) + cmd.MarkFlagsMutuallyExclusive(option.SubFlag, option.ResourceTypeFlag) + cmd.MarkFlagsMutuallyExclusive(option.EmailFlag, option.ResourceTypeFlag) + cmd.MarkFlagsMutuallyExclusive(option.GroupFlag, option.ResourceTypeFlag) - cmd.MarkFlagsRequiredTogether( - option.ResourceGroupFlag, - option.ResourceTypeFlag, - option.VerbFlag, - ) + cmd.MarkFlagsRequiredTogether(option.ResourceTypeFlag, option.VerbFlag) } // validate performs validation of the options. If the options are invalid, an @@ -156,15 +150,12 @@ func (o *grantOptions) run(ctx context.Context) error { Project: o.Project, Role: o.Role, } - // Note: Don't test if ResourceGroup is empty, because "" is a legitimate - // value. if o.ResourceType != "" { req.Request = &svcv1alpha1.GrantRequest_ResourceDetails{ ResourceDetails: &rbacapi.ResourceDetails{ - ResourceGroup: o.ResourceGroup, - ResourceType: o.ResourceType, - ResourceName: o.ResourceName, - Verbs: o.Verbs, + ResourceType: o.ResourceType, + ResourceName: o.ResourceName, + Verbs: o.Verbs, }, } } else { diff --git a/internal/cli/cmd/revoke/revoke.go b/internal/cli/cmd/revoke/revoke.go index 3ca4bd59f..b7b0dfd0c 100644 --- a/internal/cli/cmd/revoke/revoke.go +++ b/internal/cli/cmd/revoke/revoke.go @@ -27,15 +27,14 @@ type revokeOptions struct { Config config.CLIConfig ClientOptions client.Options - Project string - Role string - Subs []string - Emails []string - Groups []string - ResourceGroup string - ResourceType string - ResourceName string - Verbs []string + Project string + Role string + Subs []string + Emails []string + Groups []string + ResourceType string + ResourceName string + Verbs []string } func NewCommand(cfg config.CLIConfig, streams genericiooptions.IOStreams) *cobra.Command { @@ -99,7 +98,6 @@ func (o *revokeOptions) addFlags(cmd *cobra.Command) { option.Subs(cmd.Flags(), &o.Subs, "The sub claim of a user to have the role revoked.") option.Emails(cmd.Flags(), &o.Emails, "The email address of a user to have the role revoked.") option.Groups(cmd.Flags(), &o.Groups, "A group to have the role revoked.") - option.ResourceGroup(cmd.Flags(), &o.ResourceGroup, "The group of resources to revoke permissions for.") option.ResourceType(cmd.Flags(), &o.ResourceType, "A type of resource to revoke permissions for.") option.ResourceName(cmd.Flags(), &o.ResourceName, "The name of a resource to revoke permissions for.") option.Verbs(cmd.Flags(), &o.Verbs, "A verb to revoke on the resource.") @@ -113,20 +111,16 @@ func (o *revokeOptions) addFlags(cmd *cobra.Command) { option.SubFlag, option.EmailFlag, option.GroupFlag, - option.ResourceGroupFlag, + option.ResourceTypeFlag, ) // You can't revoke a role from users and revoke permissions from a role at // the same time. - cmd.MarkFlagsMutuallyExclusive(option.SubFlag, option.ResourceGroupFlag) - cmd.MarkFlagsMutuallyExclusive(option.EmailFlag, option.ResourceGroupFlag) - cmd.MarkFlagsMutuallyExclusive(option.GroupFlag, option.ResourceGroupFlag) + cmd.MarkFlagsMutuallyExclusive(option.SubFlag, option.ResourceTypeFlag) + cmd.MarkFlagsMutuallyExclusive(option.EmailFlag, option.ResourceTypeFlag) + cmd.MarkFlagsMutuallyExclusive(option.GroupFlag, option.ResourceTypeFlag) - cmd.MarkFlagsRequiredTogether( - option.ResourceGroupFlag, - option.ResourceTypeFlag, - option.VerbFlag, - ) + cmd.MarkFlagsRequiredTogether(option.ResourceTypeFlag, option.VerbFlag) } // validate performs validation of the options. If the options are invalid, an @@ -155,15 +149,12 @@ func (o *revokeOptions) run(ctx context.Context) error { Project: o.Project, Role: o.Role, } - // Note: Don't test if ResourceGroup is empty, because "" is a legitimate - // value. if o.ResourceType != "" { req.Request = &svcv1alpha1.RevokeRequest_ResourceDetails{ ResourceDetails: &rbacapi.ResourceDetails{ - ResourceGroup: o.ResourceGroup, - ResourceType: o.ResourceType, - ResourceName: o.ResourceName, - Verbs: o.Verbs, + ResourceType: o.ResourceType, + ResourceName: o.ResourceName, + Verbs: o.Verbs, }, } } else { diff --git a/internal/cli/option/flag.go b/internal/cli/option/flag.go index 47ad13e1d..3b2786902 100644 --- a/internal/cli/option/flag.go +++ b/internal/cli/option/flag.go @@ -85,9 +85,6 @@ const ( // RepoURLFlag is the flag name for the repo-url flag. RepoURLFlag = "repo-url" - // ResourceGroupFlag is the flag name for the resource-group flag. - ResourceGroupFlag = "resource-group" - // ResourceNameFlag is the flag name for the resource-name flag. ResourceNameFlag = "resource-name" @@ -255,11 +252,6 @@ func Regex(fs *pflag.FlagSet, regex *bool, usage string) { fs.BoolVar(regex, RegexFlag, false, usage) } -// ResourceGroup adds the ResourceGroupFlag to the provided flag set. -func ResourceGroup(fs *pflag.FlagSet, resourceGroup *string, usage string) { - fs.StringVar(resourceGroup, ResourceGroupFlag, "", usage) -} - // ResourceName adds the ResourceNameFlag to the provided flag set. func ResourceName(fs *pflag.FlagSet, resourceName *string, usage string) { fs.StringVar(resourceName, ResourceNameFlag, "", usage) diff --git a/internal/controller/management/projects/projects.go b/internal/controller/management/projects/projects.go index 2985b7b3c..a426698bb 100644 --- a/internal/controller/management/projects/projects.go +++ b/internal/controller/management/projects/projects.go @@ -8,7 +8,7 @@ import ( log "github.com/sirupsen/logrus" corev1 "k8s.io/api/core/v1" rbacv1 "k8s.io/api/rbac/v1" - apierrors "k8s.io/apimachinery/pkg/api/errors" + kubeerr "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/utils/ptr" @@ -19,8 +19,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/predicate" + rbacapi "github.com/akuity/kargo/api/rbac/v1alpha1" kargoapi "github.com/akuity/kargo/api/v1alpha1" "github.com/akuity/kargo/internal/controller" + rolloutsapi "github.com/akuity/kargo/internal/controller/rollouts/api/v1alpha1" "github.com/akuity/kargo/internal/kubeclient" "github.com/akuity/kargo/internal/logging" ) @@ -83,7 +85,21 @@ type reconciler struct { ...client.UpdateOption, ) error - ensureProjectAdminPermissionsFn func(context.Context, *kargoapi.Project) error + ensureAPIAdminPermissionsFn func(context.Context, *kargoapi.Project) error + + ensureDefaultProjectRolesFn func(context.Context, *kargoapi.Project) error + + createServiceAccountFn func( + context.Context, + client.Object, + ...client.CreateOption, + ) error + + createRoleFn func( + context.Context, + client.Object, + ...client.CreateOption, + ) error createRoleBindingFn func( context.Context, @@ -136,7 +152,10 @@ func newReconciler(kubeClient client.Client, cfg ReconcilerConfig) *reconciler { r.getNamespaceFn = r.client.Get r.createNamespaceFn = r.client.Create r.updateNamespaceFn = r.client.Update - r.ensureProjectAdminPermissionsFn = r.ensureProjectAdminPermissions + r.ensureAPIAdminPermissionsFn = r.ensureAPIAdminPermissions + r.ensureDefaultProjectRolesFn = r.ensureDefaultProjectRoles + r.createServiceAccountFn = r.client.Create + r.createRoleFn = r.client.Create r.createRoleBindingFn = r.client.Create r.deleteRoleBindingFn = r.client.Delete r.ensureV06CompatibilityLabelFn = kargoapi.EnsureV06CompatibilityLabel @@ -213,10 +232,14 @@ func (r *reconciler) syncProject( return status, fmt.Errorf("error ensuring namespace: %w", err) } - if err = r.ensureProjectAdminPermissionsFn(ctx, project); err != nil { + if err = r.ensureAPIAdminPermissionsFn(ctx, project); err != nil { return status, fmt.Errorf("error ensuring project admin permissions: %w", err) } + if err = r.ensureDefaultProjectRolesFn(ctx, project); err != nil { + return status, fmt.Errorf("error ensuring default project roles: %w", err) + } + status.Phase = kargoapi.ProjectPhaseReady return status, nil } @@ -273,7 +296,7 @@ func (r *reconciler) ensureNamespace( project.Name, ) } - if !apierrors.IsNotFound(err) { + if !kubeerr.IsNotFound(err) { return status, fmt.Errorf("error getting namespace %q: %w", project.Name, err) } @@ -302,7 +325,7 @@ func (r *reconciler) ensureNamespace( return status, nil } -func (r *reconciler) ensureProjectAdminPermissions( +func (r *reconciler) ensureAPIAdminPermissions( ctx context.Context, project *kargoapi.Project, ) error { @@ -338,18 +361,19 @@ func (r *reconciler) ensureProjectAdminPermissions( }, }, } - if err := r.createRoleBindingFn(ctx, roleBinding); apierrors.IsAlreadyExists(err) { - logger.Debug("role binding already exists in project namespace") - } else if err != nil { + if err := r.createRoleBindingFn(ctx, roleBinding); err != nil { + if kubeerr.IsAlreadyExists(err) { + logger.Debug("RoleBinding already exists in project namespace") + return nil + } return fmt.Errorf( - "error creating role binding %q in project namespace %q: %w", + "error creating RoleBinding %q in project namespace %q: %w", roleBinding.Name, project.Name, err, ) - } else { - logger.Debug("granted API server and kargo-admin project admin permissions") } + logger.Debug("granted API server and kargo-admin project admin permissions") // Delete legacy role binding if it exists const legacyRoleBindingName = "kargo-api-server-manage-project-secrets" @@ -361,7 +385,7 @@ func (r *reconciler) ensureProjectAdminPermissions( Name: legacyRoleBindingName, }, }, - ); apierrors.IsNotFound(err) { + ); kubeerr.IsNotFound(err) { logger.Debug("legacy project admin role binding does not exist") } else if err != nil { return fmt.Errorf( @@ -383,6 +407,197 @@ func (r *reconciler) ensureProjectAdminPermissions( return nil } +func (r *reconciler) ensureDefaultProjectRoles( + ctx context.Context, + project *kargoapi.Project, +) error { + logger := logging.LoggerFromContext(ctx).WithFields(log.Fields{ + "project": project.Name, + "name": project.Name, + "namespace": project.Name, + }) + + const adminRoleName = "kargo-admin" + const viewerRoleName = "kargo-viewer" + allRoles := []string{adminRoleName, viewerRoleName} + + for _, saName := range allRoles { + saLogger := logger.WithField("serviceAccount", saName) + if err := r.createServiceAccountFn( + ctx, + &corev1.ServiceAccount{ + ObjectMeta: metav1.ObjectMeta{ + Name: saName, + Namespace: project.Name, + Annotations: map[string]string{ + rbacapi.AnnotationKeyManaged: rbacapi.AnnotationValueTrue, + }, + }, + }, + ); err != nil { + if kubeerr.IsAlreadyExists(err) { + saLogger.Debug("ServiceAccount already exists in project namespace") + continue + } + return fmt.Errorf( + "error creating ServiceAccount %q in project namespace %q: %w", + saName, + project.Name, + err, + ) + } + } + + roles := []*rbacv1.Role{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: adminRoleName, + Namespace: project.Name, + Annotations: map[string]string{ + rbacapi.AnnotationKeyManaged: rbacapi.AnnotationValueTrue, + }, + }, + Rules: []rbacv1.PolicyRule{ + { // For viewing events; no need to create, edit, or delete them + APIGroups: []string{""}, + Resources: []string{"events"}, + Verbs: []string{"get", "list", "watch"}, + }, + { // For managing project-level access and credentials + APIGroups: []string{""}, + Resources: []string{"secrets", "serviceaccounts"}, + Verbs: []string{"*"}, + }, + { // For managing project-level access + APIGroups: []string{rbacv1.SchemeGroupVersion.Group}, + Resources: []string{"rolebindings", "roles"}, + Verbs: []string{"*"}, + }, + { // Full access to all mutable Kargo resource types + APIGroups: []string{kargoapi.GroupVersion.Group}, + Resources: []string{"freights", "stages", "warehouses"}, + Verbs: []string{"*"}, + }, + { // Promote permission on all stages + APIGroups: []string{kargoapi.GroupVersion.Group}, + Resources: []string{"stages"}, + Verbs: []string{"promote"}, + }, + { // Nearly full access to all Promotions, but they are immutable + APIGroups: []string{kargoapi.GroupVersion.Group}, + Resources: []string{"promotions"}, + Verbs: []string{"create", "delete", "get", "list", "watch"}, + }, + { // Manual approvals involve patching Freight status + APIGroups: []string{kargoapi.GroupVersion.Group}, + Resources: []string{"freights/status"}, + Verbs: []string{"patch"}, + }, + { + // View and delete AnalysisRuns + APIGroups: []string{rolloutsapi.GroupVersion.Group}, + Resources: []string{"analysisruns"}, + Verbs: []string{"delete", "get", "list", "watch"}, + }, + { // Full access to AnalysisTemplates + APIGroups: []string{rolloutsapi.GroupVersion.Group}, + Resources: []string{"analysistemplates"}, + Verbs: []string{"*"}, + }, + }, + }, + { + ObjectMeta: metav1.ObjectMeta{ + Name: viewerRoleName, + Namespace: project.Name, + Annotations: map[string]string{ + rbacapi.AnnotationKeyManaged: rbacapi.AnnotationValueTrue, + }, + }, + Rules: []rbacv1.PolicyRule{ + { + APIGroups: []string{""}, + Resources: []string{"events", "serviceaccounts"}, + Verbs: []string{"get", "list", "watch"}, + }, + { + APIGroups: []string{rbacv1.SchemeGroupVersion.Group}, + Resources: []string{"rolebindings", "roles"}, + Verbs: []string{"get", "list", "watch"}, + }, + { + APIGroups: []string{kargoapi.GroupVersion.Group}, + Resources: []string{"freights", "promotions", "stages", "warehouses"}, + Verbs: []string{"get", "list", "watch"}, + }, + { + APIGroups: []string{rolloutsapi.GroupVersion.Group}, + Resources: []string{"analysisruns", "analysistemplates"}, + Verbs: []string{"get", "list", "watch"}, + }, + }, + }, + } + for _, role := range roles { + roleLogger := logger.WithField("role", role.Name) + if err := r.createRoleFn(ctx, role); err != nil { + if kubeerr.IsAlreadyExists(err) { + roleLogger.Debug("Role already exists in project namespace") + continue + } + return fmt.Errorf( + "error creating Role %q in project namespace %q: %w", + role.Name, project.Name, err, + ) + } + roleLogger.Debugf( + "created Role %q in project namespace %q", role.Name, project.Name, + ) + } + + for _, rbName := range allRoles { + rbLogger := logger.WithField("roleBinding", rbName) + if err := r.createRoleBindingFn( + ctx, + &rbacv1.RoleBinding{ + ObjectMeta: metav1.ObjectMeta{ + Name: rbName, + Namespace: project.Name, + Annotations: map[string]string{ + rbacapi.AnnotationKeyManaged: rbacapi.AnnotationValueTrue, + }, + }, + RoleRef: rbacv1.RoleRef{ + APIGroup: rbacv1.GroupName, + Kind: "Role", + Name: rbName, + }, + Subjects: []rbacv1.Subject{ + { + Kind: "ServiceAccount", + Name: rbName, + Namespace: project.Name, + }, + }, + }, + ); err != nil { + if kubeerr.IsAlreadyExists(err) { + rbLogger.Debug("RoleBinding already exists in project namespace") + continue + } + return fmt.Errorf( + "error creating RoleBinding %q in project namespace %q: %w", + rbName, project.Name, err, + ) + } + rbLogger.Debugf( + "created RoleBinding %q in project namespace %q", rbName, project.Name, + ) + } + + return nil +} + func (r *reconciler) patchProjectStatus( ctx context.Context, project *kargoapi.Project, diff --git a/internal/controller/management/projects/projects_test.go b/internal/controller/management/projects/projects_test.go index f781e0360..f00d50763 100644 --- a/internal/controller/management/projects/projects_test.go +++ b/internal/controller/management/projects/projects_test.go @@ -30,7 +30,10 @@ func TestNewReconciler(t *testing.T) { require.NotNil(t, r.getNamespaceFn) require.NotNil(t, r.createNamespaceFn) require.NotNil(t, r.updateNamespaceFn) - require.NotNil(t, r.ensureProjectAdminPermissionsFn) + require.NotNil(t, r.ensureAPIAdminPermissionsFn) + require.NotNil(t, r.ensureDefaultProjectRolesFn) + require.NotNil(t, r.createServiceAccountFn) + require.NotNil(t, r.createRoleFn) require.NotNil(t, r.createRoleBindingFn) require.NotNil(t, r.deleteRoleBindingFn) require.NotNil(t, r.ensureV06CompatibilityLabelFn) @@ -225,7 +228,35 @@ func TestSyncProject(t *testing.T) { ) (kargoapi.ProjectStatus, error) { return *project.Status.DeepCopy(), nil }, - ensureProjectAdminPermissionsFn: func( + ensureAPIAdminPermissionsFn: func( + context.Context, + *kargoapi.Project, + ) error { + return errors.New("something went wrong") + }, + }, + assertions: func(t *testing.T, status kargoapi.ProjectStatus, err error) { + require.ErrorContains(t, err, "something went wrong") + // Still initializing because retry could succeed + require.Equal(t, kargoapi.ProjectPhaseInitializing, status.Phase) + }, + }, + { + name: "error ensuring default project roles", + reconciler: &reconciler{ + ensureNamespaceFn: func( + _ context.Context, + project *kargoapi.Project, + ) (kargoapi.ProjectStatus, error) { + return *project.Status.DeepCopy(), nil + }, + ensureAPIAdminPermissionsFn: func( + context.Context, + *kargoapi.Project, + ) error { + return nil + }, + ensureDefaultProjectRolesFn: func( context.Context, *kargoapi.Project, ) error { @@ -247,7 +278,13 @@ func TestSyncProject(t *testing.T) { ) (kargoapi.ProjectStatus, error) { return *project.Status.DeepCopy(), nil }, - ensureProjectAdminPermissionsFn: func( + ensureAPIAdminPermissionsFn: func( + context.Context, + *kargoapi.Project, + ) error { + return nil + }, + ensureDefaultProjectRolesFn: func( context.Context, *kargoapi.Project, ) error { @@ -508,7 +545,7 @@ func TestEnsureNamespace(t *testing.T) { } } -func TestEnsureProjectAdminPermissions(t *testing.T) { +func TestEnsureAPIAdminPermissions(t *testing.T) { testCases := []struct { name string reconciler *reconciler @@ -526,7 +563,7 @@ func TestEnsureProjectAdminPermissions(t *testing.T) { }, }, assertions: func(t *testing.T, err error) { - require.ErrorContains(t, err, "error creating role binding") + require.ErrorContains(t, err, "error creating RoleBinding") require.ErrorContains(t, err, "something went wrong") }, }, @@ -593,7 +630,125 @@ func TestEnsureProjectAdminPermissions(t *testing.T) { t.Run(testCase.name, func(t *testing.T) { testCase.assertions( t, - testCase.reconciler.ensureProjectAdminPermissions( + testCase.reconciler.ensureAPIAdminPermissions( + context.Background(), + &kargoapi.Project{}, + ), + ) + }) + } +} + +func TestEnsureDefaultProjectRoles(t *testing.T) { + testCases := []struct { + name string + reconciler *reconciler + assertions func(*testing.T, error) + }{ + { + name: "error creating ServiceAccount", + reconciler: &reconciler{ + createServiceAccountFn: func( + context.Context, + client.Object, + ...client.CreateOption, + ) error { + return errors.New("something went wrong") + }, + }, + assertions: func(t *testing.T, err error) { + require.ErrorContains(t, err, "error creating ServiceAccount") + require.ErrorContains(t, err, "something went wrong") + }, + }, + { + name: "error creating Role", + reconciler: &reconciler{ + createServiceAccountFn: func( + context.Context, + client.Object, + ...client.CreateOption, + ) error { + return apierrors.NewAlreadyExists(schema.GroupResource{}, "") + }, + createRoleFn: func( + context.Context, + client.Object, + ...client.CreateOption, + ) error { + return errors.New("something went wrong") + }, + }, + assertions: func(t *testing.T, err error) { + require.ErrorContains(t, err, "error creating Role") + require.ErrorContains(t, err, "something went wrong") + }, + }, + { + name: "error creating RoleBinding", + reconciler: &reconciler{ + createServiceAccountFn: func( + context.Context, + client.Object, + ...client.CreateOption, + ) error { + return apierrors.NewAlreadyExists(schema.GroupResource{}, "") + }, + createRoleFn: func( + context.Context, + client.Object, + ...client.CreateOption, + ) error { + return apierrors.NewAlreadyExists(schema.GroupResource{}, "") + }, + createRoleBindingFn: func( + context.Context, + client.Object, + ...client.CreateOption, + ) error { + return errors.New("something went wrong") + }, + }, + assertions: func(t *testing.T, err error) { + require.ErrorContains(t, err, "error creating RoleBinding") + require.ErrorContains(t, err, "something went wrong") + }, + }, + { + name: "success", + reconciler: &reconciler{ + createServiceAccountFn: func( + context.Context, + client.Object, + ...client.CreateOption, + ) error { + return nil + }, + createRoleFn: func( + context.Context, + client.Object, + ...client.CreateOption, + ) error { + return nil + }, + createRoleBindingFn: func( + context.Context, + client.Object, + ...client.CreateOption, + ) error { + return nil + }, + }, + assertions: func(t *testing.T, err error) { + require.NoError(t, err) + }, + }, + } + for _, testCase := range testCases { + t.Run(testCase.name, func(t *testing.T) { + testCase.assertions( + t, + testCase.reconciler.ensureDefaultProjectRoles( context.Background(), &kargoapi.Project{}, ), diff --git a/internal/controller/warehouses/git.go b/internal/controller/warehouses/git.go index f82531139..b73019879 100644 --- a/internal/controller/warehouses/git.go +++ b/internal/controller/warehouses/git.go @@ -169,11 +169,10 @@ func (r *reconciler) selectTagAndCommitID( baseCommit string, ) (string, string, error) { + var selectedTag, selectedCommit string + var err error if sub.CommitSelectionStrategy == kargoapi.CommitSelectionStrategyNewestFromBranch { - // In this case, there is nothing to do except return the commit ID at the - // head of the branch unless there are includePaths/excludePaths configured to - // handle. - commit, err := r.getLastCommitIDFn(repo) + selectedCommit, err = r.getLastCommitIDFn(repo) if err != nil { return "", "", fmt.Errorf("error determining commit ID at head of branch %q in git repo %q: %w", @@ -182,111 +181,110 @@ func (r *reconciler) selectTagAndCommitID( err, ) } - // In case includePaths/excludePaths filters are configured in a git subscription - // below if clause deals with it. There is a special case - Warehouse has not - // produced any Freight yet, this is sorted by creating Freight based on last - // commit without applying filters. - if (sub.IncludePaths != nil || sub.ExcludePaths != nil) && baseCommit != "" { - - // this shortcircuits to just return the last commit in case it is same as - // baseCommit so we do not spam logs with errors of a valid not getting diffs - // between baseCommit and HEAD (pointing to baseCommit in this case) - if baseCommit == commit { - return "", commit, nil - } - // getting actual diffPaths since baseCommit - diffs, err := r.getDiffPathsSinceCommitIDFn(repo, baseCommit) - if err != nil { - return "", "", - fmt.Errorf("error getting diffs since commit %q in git repo %q: %w", - baseCommit, - sub.RepoURL, - err, - ) - } + } else { + tags, err := r.listTagsFn(repo) // These are ordered newest to oldest + if err != nil { + return "", "", fmt.Errorf("error listing tags from git repo %q: %w", sub.RepoURL, err) + } - matchesPathsFilters, err := matchesPathsFilters(sub.IncludePaths, sub.ExcludePaths, diffs) - if err != nil { - return "", "", - fmt.Errorf("error checking includePaths/excludePaths match for commit %q for git repo %q: %w", - commit, - sub.RepoURL, - err, - ) + // Narrow down the list of tags to those that are allowed and not ignored + allowRegex, err := regexp.Compile(sub.AllowTags) + if err != nil { + return "", "", fmt.Errorf("error compiling regular expression %q: %w", sub.AllowTags, err) + } + filteredTags := make([]string, 0, len(tags)) + for _, tagName := range tags { + if allows(tagName, allowRegex) && !ignores(tagName, sub.IgnoreTags) { + filteredTags = append(filteredTags, tagName) } + } + if len(filteredTags) == 0 { + return "", "", fmt.Errorf("found no applicable tags in repo %q", sub.RepoURL) + } - if !matchesPathsFilters { - return "", "", - fmt.Errorf("commit %q not applicable due to includePaths/excludePaths configuration for repo %q", - commit, - sub.RepoURL, - ) + switch sub.CommitSelectionStrategy { + case kargoapi.CommitSelectionStrategyLexical: + selectedTag = selectLexicallyLastTag(filteredTags) + case kargoapi.CommitSelectionStrategyNewestTag: + selectedTag = filteredTags[0] // These are already ordered newest to oldest + case kargoapi.CommitSelectionStrategySemVer: + if selectedTag, err = + selectSemverTag(filteredTags, sub.SemverConstraint); err != nil { + return "", "", err } + default: + return "", "", fmt.Errorf("unknown commit selection strategy %q", sub.CommitSelectionStrategy) + } + if selectedTag == "" { + return "", "", fmt.Errorf("found no applicable tags in repo %q", sub.RepoURL) } - return "", commit, nil + // Checkout the selected tag and return the commit ID + if err = r.checkoutTagFn(repo, selectedTag); err != nil { + return "", "", fmt.Errorf( + "error checking out tag %q from git repo %q: %w", + selectedTag, + sub.RepoURL, + err, + ) + } + selectedCommit, err = r.getLastCommitIDFn(repo) + if err != nil { + return selectedTag, "", fmt.Errorf( + "error determining commit ID of tag %q in git repo %q: %w", + selectedTag, + sub.RepoURL, + err, + ) + } } - tags, err := r.listTagsFn(repo) // These are ordered newest to oldest - if err != nil { - return "", "", fmt.Errorf("error listing tags from git repo %q: %w", sub.RepoURL, err) + // this shortcircuits to just return the last commit in case it is same as + // baseCommit so we do not spam logs with errors of a valid not getting diffs + // between baseCommit and HEAD (pointing to baseCommit in this case) + if baseCommit == selectedCommit { + return selectedTag, selectedCommit, nil } - // Narrow down the list of tags to those that are allowed and not ignored - allowRegex, err := regexp.Compile(sub.AllowTags) - if err != nil { - return "", "", fmt.Errorf("error compiling regular expression %q: %w", sub.AllowTags, err) - } - filteredTags := make([]string, 0, len(tags)) - for _, tagName := range tags { - if allows(tagName, allowRegex) && !ignores(tagName, sub.IgnoreTags) { - filteredTags = append(filteredTags, tagName) + // In case includePaths/excludePaths filters are configured in a git subscription + // below if clause deals with it. There is a special case - Warehouse has not + // produced any Freight yet, this is sorted by creating Freight based on last + // commit without applying filters. + if (sub.IncludePaths != nil || sub.ExcludePaths != nil) && baseCommit != "" { + + // getting actual diffPaths since baseCommit + diffs, err := r.getDiffPathsSinceCommitIDFn(repo, baseCommit) + if err != nil { + return selectedTag, "", + fmt.Errorf("error getting diffs since commit %q in git repo %q: %w", + baseCommit, + sub.RepoURL, + err, + ) } - } - if len(filteredTags) == 0 { - return "", "", fmt.Errorf("found no applicable tags in repo %q", sub.RepoURL) - } - var selectedTag string - switch sub.CommitSelectionStrategy { - case kargoapi.CommitSelectionStrategyLexical: - selectedTag = selectLexicallyLastTag(filteredTags) - case kargoapi.CommitSelectionStrategyNewestTag: - selectedTag = filteredTags[0] // These are already ordered newest to oldest - case kargoapi.CommitSelectionStrategySemVer: - if selectedTag, err = - selectSemverTag(filteredTags, sub.SemverConstraint); err != nil { - return "", "", err + matchesPathsFilters, err := matchesPathsFilters(sub.IncludePaths, sub.ExcludePaths, diffs) + if err != nil { + return selectedTag, "", + fmt.Errorf("error checking includePaths/excludePaths match for commit %q for git repo %q: %w", + selectedCommit, + sub.RepoURL, + err, + ) } - default: - return "", "", fmt.Errorf("unknown commit selection strategy %q", sub.CommitSelectionStrategy) - } - if selectedTag == "" { - return "", "", fmt.Errorf("found no applicable tags in repo %q", sub.RepoURL) - } - // Checkout the selected tag and return the commit ID - if err = r.checkoutTagFn(repo, selectedTag); err != nil { - return "", "", fmt.Errorf( - "error checking out tag %q from git repo %q: %w", - selectedTag, - sub.RepoURL, - err, - ) + if !matchesPathsFilters { + return selectedTag, "", + fmt.Errorf("commit %q not applicable due to includePaths/excludePaths configuration for repo %q", + selectedCommit, + sub.RepoURL, + ) + } } - commit, err := r.getLastCommitIDFn(repo) - if err != nil { - return "", "", fmt.Errorf( - "error determining commit ID of tag %q in git repo %q: %w", - selectedTag, - sub.RepoURL, - err, - ) - } - return selectedTag, commit, nil + return selectedTag, selectedCommit, nil } // allows returns true if the given tag name matches the given regular diff --git a/internal/controller/warehouses/git_test.go b/internal/controller/warehouses/git_test.go index 3883a1dab..9a4fe947c 100644 --- a/internal/controller/warehouses/git_test.go +++ b/internal/controller/warehouses/git_test.go @@ -177,6 +177,7 @@ func TestSelectCommitID(t *testing.T) { name string sub kargoapi.GitSubscription reconciler *reconciler + baseCommit string assertions func(t *testing.T, tag string, commit string, err error) }{ { @@ -226,7 +227,7 @@ func TestSelectCommitID(t *testing.T) { }, assertions: func(t *testing.T, _, _ string, err error) { require.ErrorContains( - t, err, `error getting diffs since commit "sha" in git repo "":`, + t, err, `error getting diffs since commit "dummyBase" in git repo "":`, ) require.ErrorContains(t, err, "something went wrong") }, @@ -416,6 +417,33 @@ func TestSelectCommitID(t *testing.T) { require.Equal(t, "fake-commit", commit) }, }, + { + name: "newest tag error due to path filters configuration", + sub: kargoapi.GitSubscription{ + CommitSelectionStrategy: kargoapi.CommitSelectionStrategyNewestTag, + IncludePaths: []string{regexpPrefix + "^.*third_path_to_a/file$"}, + }, + reconciler: &reconciler{ + listTagsFn: func(git.Repo) ([]string, error) { + return []string{"abc", "xyz"}, nil + }, + checkoutTagFn: func(git.Repo, string) error { + return nil + }, + getLastCommitIDFn: func(git.Repo) (string, error) { + return "fake-commit", nil + }, + getDiffPathsSinceCommitIDFn: func(git.Repo, string) ([]string, error) { + return []string{"first_path_to_a/file", "second_path_to_a/file"}, nil + }, + }, + assertions: func(t *testing.T, tag, commit string, err error) { + require.Equal(t, "abc", tag) + require.ErrorContains(t, err, "commit \"fake-commit\" not applicable due to ") + require.ErrorContains(t, err, "includePaths/excludePaths configuration for repo") + require.Equal(t, "", commit) + }, + }, { name: "semver error selecting tag", sub: kargoapi.GitSubscription{ @@ -459,7 +487,7 @@ func TestSelectCommitID(t *testing.T) { tag, commit, err := testCase.reconciler.selectTagAndCommitID( nil, testCase.sub, - "sha", + "dummyBase", ) testCase.assertions(t, tag, commit, err) }) diff --git a/ui/public/favicon.ico b/ui/public/favicon.ico index 98474dd99..c6bfa5edc 100644 Binary files a/ui/public/favicon.ico and b/ui/public/favicon.ico differ diff --git a/ui/public/kargo-icon.png b/ui/public/kargo-icon.png index 9b188762d..7210db8f7 100644 Binary files a/ui/public/kargo-icon.png and b/ui/public/kargo-icon.png differ diff --git a/ui/src/app.tsx b/ui/src/app.tsx index 5e75ba152..89f3cb4e8 100644 --- a/ui/src/app.tsx +++ b/ui/src/app.tsx @@ -36,6 +36,7 @@ export const App = () => ( element={} /> } /> + } /> } /> } /> diff --git a/ui/src/config/paths.ts b/ui/src/config/paths.ts index eff01d18a..ac5313c2c 100644 --- a/ui/src/config/paths.ts +++ b/ui/src/config/paths.ts @@ -5,6 +5,7 @@ export const paths = { projectCredentials: '/project/:name/credentials', projectAnalysisTemplates: '/project/:name/analysis-templates', projectEvents: '/project/:name/events', + projectRoles: '/project/:name/roles', stage: '/project/:name/stage/:stageName', freight: '/project/:name/freight/:freightName', diff --git a/ui/src/features/common/confirm-modal/confirm-modal.tsx b/ui/src/features/common/confirm-modal/confirm-modal.tsx index cf62813a7..9b6f1b1b7 100644 --- a/ui/src/features/common/confirm-modal/confirm-modal.tsx +++ b/ui/src/features/common/confirm-modal/confirm-modal.tsx @@ -1,10 +1,9 @@ -import { Modal } from 'antd'; - -import { ModalProps } from '../modal/use-modal'; +import { Modal, ModalFuncProps } from 'antd'; export interface ConfirmProps { title: string | React.ReactNode; onOk: () => void; + hide: () => void; content?: string | React.ReactNode; } @@ -13,15 +12,23 @@ export const ConfirmModal = ({ title = 'Are you sure?', content, hide, - visible -}: ConfirmProps & ModalProps) => { + visible, + ...props +}: ConfirmProps & ModalFuncProps) => { const onConfirm = () => { onOk(); hide(); }; return ( - + {content} ); diff --git a/ui/src/features/common/form/field-container.tsx b/ui/src/features/common/form/field-container.tsx index f387c05dc..50edeed37 100644 --- a/ui/src/features/common/form/field-container.tsx +++ b/ui/src/features/common/form/field-container.tsx @@ -11,18 +11,20 @@ interface Props extends UseControllerProps { children: (props: UseControllerReturn) => React.ReactNode; label?: string; formItemOptions?: Omit; + className?: string; } export const FieldContainer = ({ children, label, formItemOptions, + className, ...props }: Props) => { const controller = useController(props); return ( -
+ void; + placeholder?: string; + label?: string; + className?: string; +}) => { + const [values, _setValues] = useState(value); + const [newValue, setNewValue] = useState(''); + + const setValues = (values: string[]) => { + _setValues(values); + onChange(values); + }; + + const addValue = () => { + if (!newValue || newValue === '') return; + setValues([...(values || []), newValue]); + setNewValue(''); + }; + + // necessary for form to be reset properly + useEffect(() => { + _setValues(value); + }, [value]); + + const _Tag = (props: TagProps) => ( + + {props.children} + + ); + + return ( +
+
+ {label &&
{label}
} +
+ {values?.length > 1 && ( +
setValues([])} + > + Clear All +
+ )} +
+
+
+
+ {(values || []).map((v, i) => ( + <_Tag + key={i} + closable + onClose={() => { + setValues(values.filter((_, j) => i !== j)); + onChange(values.filter((_, j) => i !== j)); + }} + > + {v} + + ))} + + {(values || []).length === 0 && ( +
Type below to add values
+ )} +
+ +
+ + { + setNewValue(e.target.value); + }} + onSubmit={addValue} + onPressEnter={addValue} + /> + + +
+
+
+ ); +}; diff --git a/ui/src/features/common/utils.ts b/ui/src/features/common/utils.ts index 20801c7a4..839e28286 100644 --- a/ui/src/features/common/utils.ts +++ b/ui/src/features/common/utils.ts @@ -6,3 +6,5 @@ export const DESCRIPTION_ANNOTATION_KEY = 'kargo.akuity.io/description'; export const getAlias = (freight?: Freight): string | undefined => { return freight?.metadata?.labels[ALIAS_LABEL_KEY] || undefined; }; + +export const dnsRegex = /^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/; diff --git a/ui/src/features/project/credentials/create-credentials-modal.tsx b/ui/src/features/project/credentials/create-credentials-modal.tsx index 2c3e63308..94f5359f4 100644 --- a/ui/src/features/project/credentials/create-credentials-modal.tsx +++ b/ui/src/features/project/credentials/create-credentials-modal.tsx @@ -9,6 +9,7 @@ import { z } from 'zod'; import { FieldContainer } from '@ui/features/common/form/field-container'; import { ModalComponentProps } from '@ui/features/common/modal/modal-context'; import { SegmentLabel } from '@ui/features/common/segment-label'; +import { dnsRegex } from '@ui/features/common/utils'; import { createCredentials, updateCredentials @@ -18,13 +19,11 @@ import { zodValidators } from '@ui/utils/validators'; import { constructDefaults, labelForKey, typeLabel } from './utils'; -const credentialsNameRegex = /^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/; - const createFormSchema = (editing?: boolean) => z .object({ name: zodValidators.requiredString.regex( - credentialsNameRegex, + dnsRegex, 'Credentials name must be a valid DNS subdomain.' ), description: z.string().optional(), diff --git a/ui/src/features/project/pipelines/pipelines.tsx b/ui/src/features/project/pipelines/pipelines.tsx index a8b503746..5e41ff035 100644 --- a/ui/src/features/project/pipelines/pipelines.tsx +++ b/ui/src/features/project/pipelines/pipelines.tsx @@ -740,6 +740,7 @@ export const Pipelines = () => { ...currentData }); } + setFreightAction(undefined); }} /> )} diff --git a/ui/src/features/project/roles/create-role.tsx b/ui/src/features/project/roles/create-role.tsx new file mode 100644 index 000000000..529c145e7 --- /dev/null +++ b/ui/src/features/project/roles/create-role.tsx @@ -0,0 +1,138 @@ +import { useMutation } from '@connectrpc/connect-query'; +import { faPeopleGroup } from '@fortawesome/free-solid-svg-icons'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { zodResolver } from '@hookform/resolvers/zod'; +import { Button, Drawer, Input, Typography } from 'antd'; +import { useState } from 'react'; +import { useForm } from 'react-hook-form'; +import { z } from 'zod'; + +import { FieldContainer } from '@ui/features/common/form/field-container'; +import { MultiStringEditor } from '@ui/features/common/form/multi-string-editor'; +import { dnsRegex } from '@ui/features/common/utils'; +import { PolicyRule } from '@ui/gen/k8s.io/api/rbac/v1/generated_pb'; +import { Role } from '@ui/gen/rbac/v1alpha1/generated_pb'; +import { createRole, updateRole } from '@ui/gen/service/v1alpha1/service-KargoService_connectquery'; +import { zodValidators } from '@ui/utils/validators'; + +import { RuleEditor } from './rule-editor'; +import { RulesTable } from './rules-table'; + +type Props = { + project: string; + onSuccess: () => void; + editing?: Role; + hide: () => void; +}; + +type AllowedFields = 'name' | 'emails' | 'subs' | 'groups'; + +const nonZeroArray = (name: string) => + z.array(z.string()).min(0, `At least one ${name} is required`); + +const formSchema = z.object({ + name: zodValidators.requiredString.regex(dnsRegex, 'Role name must be a valid DNS subdomain.'), + emails: nonZeroArray('email'), + subs: nonZeroArray('sub'), + groups: nonZeroArray('group') +}); + +const multiFields: { name: AllowedFields; label?: string; placeholder: string }[] = [ + { name: 'emails', placeholder: 'email@corp.com' }, + { name: 'subs', label: 'Subjects', placeholder: 'mysubject' }, + { name: 'groups', placeholder: 'mygroup' } +]; + +export const CreateRole = ({ editing, onSuccess, project, hide }: Props) => { + const { control, handleSubmit } = useForm({ + resolver: zodResolver(formSchema), + values: { + name: editing?.metadata?.name || '', + emails: editing?.emails || [], + subs: editing?.subs || [], + groups: editing?.groups || [] + } + }); + + const { mutate } = useMutation(createRole, { + onSuccess: () => { + hide(); + onSuccess(); + } + }); + + const { mutate: update } = useMutation(updateRole, { + onSuccess: () => { + hide(); + onSuccess(); + } + }); + + const onSubmit = handleSubmit((values) => { + if (editing) { + return update({ + role: { ...values, rules, metadata: { namespace: project, name: editing?.metadata?.name } } + }); + } else { + mutate({ role: { ...values, rules, metadata: { name: values.name, namespace: project } } }); + } + }); + + const [rules, setRules] = useState(editing?.rules || []); + + return ( + hide()} width={'85%'} closable={false}> + + + {editing ? 'Edit' : 'Create'} Role + + +
+ + {({ field }) => ( + + )} + +
OIDC Bindings
+
+ {multiFields.map(({ name, placeholder, label }) => ( + + {({ field }) => ( + + )} + + ))} +
+
+
+
Rules
+
+ + setRules([...rules, rule])} style={{ width: '600px' }} /> +
+
+
+ ); +}; diff --git a/ui/src/features/project/roles/delete-role-modal.tsx b/ui/src/features/project/roles/delete-role-modal.tsx new file mode 100644 index 000000000..8153a2aab --- /dev/null +++ b/ui/src/features/project/roles/delete-role-modal.tsx @@ -0,0 +1,36 @@ +import { useMutation } from '@connectrpc/connect-query'; +import { Modal } from 'antd'; +import { useParams } from 'react-router-dom'; + +import { deleteRole } from '@ui/gen/service/v1alpha1/service-KargoService_connectquery'; + +export const DeleteRoleModal = ({ + name, + hide, + onSuccess +}: { + name: string; + hide: () => void; + onSuccess: () => void; +}) => { + const { name: project } = useParams(); + const { mutate } = useMutation(deleteRole, { + onSuccess: () => { + hide(); + onSuccess(); + } + }); + + return ( + { + mutate({ project, name }); + }} + onCancel={hide} + > +

Are you sure you want to delete the role {name}?

+
+ ); +}; diff --git a/ui/src/features/project/roles/roles.tsx b/ui/src/features/project/roles/roles.tsx new file mode 100644 index 000000000..82aaaa1c8 --- /dev/null +++ b/ui/src/features/project/roles/roles.tsx @@ -0,0 +1,176 @@ +import { useMutation, useQuery } from '@connectrpc/connect-query'; +import { + faInfoCircle, + faPencil, + faPlus, + faQuestionCircle, + faTrash +} from '@fortawesome/free-solid-svg-icons'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { Button, Table } from 'antd'; +import classNames from 'classnames'; +import { useState } from 'react'; +import { useParams } from 'react-router-dom'; + +import { ConfirmModal } from '@ui/features/common/confirm-modal/confirm-modal'; +import { useModal } from '@ui/features/common/modal/use-modal'; +import { Role } from '@ui/gen/rbac/v1alpha1/generated_pb'; +import { deleteRole, listRoles } from '@ui/gen/service/v1alpha1/service-KargoService_connectquery'; + +import { CreateRole } from './create-role'; +import { RulesModal } from './rules-modal'; + +const renderColumn = (key: keyof Role) => { + return { + title: key.charAt(0).toUpperCase() + key.slice(1), + key, + render: (record: Role) => { + return ( +
+ {((record[key] as string[]) || []).length > 0 ? ( + (record[key] as string[]).join(',') + ) : ( + + )} +
+ ); + } + }; +}; + +export const Roles = () => { + const { name } = useParams(); + const { data, refetch } = useQuery(listRoles, { project: name }); + + const [showCreateRole, setShowCreateRole] = useState(false); + const [editingRole, setEditingRole] = useState(); + + const { show, hide } = useModal(); + + const { mutate: deleteRoleAction } = useMutation(deleteRole, { + onSuccess: () => { + hide(); + setTimeout(() => refetch(), 500); + } + }); + + return ( +
+ {(showCreateRole || editingRole) && ( + { + setShowCreateRole(false); + setEditingRole(undefined); + }} + editing={editingRole} + /> + )} + { + if (a.metadata?.name && b.metadata?.name) { + return a.metadata?.name.localeCompare(b.metadata?.name); + } else { + return 0; + } + })} + rowKey={(record) => record?.metadata?.name || ''} + columns={[ + { + title: 'Name', + key: 'name', + render: (record: Role) => <>{record.metadata?.name} + }, + renderColumn('emails'), + renderColumn('subs'), + renderColumn('groups'), + { + title: 'Rules', + key: 'rules', + render: (record: Role) => { + return ( + 0 ? faInfoCircle : faQuestionCircle} + className={classNames({ + 'cursor-pointer text-blue-500': record?.rules?.length > 0, + 'text-gray-200': record?.rules?.length === 0 + })} + onClick={() => { + if (record?.rules?.length === 0) return; + show((p) => ( + + )); + }} + /> + ); + } + }, + { + title: ( +
+ +
+ ), + key: 'actions', + render: (record: Role) => { + return ( +
+ {record?.kargoManaged && ( + <> + + + + )} +
+ ); + } + } + ]} + /> + + ); +}; diff --git a/ui/src/features/project/roles/rule-editor.tsx b/ui/src/features/project/roles/rule-editor.tsx new file mode 100644 index 000000000..590a12081 --- /dev/null +++ b/ui/src/features/project/roles/rule-editor.tsx @@ -0,0 +1,124 @@ +import { faPlus } from '@fortawesome/free-solid-svg-icons'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { zodResolver } from '@hookform/resolvers/zod'; +import { Button, Select, SelectProps } from 'antd'; +import { useForm } from 'react-hook-form'; +import { z } from 'zod'; + +import { FieldContainer } from '@ui/features/common/form/field-container'; +import { MultiStringEditor } from '@ui/features/common/form/multi-string-editor'; +import { PolicyRule } from '@ui/gen/k8s.io/api/rbac/v1/generated_pb'; + +const availableResources = [ + // core + 'events', + 'secrets', + 'serviceaccounts', + // rbac.authorization.k8s.io + 'rolebindings', + 'roles', + // kargo.akuity.io + 'freights', + 'stages', + 'promotions', + 'warehouses', + // argoproj.io + 'analysisruns', + 'analysistemplates' +]; + +const availableVerbs = ['get', 'create', 'update', 'delete', 'patch', 'list', '*']; + +const ruleFormSchema = () => + z.object({ + verbs: z.string().array(), + resources: z.string().array(), + resourceNames: z.string().array().optional() + }); + +export const RuleEditor = ({ + onSuccess, + style +}: { + onSuccess: (rule: PolicyRule) => void; + style?: React.CSSProperties; +}) => { + const { control, handleSubmit, reset, watch } = useForm({ + resolver: zodResolver(ruleFormSchema()) + }); + + const onSubmit = handleSubmit((values) => { + onSuccess({ + verbs: values.verbs, + resources: values.resources, + resourceNames: values.resourceNames + } as PolicyRule); + reset({ + verbs: [] as string[], + resources: [] as string[], + resourceNames: [] as string[] + } as PolicyRule); + }); + + const resources = watch('resources'); + + const _Select = (props: SelectProps & { label: string }) => ( +
+
{props.label}
+
JSON.stringify(rule)} + pagination={false} + className='h-full w-full mb-10' + columns={[ + renderColumn('Verbs', 'verbs'), + renderColumn('Resources', 'resources'), + renderColumn('Resource Names', 'resourceNames'), + { + key: 'actions', + render: (rule) => + setRules && ( +
{ + setRules(rules.filter((r) => r !== rule)); + }} + > + +
+ ) + } + ]} + /> + ); +}; diff --git a/ui/src/features/stage/stage-actions.tsx b/ui/src/features/stage/stage-actions.tsx index 787580e23..115864630 100644 --- a/ui/src/features/stage/stage-actions.tsx +++ b/ui/src/features/stage/stage-actions.tsx @@ -130,7 +130,12 @@ export const StageActions = ({ stage }: { stage: Stage }) => { type='default' icon={} onClick={onRefresh} - loading={isRefreshLoading || (!!stage?.metadata?.annotations['kargo.akuity.io/refresh'] && stage?.metadata?.annotations?.['kargo.akuity.io/refresh'] !== stage?.status?.lastHandledRefresh)} + loading={ + isRefreshLoading || + (!!stage?.metadata?.annotations['kargo.akuity.io/refresh'] && + stage?.metadata?.annotations?.['kargo.akuity.io/refresh'] !== + stage?.status?.lastHandledRefresh) + } > Refresh diff --git a/ui/src/gen/api/v1alpha1/generated_pb.ts b/ui/src/gen/api/v1alpha1/generated_pb.ts deleted file mode 100644 index c7a681ce3..000000000 --- a/ui/src/gen/api/v1alpha1/generated_pb.ts +++ /dev/null @@ -1,2217 +0,0 @@ -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" -// @generated from file api/v1alpha1/generated.proto (package github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1, syntax proto2) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto2 } from "@bufbuild/protobuf"; -import { ListMeta, ObjectMeta, Time } from "../../k8s.io/apimachinery/pkg/apis/meta/v1/generated_pb.js"; -import { IntOrString } from "../../k8s.io/apimachinery/pkg/util/intstr/generated_pb.js"; -import { JobSpec } from "../../k8s.io/api/batch/v1/generated_pb.js"; - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisRun - */ -export class AnalysisRun extends Message { - /** - * @generated from field: optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - */ - metadata?: ObjectMeta; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisRunSpec spec = 2; - */ - spec?: AnalysisRunSpec; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisRunStatus status = 3; - */ - status?: AnalysisRunStatus; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisRun"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metadata", kind: "message", T: ObjectMeta, opt: true }, - { no: 2, name: "spec", kind: "message", T: AnalysisRunSpec, opt: true }, - { no: 3, name: "status", kind: "message", T: AnalysisRunStatus, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnalysisRun { - return new AnalysisRun().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AnalysisRun { - return new AnalysisRun().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnalysisRun { - return new AnalysisRun().fromJsonString(jsonString, options); - } - - static equals(a: AnalysisRun | PlainMessage | undefined, b: AnalysisRun | PlainMessage | undefined): boolean { - return proto2.util.equals(AnalysisRun, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisRunList - */ -export class AnalysisRunList extends Message { - /** - * @generated from field: optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - */ - metadata?: ListMeta; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisRun items = 2; - */ - items: AnalysisRun[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisRunList"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metadata", kind: "message", T: ListMeta, opt: true }, - { no: 2, name: "items", kind: "message", T: AnalysisRun, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnalysisRunList { - return new AnalysisRunList().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AnalysisRunList { - return new AnalysisRunList().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnalysisRunList { - return new AnalysisRunList().fromJsonString(jsonString, options); - } - - static equals(a: AnalysisRunList | PlainMessage | undefined, b: AnalysisRunList | PlainMessage | undefined): boolean { - return proto2.util.equals(AnalysisRunList, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisRunSpec - */ -export class AnalysisRunSpec extends Message { - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Metric metrics = 1; - */ - metrics: Metric[] = []; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Argument args = 2; - */ - args: Argument[] = []; - - /** - * @generated from field: optional bool terminate = 3; - */ - terminate?: boolean; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.DryRun dryRun = 4; - */ - dryRun: DryRun[] = []; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.MeasurementRetention measurementRetention = 5; - */ - measurementRetention: MeasurementRetention[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisRunSpec"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metrics", kind: "message", T: Metric, repeated: true }, - { no: 2, name: "args", kind: "message", T: Argument, repeated: true }, - { no: 3, name: "terminate", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 4, name: "dryRun", kind: "message", T: DryRun, repeated: true }, - { no: 5, name: "measurementRetention", kind: "message", T: MeasurementRetention, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnalysisRunSpec { - return new AnalysisRunSpec().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AnalysisRunSpec { - return new AnalysisRunSpec().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnalysisRunSpec { - return new AnalysisRunSpec().fromJsonString(jsonString, options); - } - - static equals(a: AnalysisRunSpec | PlainMessage | undefined, b: AnalysisRunSpec | PlainMessage | undefined): boolean { - return proto2.util.equals(AnalysisRunSpec, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisRunStatus - */ -export class AnalysisRunStatus extends Message { - /** - * @generated from field: optional string phase = 1; - */ - phase?: string; - - /** - * @generated from field: optional string message = 2; - */ - message?: string; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.MetricResult metricResults = 3; - */ - metricResults: MetricResult[] = []; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startedAt = 4; - */ - startedAt?: Time; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.RunSummary runSummary = 5; - */ - runSummary?: RunSummary; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.RunSummary dryRunSummary = 6; - */ - dryRunSummary?: RunSummary; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisRunStatus"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "phase", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "metricResults", kind: "message", T: MetricResult, repeated: true }, - { no: 4, name: "startedAt", kind: "message", T: Time, opt: true }, - { no: 5, name: "runSummary", kind: "message", T: RunSummary, opt: true }, - { no: 6, name: "dryRunSummary", kind: "message", T: RunSummary, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnalysisRunStatus { - return new AnalysisRunStatus().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AnalysisRunStatus { - return new AnalysisRunStatus().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnalysisRunStatus { - return new AnalysisRunStatus().fromJsonString(jsonString, options); - } - - static equals(a: AnalysisRunStatus | PlainMessage | undefined, b: AnalysisRunStatus | PlainMessage | undefined): boolean { - return proto2.util.equals(AnalysisRunStatus, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisTemplate - */ -export class AnalysisTemplate extends Message { - /** - * @generated from field: optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - */ - metadata?: ObjectMeta; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisTemplateSpec spec = 2; - */ - spec?: AnalysisTemplateSpec; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisTemplate"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metadata", kind: "message", T: ObjectMeta, opt: true }, - { no: 2, name: "spec", kind: "message", T: AnalysisTemplateSpec, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnalysisTemplate { - return new AnalysisTemplate().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AnalysisTemplate { - return new AnalysisTemplate().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnalysisTemplate { - return new AnalysisTemplate().fromJsonString(jsonString, options); - } - - static equals(a: AnalysisTemplate | PlainMessage | undefined, b: AnalysisTemplate | PlainMessage | undefined): boolean { - return proto2.util.equals(AnalysisTemplate, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisTemplateList - */ -export class AnalysisTemplateList extends Message { - /** - * @generated from field: optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - */ - metadata?: ListMeta; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisTemplate items = 2; - */ - items: AnalysisTemplate[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisTemplateList"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metadata", kind: "message", T: ListMeta, opt: true }, - { no: 2, name: "items", kind: "message", T: AnalysisTemplate, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnalysisTemplateList { - return new AnalysisTemplateList().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AnalysisTemplateList { - return new AnalysisTemplateList().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnalysisTemplateList { - return new AnalysisTemplateList().fromJsonString(jsonString, options); - } - - static equals(a: AnalysisTemplateList | PlainMessage | undefined, b: AnalysisTemplateList | PlainMessage | undefined): boolean { - return proto2.util.equals(AnalysisTemplateList, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisTemplateSpec - */ -export class AnalysisTemplateSpec extends Message { - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Metric metrics = 1; - */ - metrics: Metric[] = []; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Argument args = 2; - */ - args: Argument[] = []; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.DryRun dryRun = 3; - */ - dryRun: DryRun[] = []; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.MeasurementRetention measurementRetention = 4; - */ - measurementRetention: MeasurementRetention[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisTemplateSpec"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metrics", kind: "message", T: Metric, repeated: true }, - { no: 2, name: "args", kind: "message", T: Argument, repeated: true }, - { no: 3, name: "dryRun", kind: "message", T: DryRun, repeated: true }, - { no: 4, name: "measurementRetention", kind: "message", T: MeasurementRetention, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnalysisTemplateSpec { - return new AnalysisTemplateSpec().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AnalysisTemplateSpec { - return new AnalysisTemplateSpec().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnalysisTemplateSpec { - return new AnalysisTemplateSpec().fromJsonString(jsonString, options); - } - - static equals(a: AnalysisTemplateSpec | PlainMessage | undefined, b: AnalysisTemplateSpec | PlainMessage | undefined): boolean { - return proto2.util.equals(AnalysisTemplateSpec, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Argument - */ -export class Argument extends Message { - /** - * @generated from field: optional string name = 1; - */ - name?: string; - - /** - * @generated from field: optional string value = 2; - */ - value?: string; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.ValueFrom valueFrom = 3; - */ - valueFrom?: ValueFrom; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Argument"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "valueFrom", kind: "message", T: ValueFrom, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Argument { - return new Argument().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Argument { - return new Argument().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Argument { - return new Argument().fromJsonString(jsonString, options); - } - - static equals(a: Argument | PlainMessage | undefined, b: Argument | PlainMessage | undefined): boolean { - return proto2.util.equals(Argument, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Authentication - */ -export class Authentication extends Message { - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Sigv4Config sigv4 = 1; - */ - sigv4?: Sigv4Config; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.OAuth2Config oauth2 = 2; - */ - oauth2?: OAuth2Config; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Authentication"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "sigv4", kind: "message", T: Sigv4Config, opt: true }, - { no: 2, name: "oauth2", kind: "message", T: OAuth2Config, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Authentication { - return new Authentication().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Authentication { - return new Authentication().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Authentication { - return new Authentication().fromJsonString(jsonString, options); - } - - static equals(a: Authentication | PlainMessage | undefined, b: Authentication | PlainMessage | undefined): boolean { - return proto2.util.equals(Authentication, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetric - */ -export class CloudWatchMetric extends Message { - /** - * @generated from field: optional string interval = 1; - */ - interval?: string; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetricDataQuery metricDataQueries = 2; - */ - metricDataQueries: CloudWatchMetricDataQuery[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "interval", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "metricDataQueries", kind: "message", T: CloudWatchMetricDataQuery, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CloudWatchMetric { - return new CloudWatchMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CloudWatchMetric { - return new CloudWatchMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CloudWatchMetric { - return new CloudWatchMetric().fromJsonString(jsonString, options); - } - - static equals(a: CloudWatchMetric | PlainMessage | undefined, b: CloudWatchMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(CloudWatchMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetricDataQuery - */ -export class CloudWatchMetricDataQuery extends Message { - /** - * @generated from field: optional string id = 1; - */ - id?: string; - - /** - * @generated from field: optional string expression = 2; - */ - expression?: string; - - /** - * @generated from field: optional string label = 3; - */ - label?: string; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetricStat metricStat = 4; - */ - metricStat?: CloudWatchMetricStat; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.util.intstr.IntOrString period = 5; - */ - period?: IntOrString; - - /** - * @generated from field: optional bool returnData = 6; - */ - returnData?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetricDataQuery"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "expression", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "label", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "metricStat", kind: "message", T: CloudWatchMetricStat, opt: true }, - { no: 5, name: "period", kind: "message", T: IntOrString, opt: true }, - { no: 6, name: "returnData", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CloudWatchMetricDataQuery { - return new CloudWatchMetricDataQuery().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CloudWatchMetricDataQuery { - return new CloudWatchMetricDataQuery().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CloudWatchMetricDataQuery { - return new CloudWatchMetricDataQuery().fromJsonString(jsonString, options); - } - - static equals(a: CloudWatchMetricDataQuery | PlainMessage | undefined, b: CloudWatchMetricDataQuery | PlainMessage | undefined): boolean { - return proto2.util.equals(CloudWatchMetricDataQuery, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetricStat - */ -export class CloudWatchMetricStat extends Message { - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetricStatMetric metric = 1; - */ - metric?: CloudWatchMetricStatMetric; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.util.intstr.IntOrString period = 2; - */ - period?: IntOrString; - - /** - * @generated from field: optional string stat = 3; - */ - stat?: string; - - /** - * @generated from field: optional string unit = 4; - */ - unit?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetricStat"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metric", kind: "message", T: CloudWatchMetricStatMetric, opt: true }, - { no: 2, name: "period", kind: "message", T: IntOrString, opt: true }, - { no: 3, name: "stat", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "unit", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CloudWatchMetricStat { - return new CloudWatchMetricStat().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CloudWatchMetricStat { - return new CloudWatchMetricStat().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CloudWatchMetricStat { - return new CloudWatchMetricStat().fromJsonString(jsonString, options); - } - - static equals(a: CloudWatchMetricStat | PlainMessage | undefined, b: CloudWatchMetricStat | PlainMessage | undefined): boolean { - return proto2.util.equals(CloudWatchMetricStat, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetricStatMetric - */ -export class CloudWatchMetricStatMetric extends Message { - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetricStatMetricDimension dimensions = 1; - */ - dimensions: CloudWatchMetricStatMetricDimension[] = []; - - /** - * @generated from field: optional string metricName = 2; - */ - metricName?: string; - - /** - * @generated from field: optional string namespace = 3; - */ - namespace?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetricStatMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "dimensions", kind: "message", T: CloudWatchMetricStatMetricDimension, repeated: true }, - { no: 2, name: "metricName", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "namespace", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CloudWatchMetricStatMetric { - return new CloudWatchMetricStatMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CloudWatchMetricStatMetric { - return new CloudWatchMetricStatMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CloudWatchMetricStatMetric { - return new CloudWatchMetricStatMetric().fromJsonString(jsonString, options); - } - - static equals(a: CloudWatchMetricStatMetric | PlainMessage | undefined, b: CloudWatchMetricStatMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(CloudWatchMetricStatMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetricStatMetricDimension - */ -export class CloudWatchMetricStatMetricDimension extends Message { - /** - * @generated from field: optional string name = 1; - */ - name?: string; - - /** - * @generated from field: optional string value = 2; - */ - value?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetricStatMetricDimension"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CloudWatchMetricStatMetricDimension { - return new CloudWatchMetricStatMetricDimension().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CloudWatchMetricStatMetricDimension { - return new CloudWatchMetricStatMetricDimension().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CloudWatchMetricStatMetricDimension { - return new CloudWatchMetricStatMetricDimension().fromJsonString(jsonString, options); - } - - static equals(a: CloudWatchMetricStatMetricDimension | PlainMessage | undefined, b: CloudWatchMetricStatMetricDimension | PlainMessage | undefined): boolean { - return proto2.util.equals(CloudWatchMetricStatMetricDimension, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.DatadogMetric - */ -export class DatadogMetric extends Message { - /** - * @generated from field: optional string interval = 1; - */ - interval?: string; - - /** - * @generated from field: optional string query = 2; - */ - query?: string; - - /** - * @generated from field: map queries = 3; - */ - queries: { [key: string]: string } = {}; - - /** - * @generated from field: optional string formula = 4; - */ - formula?: string; - - /** - * @generated from field: optional string apiVersion = 5; - */ - apiVersion?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.DatadogMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "interval", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "queries", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - { no: 4, name: "formula", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "apiVersion", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DatadogMetric { - return new DatadogMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DatadogMetric { - return new DatadogMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DatadogMetric { - return new DatadogMetric().fromJsonString(jsonString, options); - } - - static equals(a: DatadogMetric | PlainMessage | undefined, b: DatadogMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(DatadogMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.DryRun - */ -export class DryRun extends Message { - /** - * @generated from field: optional string metricName = 1; - */ - metricName?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.DryRun"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metricName", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DryRun { - return new DryRun().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DryRun { - return new DryRun().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DryRun { - return new DryRun().fromJsonString(jsonString, options); - } - - static equals(a: DryRun | PlainMessage | undefined, b: DryRun | PlainMessage | undefined): boolean { - return proto2.util.equals(DryRun, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.FieldRef - */ -export class FieldRef extends Message { - /** - * Required: Path of the field to select in the specified API version - * - * @generated from field: optional string fieldPath = 1; - */ - fieldPath?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.FieldRef"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "fieldPath", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): FieldRef { - return new FieldRef().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): FieldRef { - return new FieldRef().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): FieldRef { - return new FieldRef().fromJsonString(jsonString, options); - } - - static equals(a: FieldRef | PlainMessage | undefined, b: FieldRef | PlainMessage | undefined): boolean { - return proto2.util.equals(FieldRef, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.GraphiteMetric - */ -export class GraphiteMetric extends Message { - /** - * @generated from field: optional string address = 1; - */ - address?: string; - - /** - * @generated from field: optional string query = 2; - */ - query?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.GraphiteMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GraphiteMetric { - return new GraphiteMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GraphiteMetric { - return new GraphiteMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GraphiteMetric { - return new GraphiteMetric().fromJsonString(jsonString, options); - } - - static equals(a: GraphiteMetric | PlainMessage | undefined, b: GraphiteMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(GraphiteMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.InfluxdbMetric - */ -export class InfluxdbMetric extends Message { - /** - * @generated from field: optional string profile = 1; - */ - profile?: string; - - /** - * @generated from field: optional string query = 2; - */ - query?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.InfluxdbMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "profile", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): InfluxdbMetric { - return new InfluxdbMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): InfluxdbMetric { - return new InfluxdbMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): InfluxdbMetric { - return new InfluxdbMetric().fromJsonString(jsonString, options); - } - - static equals(a: InfluxdbMetric | PlainMessage | undefined, b: InfluxdbMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(InfluxdbMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.JobMetric - */ -export class JobMetric extends Message { - /** - * @generated from field: optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - */ - metadata?: ObjectMeta; - - /** - * @generated from field: optional k8s.io.api.batch.v1.JobSpec spec = 2; - */ - spec?: JobSpec; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.JobMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metadata", kind: "message", T: ObjectMeta, opt: true }, - { no: 2, name: "spec", kind: "message", T: JobSpec, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JobMetric { - return new JobMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JobMetric { - return new JobMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JobMetric { - return new JobMetric().fromJsonString(jsonString, options); - } - - static equals(a: JobMetric | PlainMessage | undefined, b: JobMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(JobMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.KayentaMetric - */ -export class KayentaMetric extends Message { - /** - * @generated from field: optional string address = 1; - */ - address?: string; - - /** - * @generated from field: optional string application = 2; - */ - application?: string; - - /** - * @generated from field: optional string canaryConfigName = 3; - */ - canaryConfigName?: string; - - /** - * @generated from field: optional string metricsAccountName = 4; - */ - metricsAccountName?: string; - - /** - * @generated from field: optional string configurationAccountName = 5; - */ - configurationAccountName?: string; - - /** - * @generated from field: optional string storageAccountName = 6; - */ - storageAccountName?: string; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.KayentaThreshold threshold = 7; - */ - threshold?: KayentaThreshold; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.KayentaScope scopes = 8; - */ - scopes: KayentaScope[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.KayentaMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "application", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "canaryConfigName", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "metricsAccountName", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "configurationAccountName", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 6, name: "storageAccountName", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 7, name: "threshold", kind: "message", T: KayentaThreshold, opt: true }, - { no: 8, name: "scopes", kind: "message", T: KayentaScope, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): KayentaMetric { - return new KayentaMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): KayentaMetric { - return new KayentaMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): KayentaMetric { - return new KayentaMetric().fromJsonString(jsonString, options); - } - - static equals(a: KayentaMetric | PlainMessage | undefined, b: KayentaMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(KayentaMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.KayentaScope - */ -export class KayentaScope extends Message { - /** - * @generated from field: optional string name = 1; - */ - name?: string; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.ScopeDetail controlScope = 2; - */ - controlScope?: ScopeDetail; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.ScopeDetail experimentScope = 3; - */ - experimentScope?: ScopeDetail; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.KayentaScope"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "controlScope", kind: "message", T: ScopeDetail, opt: true }, - { no: 3, name: "experimentScope", kind: "message", T: ScopeDetail, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): KayentaScope { - return new KayentaScope().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): KayentaScope { - return new KayentaScope().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): KayentaScope { - return new KayentaScope().fromJsonString(jsonString, options); - } - - static equals(a: KayentaScope | PlainMessage | undefined, b: KayentaScope | PlainMessage | undefined): boolean { - return proto2.util.equals(KayentaScope, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.KayentaThreshold - */ -export class KayentaThreshold extends Message { - /** - * @generated from field: optional int64 pass = 1; - */ - pass?: bigint; - - /** - * @generated from field: optional int64 marginal = 2; - */ - marginal?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.KayentaThreshold"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "pass", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 2, name: "marginal", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): KayentaThreshold { - return new KayentaThreshold().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): KayentaThreshold { - return new KayentaThreshold().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): KayentaThreshold { - return new KayentaThreshold().fromJsonString(jsonString, options); - } - - static equals(a: KayentaThreshold | PlainMessage | undefined, b: KayentaThreshold | PlainMessage | undefined): boolean { - return proto2.util.equals(KayentaThreshold, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Measurement - */ -export class Measurement extends Message { - /** - * @generated from field: optional string phase = 1; - */ - phase?: string; - - /** - * @generated from field: optional string message = 2; - */ - message?: string; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startedAt = 3; - */ - startedAt?: Time; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.apis.meta.v1.Time finishedAt = 4; - */ - finishedAt?: Time; - - /** - * @generated from field: optional string value = 5; - */ - value?: string; - - /** - * @generated from field: map metadata = 6; - */ - metadata: { [key: string]: string } = {}; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.apis.meta.v1.Time resumeAt = 7; - */ - resumeAt?: Time; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Measurement"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "phase", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "startedAt", kind: "message", T: Time, opt: true }, - { no: 4, name: "finishedAt", kind: "message", T: Time, opt: true }, - { no: 5, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 6, name: "metadata", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - { no: 7, name: "resumeAt", kind: "message", T: Time, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Measurement { - return new Measurement().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Measurement { - return new Measurement().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Measurement { - return new Measurement().fromJsonString(jsonString, options); - } - - static equals(a: Measurement | PlainMessage | undefined, b: Measurement | PlainMessage | undefined): boolean { - return proto2.util.equals(Measurement, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.MeasurementRetention - */ -export class MeasurementRetention extends Message { - /** - * @generated from field: optional string metricName = 1; - */ - metricName?: string; - - /** - * @generated from field: optional int32 limit = 2; - */ - limit?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.MeasurementRetention"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metricName", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "limit", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MeasurementRetention { - return new MeasurementRetention().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MeasurementRetention { - return new MeasurementRetention().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MeasurementRetention { - return new MeasurementRetention().fromJsonString(jsonString, options); - } - - static equals(a: MeasurementRetention | PlainMessage | undefined, b: MeasurementRetention | PlainMessage | undefined): boolean { - return proto2.util.equals(MeasurementRetention, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Metric - */ -export class Metric extends Message { - /** - * @generated from field: optional string name = 1; - */ - name?: string; - - /** - * @generated from field: optional string interval = 2; - */ - interval?: string; - - /** - * @generated from field: optional string initialDelay = 3; - */ - initialDelay?: string; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.util.intstr.IntOrString count = 4; - */ - count?: IntOrString; - - /** - * @generated from field: optional string successCondition = 5; - */ - successCondition?: string; - - /** - * @generated from field: optional string failureCondition = 6; - */ - failureCondition?: string; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.util.intstr.IntOrString failureLimit = 7; - */ - failureLimit?: IntOrString; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.util.intstr.IntOrString inconclusiveLimit = 8; - */ - inconclusiveLimit?: IntOrString; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.util.intstr.IntOrString consecutiveErrorLimit = 9; - */ - consecutiveErrorLimit?: IntOrString; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.MetricProvider provider = 10; - */ - provider?: MetricProvider; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Metric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "interval", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "initialDelay", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "count", kind: "message", T: IntOrString, opt: true }, - { no: 5, name: "successCondition", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 6, name: "failureCondition", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 7, name: "failureLimit", kind: "message", T: IntOrString, opt: true }, - { no: 8, name: "inconclusiveLimit", kind: "message", T: IntOrString, opt: true }, - { no: 9, name: "consecutiveErrorLimit", kind: "message", T: IntOrString, opt: true }, - { no: 10, name: "provider", kind: "message", T: MetricProvider, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Metric { - return new Metric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Metric { - return new Metric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Metric { - return new Metric().fromJsonString(jsonString, options); - } - - static equals(a: Metric | PlainMessage | undefined, b: Metric | PlainMessage | undefined): boolean { - return proto2.util.equals(Metric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.MetricProvider - */ -export class MetricProvider extends Message { - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.PrometheusMetric prometheus = 1; - */ - prometheus?: PrometheusMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.KayentaMetric kayenta = 2; - */ - kayenta?: KayentaMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.WebMetric web = 3; - */ - web?: WebMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.DatadogMetric datadog = 4; - */ - datadog?: DatadogMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.WavefrontMetric wavefront = 5; - */ - wavefront?: WavefrontMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.NewRelicMetric newRelic = 6; - */ - newRelic?: NewRelicMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.JobMetric job = 7; - */ - job?: JobMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetric cloudWatch = 8; - */ - cloudWatch?: CloudWatchMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.GraphiteMetric graphite = 9; - */ - graphite?: GraphiteMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.InfluxdbMetric influxdb = 10; - */ - influxdb?: InfluxdbMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.SkyWalkingMetric skywalking = 11; - */ - skywalking?: SkyWalkingMetric; - - /** - * @generated from field: map plugin = 12; - */ - plugin: { [key: string]: Uint8Array } = {}; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.MetricProvider"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "prometheus", kind: "message", T: PrometheusMetric, opt: true }, - { no: 2, name: "kayenta", kind: "message", T: KayentaMetric, opt: true }, - { no: 3, name: "web", kind: "message", T: WebMetric, opt: true }, - { no: 4, name: "datadog", kind: "message", T: DatadogMetric, opt: true }, - { no: 5, name: "wavefront", kind: "message", T: WavefrontMetric, opt: true }, - { no: 6, name: "newRelic", kind: "message", T: NewRelicMetric, opt: true }, - { no: 7, name: "job", kind: "message", T: JobMetric, opt: true }, - { no: 8, name: "cloudWatch", kind: "message", T: CloudWatchMetric, opt: true }, - { no: 9, name: "graphite", kind: "message", T: GraphiteMetric, opt: true }, - { no: 10, name: "influxdb", kind: "message", T: InfluxdbMetric, opt: true }, - { no: 11, name: "skywalking", kind: "message", T: SkyWalkingMetric, opt: true }, - { no: 12, name: "plugin", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 12 /* ScalarType.BYTES */} }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MetricProvider { - return new MetricProvider().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MetricProvider { - return new MetricProvider().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MetricProvider { - return new MetricProvider().fromJsonString(jsonString, options); - } - - static equals(a: MetricProvider | PlainMessage | undefined, b: MetricProvider | PlainMessage | undefined): boolean { - return proto2.util.equals(MetricProvider, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.MetricResult - */ -export class MetricResult extends Message { - /** - * @generated from field: optional string name = 1; - */ - name?: string; - - /** - * @generated from field: optional string phase = 2; - */ - phase?: string; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Measurement measurements = 3; - */ - measurements: Measurement[] = []; - - /** - * @generated from field: optional string message = 4; - */ - message?: string; - - /** - * @generated from field: optional int32 count = 5; - */ - count?: number; - - /** - * @generated from field: optional int32 successful = 6; - */ - successful?: number; - - /** - * @generated from field: optional int32 failed = 7; - */ - failed?: number; - - /** - * @generated from field: optional int32 inconclusive = 8; - */ - inconclusive?: number; - - /** - * @generated from field: optional int32 error = 9; - */ - error?: number; - - /** - * @generated from field: optional int32 consecutiveError = 10; - */ - consecutiveError?: number; - - /** - * @generated from field: optional bool dryRun = 11; - */ - dryRun?: boolean; - - /** - * @generated from field: map metadata = 12; - */ - metadata: { [key: string]: string } = {}; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.MetricResult"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "phase", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "measurements", kind: "message", T: Measurement, repeated: true }, - { no: 4, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "count", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 6, name: "successful", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 7, name: "failed", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 8, name: "inconclusive", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 9, name: "error", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 10, name: "consecutiveError", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 11, name: "dryRun", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 12, name: "metadata", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MetricResult { - return new MetricResult().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MetricResult { - return new MetricResult().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MetricResult { - return new MetricResult().fromJsonString(jsonString, options); - } - - static equals(a: MetricResult | PlainMessage | undefined, b: MetricResult | PlainMessage | undefined): boolean { - return proto2.util.equals(MetricResult, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.NewRelicMetric - */ -export class NewRelicMetric extends Message { - /** - * @generated from field: optional string profile = 1; - */ - profile?: string; - - /** - * @generated from field: optional string query = 2; - */ - query?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.NewRelicMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "profile", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): NewRelicMetric { - return new NewRelicMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): NewRelicMetric { - return new NewRelicMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): NewRelicMetric { - return new NewRelicMetric().fromJsonString(jsonString, options); - } - - static equals(a: NewRelicMetric | PlainMessage | undefined, b: NewRelicMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(NewRelicMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.OAuth2Config - */ -export class OAuth2Config extends Message { - /** - * @generated from field: optional string tokenUrl = 1; - */ - tokenUrl?: string; - - /** - * @generated from field: optional string clientId = 2; - */ - clientId?: string; - - /** - * @generated from field: optional string clientSecret = 3; - */ - clientSecret?: string; - - /** - * @generated from field: repeated string scopes = 4; - */ - scopes: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.OAuth2Config"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "tokenUrl", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "clientId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "clientSecret", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "scopes", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): OAuth2Config { - return new OAuth2Config().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): OAuth2Config { - return new OAuth2Config().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): OAuth2Config { - return new OAuth2Config().fromJsonString(jsonString, options); - } - - static equals(a: OAuth2Config | PlainMessage | undefined, b: OAuth2Config | PlainMessage | undefined): boolean { - return proto2.util.equals(OAuth2Config, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.PrometheusMetric - */ -export class PrometheusMetric extends Message { - /** - * @generated from field: optional string address = 1; - */ - address?: string; - - /** - * @generated from field: optional string query = 2; - */ - query?: string; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Authentication authentication = 3; - */ - authentication?: Authentication; - - /** - * @generated from field: optional int64 timeout = 4; - */ - timeout?: bigint; - - /** - * @generated from field: optional bool insecure = 5; - */ - insecure?: boolean; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.WebMetricHeader headers = 6; - */ - headers: WebMetricHeader[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.PrometheusMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "authentication", kind: "message", T: Authentication, opt: true }, - { no: 4, name: "timeout", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 5, name: "insecure", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 6, name: "headers", kind: "message", T: WebMetricHeader, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PrometheusMetric { - return new PrometheusMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PrometheusMetric { - return new PrometheusMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PrometheusMetric { - return new PrometheusMetric().fromJsonString(jsonString, options); - } - - static equals(a: PrometheusMetric | PlainMessage | undefined, b: PrometheusMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(PrometheusMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.RunSummary - */ -export class RunSummary extends Message { - /** - * @generated from field: optional int32 count = 1; - */ - count?: number; - - /** - * @generated from field: optional int32 successful = 2; - */ - successful?: number; - - /** - * @generated from field: optional int32 failed = 3; - */ - failed?: number; - - /** - * @generated from field: optional int32 inconclusive = 4; - */ - inconclusive?: number; - - /** - * @generated from field: optional int32 error = 5; - */ - error?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.RunSummary"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "count", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 2, name: "successful", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 3, name: "failed", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 4, name: "inconclusive", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 5, name: "error", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RunSummary { - return new RunSummary().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RunSummary { - return new RunSummary().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RunSummary { - return new RunSummary().fromJsonString(jsonString, options); - } - - static equals(a: RunSummary | PlainMessage | undefined, b: RunSummary | PlainMessage | undefined): boolean { - return proto2.util.equals(RunSummary, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.ScopeDetail - */ -export class ScopeDetail extends Message { - /** - * @generated from field: optional string scope = 1; - */ - scope?: string; - - /** - * @generated from field: optional string region = 2; - */ - region?: string; - - /** - * @generated from field: optional int64 step = 3; - */ - step?: bigint; - - /** - * @generated from field: optional string start = 4; - */ - start?: string; - - /** - * @generated from field: optional string end = 5; - */ - end?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.ScopeDetail"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "scope", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "region", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "step", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 4, name: "start", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "end", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ScopeDetail { - return new ScopeDetail().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ScopeDetail { - return new ScopeDetail().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ScopeDetail { - return new ScopeDetail().fromJsonString(jsonString, options); - } - - static equals(a: ScopeDetail | PlainMessage | undefined, b: ScopeDetail | PlainMessage | undefined): boolean { - return proto2.util.equals(ScopeDetail, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.SecretKeyRef - */ -export class SecretKeyRef extends Message { - /** - * @generated from field: optional string name = 1; - */ - name?: string; - - /** - * @generated from field: optional string key = 2; - */ - key?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.SecretKeyRef"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SecretKeyRef { - return new SecretKeyRef().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SecretKeyRef { - return new SecretKeyRef().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SecretKeyRef { - return new SecretKeyRef().fromJsonString(jsonString, options); - } - - static equals(a: SecretKeyRef | PlainMessage | undefined, b: SecretKeyRef | PlainMessage | undefined): boolean { - return proto2.util.equals(SecretKeyRef, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Sigv4Config - */ -export class Sigv4Config extends Message { - /** - * @generated from field: optional string region = 1; - */ - region?: string; - - /** - * @generated from field: optional string profile = 2; - */ - profile?: string; - - /** - * @generated from field: optional string roleArn = 3; - */ - roleArn?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Sigv4Config"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "region", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "profile", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "roleArn", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Sigv4Config { - return new Sigv4Config().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Sigv4Config { - return new Sigv4Config().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Sigv4Config { - return new Sigv4Config().fromJsonString(jsonString, options); - } - - static equals(a: Sigv4Config | PlainMessage | undefined, b: Sigv4Config | PlainMessage | undefined): boolean { - return proto2.util.equals(Sigv4Config, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.SkyWalkingMetric - */ -export class SkyWalkingMetric extends Message { - /** - * @generated from field: optional string address = 1; - */ - address?: string; - - /** - * @generated from field: optional string query = 2; - */ - query?: string; - - /** - * @generated from field: optional string interval = 3; - */ - interval?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.SkyWalkingMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "interval", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SkyWalkingMetric { - return new SkyWalkingMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SkyWalkingMetric { - return new SkyWalkingMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SkyWalkingMetric { - return new SkyWalkingMetric().fromJsonString(jsonString, options); - } - - static equals(a: SkyWalkingMetric | PlainMessage | undefined, b: SkyWalkingMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(SkyWalkingMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.ValueFrom - */ -export class ValueFrom extends Message { - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.SecretKeyRef secretKeyRef = 1; - */ - secretKeyRef?: SecretKeyRef; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.FieldRef fieldRef = 2; - */ - fieldRef?: FieldRef; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.ValueFrom"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "secretKeyRef", kind: "message", T: SecretKeyRef, opt: true }, - { no: 2, name: "fieldRef", kind: "message", T: FieldRef, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ValueFrom { - return new ValueFrom().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ValueFrom { - return new ValueFrom().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ValueFrom { - return new ValueFrom().fromJsonString(jsonString, options); - } - - static equals(a: ValueFrom | PlainMessage | undefined, b: ValueFrom | PlainMessage | undefined): boolean { - return proto2.util.equals(ValueFrom, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.WavefrontMetric - */ -export class WavefrontMetric extends Message { - /** - * @generated from field: optional string address = 1; - */ - address?: string; - - /** - * @generated from field: optional string query = 2; - */ - query?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.WavefrontMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): WavefrontMetric { - return new WavefrontMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): WavefrontMetric { - return new WavefrontMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): WavefrontMetric { - return new WavefrontMetric().fromJsonString(jsonString, options); - } - - static equals(a: WavefrontMetric | PlainMessage | undefined, b: WavefrontMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(WavefrontMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.WebMetric - */ -export class WebMetric extends Message { - /** - * @generated from field: optional string method = 1; - */ - method?: string; - - /** - * URL is the address of the web metric - * - * @generated from field: optional string url = 2; - */ - url?: string; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.WebMetricHeader headers = 3; - */ - headers: WebMetricHeader[] = []; - - /** - * @generated from field: optional string body = 4; - */ - body?: string; - - /** - * @generated from field: optional int64 timeoutSeconds = 5; - */ - timeoutSeconds?: bigint; - - /** - * @generated from field: optional string jsonPath = 6; - */ - jsonPath?: string; - - /** - * @generated from field: optional bool insecure = 7; - */ - insecure?: boolean; - - /** - * @generated from field: optional bytes jsonBody = 8; - */ - jsonBody?: Uint8Array; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Authentication authentication = 9; - */ - authentication?: Authentication; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.WebMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "method", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "headers", kind: "message", T: WebMetricHeader, repeated: true }, - { no: 4, name: "body", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "timeoutSeconds", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 6, name: "jsonPath", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 7, name: "insecure", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 8, name: "jsonBody", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 9, name: "authentication", kind: "message", T: Authentication, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): WebMetric { - return new WebMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): WebMetric { - return new WebMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): WebMetric { - return new WebMetric().fromJsonString(jsonString, options); - } - - static equals(a: WebMetric | PlainMessage | undefined, b: WebMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(WebMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.WebMetricHeader - */ -export class WebMetricHeader extends Message { - /** - * @generated from field: optional string key = 1; - */ - key?: string; - - /** - * @generated from field: optional string value = 2; - */ - value?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.WebMetricHeader"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): WebMetricHeader { - return new WebMetricHeader().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): WebMetricHeader { - return new WebMetricHeader().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): WebMetricHeader { - return new WebMetricHeader().fromJsonString(jsonString, options); - } - - static equals(a: WebMetricHeader | PlainMessage | undefined, b: WebMetricHeader | PlainMessage | undefined): boolean { - return proto2.util.equals(WebMetricHeader, a, b); - } -} - diff --git a/ui/src/gen/controller/rollouts/api/v1alpha1/generated_pb.ts b/ui/src/gen/controller/rollouts/api/v1alpha1/generated_pb.ts deleted file mode 100644 index 2f0f55104..000000000 --- a/ui/src/gen/controller/rollouts/api/v1alpha1/generated_pb.ts +++ /dev/null @@ -1,2217 +0,0 @@ -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" -// @generated from file controller/rollouts/api/v1alpha1/generated.proto (package github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1, syntax proto2) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto2 } from "@bufbuild/protobuf"; -import { ListMeta, ObjectMeta, Time } from "../../../../k8s.io/apimachinery/pkg/apis/meta/v1/generated_pb.js"; -import { IntOrString } from "../../../../k8s.io/apimachinery/pkg/util/intstr/generated_pb.js"; -import { JobSpec } from "../../../../k8s.io/api/batch/v1/generated_pb.js"; - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisRun - */ -export class AnalysisRun extends Message { - /** - * @generated from field: optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - */ - metadata?: ObjectMeta; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisRunSpec spec = 2; - */ - spec?: AnalysisRunSpec; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisRunStatus status = 3; - */ - status?: AnalysisRunStatus; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisRun"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metadata", kind: "message", T: ObjectMeta, opt: true }, - { no: 2, name: "spec", kind: "message", T: AnalysisRunSpec, opt: true }, - { no: 3, name: "status", kind: "message", T: AnalysisRunStatus, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnalysisRun { - return new AnalysisRun().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AnalysisRun { - return new AnalysisRun().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnalysisRun { - return new AnalysisRun().fromJsonString(jsonString, options); - } - - static equals(a: AnalysisRun | PlainMessage | undefined, b: AnalysisRun | PlainMessage | undefined): boolean { - return proto2.util.equals(AnalysisRun, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisRunList - */ -export class AnalysisRunList extends Message { - /** - * @generated from field: optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - */ - metadata?: ListMeta; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisRun items = 2; - */ - items: AnalysisRun[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisRunList"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metadata", kind: "message", T: ListMeta, opt: true }, - { no: 2, name: "items", kind: "message", T: AnalysisRun, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnalysisRunList { - return new AnalysisRunList().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AnalysisRunList { - return new AnalysisRunList().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnalysisRunList { - return new AnalysisRunList().fromJsonString(jsonString, options); - } - - static equals(a: AnalysisRunList | PlainMessage | undefined, b: AnalysisRunList | PlainMessage | undefined): boolean { - return proto2.util.equals(AnalysisRunList, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisRunSpec - */ -export class AnalysisRunSpec extends Message { - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Metric metrics = 1; - */ - metrics: Metric[] = []; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Argument args = 2; - */ - args: Argument[] = []; - - /** - * @generated from field: optional bool terminate = 3; - */ - terminate?: boolean; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.DryRun dryRun = 4; - */ - dryRun: DryRun[] = []; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.MeasurementRetention measurementRetention = 5; - */ - measurementRetention: MeasurementRetention[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisRunSpec"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metrics", kind: "message", T: Metric, repeated: true }, - { no: 2, name: "args", kind: "message", T: Argument, repeated: true }, - { no: 3, name: "terminate", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 4, name: "dryRun", kind: "message", T: DryRun, repeated: true }, - { no: 5, name: "measurementRetention", kind: "message", T: MeasurementRetention, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnalysisRunSpec { - return new AnalysisRunSpec().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AnalysisRunSpec { - return new AnalysisRunSpec().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnalysisRunSpec { - return new AnalysisRunSpec().fromJsonString(jsonString, options); - } - - static equals(a: AnalysisRunSpec | PlainMessage | undefined, b: AnalysisRunSpec | PlainMessage | undefined): boolean { - return proto2.util.equals(AnalysisRunSpec, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisRunStatus - */ -export class AnalysisRunStatus extends Message { - /** - * @generated from field: optional string phase = 1; - */ - phase?: string; - - /** - * @generated from field: optional string message = 2; - */ - message?: string; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.MetricResult metricResults = 3; - */ - metricResults: MetricResult[] = []; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startedAt = 4; - */ - startedAt?: Time; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.RunSummary runSummary = 5; - */ - runSummary?: RunSummary; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.RunSummary dryRunSummary = 6; - */ - dryRunSummary?: RunSummary; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisRunStatus"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "phase", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "metricResults", kind: "message", T: MetricResult, repeated: true }, - { no: 4, name: "startedAt", kind: "message", T: Time, opt: true }, - { no: 5, name: "runSummary", kind: "message", T: RunSummary, opt: true }, - { no: 6, name: "dryRunSummary", kind: "message", T: RunSummary, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnalysisRunStatus { - return new AnalysisRunStatus().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AnalysisRunStatus { - return new AnalysisRunStatus().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnalysisRunStatus { - return new AnalysisRunStatus().fromJsonString(jsonString, options); - } - - static equals(a: AnalysisRunStatus | PlainMessage | undefined, b: AnalysisRunStatus | PlainMessage | undefined): boolean { - return proto2.util.equals(AnalysisRunStatus, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisTemplate - */ -export class AnalysisTemplate extends Message { - /** - * @generated from field: optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - */ - metadata?: ObjectMeta; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisTemplateSpec spec = 2; - */ - spec?: AnalysisTemplateSpec; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisTemplate"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metadata", kind: "message", T: ObjectMeta, opt: true }, - { no: 2, name: "spec", kind: "message", T: AnalysisTemplateSpec, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnalysisTemplate { - return new AnalysisTemplate().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AnalysisTemplate { - return new AnalysisTemplate().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnalysisTemplate { - return new AnalysisTemplate().fromJsonString(jsonString, options); - } - - static equals(a: AnalysisTemplate | PlainMessage | undefined, b: AnalysisTemplate | PlainMessage | undefined): boolean { - return proto2.util.equals(AnalysisTemplate, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisTemplateList - */ -export class AnalysisTemplateList extends Message { - /** - * @generated from field: optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - */ - metadata?: ListMeta; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisTemplate items = 2; - */ - items: AnalysisTemplate[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisTemplateList"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metadata", kind: "message", T: ListMeta, opt: true }, - { no: 2, name: "items", kind: "message", T: AnalysisTemplate, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnalysisTemplateList { - return new AnalysisTemplateList().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AnalysisTemplateList { - return new AnalysisTemplateList().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnalysisTemplateList { - return new AnalysisTemplateList().fromJsonString(jsonString, options); - } - - static equals(a: AnalysisTemplateList | PlainMessage | undefined, b: AnalysisTemplateList | PlainMessage | undefined): boolean { - return proto2.util.equals(AnalysisTemplateList, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisTemplateSpec - */ -export class AnalysisTemplateSpec extends Message { - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Metric metrics = 1; - */ - metrics: Metric[] = []; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Argument args = 2; - */ - args: Argument[] = []; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.DryRun dryRun = 3; - */ - dryRun: DryRun[] = []; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.MeasurementRetention measurementRetention = 4; - */ - measurementRetention: MeasurementRetention[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.AnalysisTemplateSpec"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metrics", kind: "message", T: Metric, repeated: true }, - { no: 2, name: "args", kind: "message", T: Argument, repeated: true }, - { no: 3, name: "dryRun", kind: "message", T: DryRun, repeated: true }, - { no: 4, name: "measurementRetention", kind: "message", T: MeasurementRetention, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnalysisTemplateSpec { - return new AnalysisTemplateSpec().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AnalysisTemplateSpec { - return new AnalysisTemplateSpec().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnalysisTemplateSpec { - return new AnalysisTemplateSpec().fromJsonString(jsonString, options); - } - - static equals(a: AnalysisTemplateSpec | PlainMessage | undefined, b: AnalysisTemplateSpec | PlainMessage | undefined): boolean { - return proto2.util.equals(AnalysisTemplateSpec, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Argument - */ -export class Argument extends Message { - /** - * @generated from field: optional string name = 1; - */ - name?: string; - - /** - * @generated from field: optional string value = 2; - */ - value?: string; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.ValueFrom valueFrom = 3; - */ - valueFrom?: ValueFrom; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Argument"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "valueFrom", kind: "message", T: ValueFrom, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Argument { - return new Argument().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Argument { - return new Argument().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Argument { - return new Argument().fromJsonString(jsonString, options); - } - - static equals(a: Argument | PlainMessage | undefined, b: Argument | PlainMessage | undefined): boolean { - return proto2.util.equals(Argument, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Authentication - */ -export class Authentication extends Message { - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Sigv4Config sigv4 = 1; - */ - sigv4?: Sigv4Config; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.OAuth2Config oauth2 = 2; - */ - oauth2?: OAuth2Config; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Authentication"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "sigv4", kind: "message", T: Sigv4Config, opt: true }, - { no: 2, name: "oauth2", kind: "message", T: OAuth2Config, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Authentication { - return new Authentication().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Authentication { - return new Authentication().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Authentication { - return new Authentication().fromJsonString(jsonString, options); - } - - static equals(a: Authentication | PlainMessage | undefined, b: Authentication | PlainMessage | undefined): boolean { - return proto2.util.equals(Authentication, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetric - */ -export class CloudWatchMetric extends Message { - /** - * @generated from field: optional string interval = 1; - */ - interval?: string; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetricDataQuery metricDataQueries = 2; - */ - metricDataQueries: CloudWatchMetricDataQuery[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "interval", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "metricDataQueries", kind: "message", T: CloudWatchMetricDataQuery, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CloudWatchMetric { - return new CloudWatchMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CloudWatchMetric { - return new CloudWatchMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CloudWatchMetric { - return new CloudWatchMetric().fromJsonString(jsonString, options); - } - - static equals(a: CloudWatchMetric | PlainMessage | undefined, b: CloudWatchMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(CloudWatchMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetricDataQuery - */ -export class CloudWatchMetricDataQuery extends Message { - /** - * @generated from field: optional string id = 1; - */ - id?: string; - - /** - * @generated from field: optional string expression = 2; - */ - expression?: string; - - /** - * @generated from field: optional string label = 3; - */ - label?: string; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetricStat metricStat = 4; - */ - metricStat?: CloudWatchMetricStat; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.util.intstr.IntOrString period = 5; - */ - period?: IntOrString; - - /** - * @generated from field: optional bool returnData = 6; - */ - returnData?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetricDataQuery"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "expression", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "label", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "metricStat", kind: "message", T: CloudWatchMetricStat, opt: true }, - { no: 5, name: "period", kind: "message", T: IntOrString, opt: true }, - { no: 6, name: "returnData", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CloudWatchMetricDataQuery { - return new CloudWatchMetricDataQuery().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CloudWatchMetricDataQuery { - return new CloudWatchMetricDataQuery().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CloudWatchMetricDataQuery { - return new CloudWatchMetricDataQuery().fromJsonString(jsonString, options); - } - - static equals(a: CloudWatchMetricDataQuery | PlainMessage | undefined, b: CloudWatchMetricDataQuery | PlainMessage | undefined): boolean { - return proto2.util.equals(CloudWatchMetricDataQuery, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetricStat - */ -export class CloudWatchMetricStat extends Message { - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetricStatMetric metric = 1; - */ - metric?: CloudWatchMetricStatMetric; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.util.intstr.IntOrString period = 2; - */ - period?: IntOrString; - - /** - * @generated from field: optional string stat = 3; - */ - stat?: string; - - /** - * @generated from field: optional string unit = 4; - */ - unit?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetricStat"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metric", kind: "message", T: CloudWatchMetricStatMetric, opt: true }, - { no: 2, name: "period", kind: "message", T: IntOrString, opt: true }, - { no: 3, name: "stat", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "unit", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CloudWatchMetricStat { - return new CloudWatchMetricStat().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CloudWatchMetricStat { - return new CloudWatchMetricStat().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CloudWatchMetricStat { - return new CloudWatchMetricStat().fromJsonString(jsonString, options); - } - - static equals(a: CloudWatchMetricStat | PlainMessage | undefined, b: CloudWatchMetricStat | PlainMessage | undefined): boolean { - return proto2.util.equals(CloudWatchMetricStat, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetricStatMetric - */ -export class CloudWatchMetricStatMetric extends Message { - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetricStatMetricDimension dimensions = 1; - */ - dimensions: CloudWatchMetricStatMetricDimension[] = []; - - /** - * @generated from field: optional string metricName = 2; - */ - metricName?: string; - - /** - * @generated from field: optional string namespace = 3; - */ - namespace?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetricStatMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "dimensions", kind: "message", T: CloudWatchMetricStatMetricDimension, repeated: true }, - { no: 2, name: "metricName", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "namespace", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CloudWatchMetricStatMetric { - return new CloudWatchMetricStatMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CloudWatchMetricStatMetric { - return new CloudWatchMetricStatMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CloudWatchMetricStatMetric { - return new CloudWatchMetricStatMetric().fromJsonString(jsonString, options); - } - - static equals(a: CloudWatchMetricStatMetric | PlainMessage | undefined, b: CloudWatchMetricStatMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(CloudWatchMetricStatMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetricStatMetricDimension - */ -export class CloudWatchMetricStatMetricDimension extends Message { - /** - * @generated from field: optional string name = 1; - */ - name?: string; - - /** - * @generated from field: optional string value = 2; - */ - value?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetricStatMetricDimension"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CloudWatchMetricStatMetricDimension { - return new CloudWatchMetricStatMetricDimension().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CloudWatchMetricStatMetricDimension { - return new CloudWatchMetricStatMetricDimension().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CloudWatchMetricStatMetricDimension { - return new CloudWatchMetricStatMetricDimension().fromJsonString(jsonString, options); - } - - static equals(a: CloudWatchMetricStatMetricDimension | PlainMessage | undefined, b: CloudWatchMetricStatMetricDimension | PlainMessage | undefined): boolean { - return proto2.util.equals(CloudWatchMetricStatMetricDimension, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.DatadogMetric - */ -export class DatadogMetric extends Message { - /** - * @generated from field: optional string interval = 1; - */ - interval?: string; - - /** - * @generated from field: optional string query = 2; - */ - query?: string; - - /** - * @generated from field: map queries = 3; - */ - queries: { [key: string]: string } = {}; - - /** - * @generated from field: optional string formula = 4; - */ - formula?: string; - - /** - * @generated from field: optional string apiVersion = 5; - */ - apiVersion?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.DatadogMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "interval", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "queries", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - { no: 4, name: "formula", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "apiVersion", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DatadogMetric { - return new DatadogMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DatadogMetric { - return new DatadogMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DatadogMetric { - return new DatadogMetric().fromJsonString(jsonString, options); - } - - static equals(a: DatadogMetric | PlainMessage | undefined, b: DatadogMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(DatadogMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.DryRun - */ -export class DryRun extends Message { - /** - * @generated from field: optional string metricName = 1; - */ - metricName?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.DryRun"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metricName", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DryRun { - return new DryRun().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DryRun { - return new DryRun().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DryRun { - return new DryRun().fromJsonString(jsonString, options); - } - - static equals(a: DryRun | PlainMessage | undefined, b: DryRun | PlainMessage | undefined): boolean { - return proto2.util.equals(DryRun, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.FieldRef - */ -export class FieldRef extends Message { - /** - * Required: Path of the field to select in the specified API version - * - * @generated from field: optional string fieldPath = 1; - */ - fieldPath?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.FieldRef"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "fieldPath", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): FieldRef { - return new FieldRef().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): FieldRef { - return new FieldRef().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): FieldRef { - return new FieldRef().fromJsonString(jsonString, options); - } - - static equals(a: FieldRef | PlainMessage | undefined, b: FieldRef | PlainMessage | undefined): boolean { - return proto2.util.equals(FieldRef, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.GraphiteMetric - */ -export class GraphiteMetric extends Message { - /** - * @generated from field: optional string address = 1; - */ - address?: string; - - /** - * @generated from field: optional string query = 2; - */ - query?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.GraphiteMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GraphiteMetric { - return new GraphiteMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GraphiteMetric { - return new GraphiteMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GraphiteMetric { - return new GraphiteMetric().fromJsonString(jsonString, options); - } - - static equals(a: GraphiteMetric | PlainMessage | undefined, b: GraphiteMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(GraphiteMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.InfluxdbMetric - */ -export class InfluxdbMetric extends Message { - /** - * @generated from field: optional string profile = 1; - */ - profile?: string; - - /** - * @generated from field: optional string query = 2; - */ - query?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.InfluxdbMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "profile", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): InfluxdbMetric { - return new InfluxdbMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): InfluxdbMetric { - return new InfluxdbMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): InfluxdbMetric { - return new InfluxdbMetric().fromJsonString(jsonString, options); - } - - static equals(a: InfluxdbMetric | PlainMessage | undefined, b: InfluxdbMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(InfluxdbMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.JobMetric - */ -export class JobMetric extends Message { - /** - * @generated from field: optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - */ - metadata?: ObjectMeta; - - /** - * @generated from field: optional k8s.io.api.batch.v1.JobSpec spec = 2; - */ - spec?: JobSpec; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.JobMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metadata", kind: "message", T: ObjectMeta, opt: true }, - { no: 2, name: "spec", kind: "message", T: JobSpec, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JobMetric { - return new JobMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JobMetric { - return new JobMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JobMetric { - return new JobMetric().fromJsonString(jsonString, options); - } - - static equals(a: JobMetric | PlainMessage | undefined, b: JobMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(JobMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.KayentaMetric - */ -export class KayentaMetric extends Message { - /** - * @generated from field: optional string address = 1; - */ - address?: string; - - /** - * @generated from field: optional string application = 2; - */ - application?: string; - - /** - * @generated from field: optional string canaryConfigName = 3; - */ - canaryConfigName?: string; - - /** - * @generated from field: optional string metricsAccountName = 4; - */ - metricsAccountName?: string; - - /** - * @generated from field: optional string configurationAccountName = 5; - */ - configurationAccountName?: string; - - /** - * @generated from field: optional string storageAccountName = 6; - */ - storageAccountName?: string; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.KayentaThreshold threshold = 7; - */ - threshold?: KayentaThreshold; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.KayentaScope scopes = 8; - */ - scopes: KayentaScope[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.KayentaMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "application", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "canaryConfigName", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "metricsAccountName", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "configurationAccountName", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 6, name: "storageAccountName", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 7, name: "threshold", kind: "message", T: KayentaThreshold, opt: true }, - { no: 8, name: "scopes", kind: "message", T: KayentaScope, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): KayentaMetric { - return new KayentaMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): KayentaMetric { - return new KayentaMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): KayentaMetric { - return new KayentaMetric().fromJsonString(jsonString, options); - } - - static equals(a: KayentaMetric | PlainMessage | undefined, b: KayentaMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(KayentaMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.KayentaScope - */ -export class KayentaScope extends Message { - /** - * @generated from field: optional string name = 1; - */ - name?: string; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.ScopeDetail controlScope = 2; - */ - controlScope?: ScopeDetail; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.ScopeDetail experimentScope = 3; - */ - experimentScope?: ScopeDetail; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.KayentaScope"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "controlScope", kind: "message", T: ScopeDetail, opt: true }, - { no: 3, name: "experimentScope", kind: "message", T: ScopeDetail, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): KayentaScope { - return new KayentaScope().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): KayentaScope { - return new KayentaScope().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): KayentaScope { - return new KayentaScope().fromJsonString(jsonString, options); - } - - static equals(a: KayentaScope | PlainMessage | undefined, b: KayentaScope | PlainMessage | undefined): boolean { - return proto2.util.equals(KayentaScope, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.KayentaThreshold - */ -export class KayentaThreshold extends Message { - /** - * @generated from field: optional int64 pass = 1; - */ - pass?: bigint; - - /** - * @generated from field: optional int64 marginal = 2; - */ - marginal?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.KayentaThreshold"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "pass", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 2, name: "marginal", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): KayentaThreshold { - return new KayentaThreshold().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): KayentaThreshold { - return new KayentaThreshold().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): KayentaThreshold { - return new KayentaThreshold().fromJsonString(jsonString, options); - } - - static equals(a: KayentaThreshold | PlainMessage | undefined, b: KayentaThreshold | PlainMessage | undefined): boolean { - return proto2.util.equals(KayentaThreshold, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Measurement - */ -export class Measurement extends Message { - /** - * @generated from field: optional string phase = 1; - */ - phase?: string; - - /** - * @generated from field: optional string message = 2; - */ - message?: string; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startedAt = 3; - */ - startedAt?: Time; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.apis.meta.v1.Time finishedAt = 4; - */ - finishedAt?: Time; - - /** - * @generated from field: optional string value = 5; - */ - value?: string; - - /** - * @generated from field: map metadata = 6; - */ - metadata: { [key: string]: string } = {}; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.apis.meta.v1.Time resumeAt = 7; - */ - resumeAt?: Time; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Measurement"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "phase", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "startedAt", kind: "message", T: Time, opt: true }, - { no: 4, name: "finishedAt", kind: "message", T: Time, opt: true }, - { no: 5, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 6, name: "metadata", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - { no: 7, name: "resumeAt", kind: "message", T: Time, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Measurement { - return new Measurement().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Measurement { - return new Measurement().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Measurement { - return new Measurement().fromJsonString(jsonString, options); - } - - static equals(a: Measurement | PlainMessage | undefined, b: Measurement | PlainMessage | undefined): boolean { - return proto2.util.equals(Measurement, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.MeasurementRetention - */ -export class MeasurementRetention extends Message { - /** - * @generated from field: optional string metricName = 1; - */ - metricName?: string; - - /** - * @generated from field: optional int32 limit = 2; - */ - limit?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.MeasurementRetention"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metricName", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "limit", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MeasurementRetention { - return new MeasurementRetention().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MeasurementRetention { - return new MeasurementRetention().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MeasurementRetention { - return new MeasurementRetention().fromJsonString(jsonString, options); - } - - static equals(a: MeasurementRetention | PlainMessage | undefined, b: MeasurementRetention | PlainMessage | undefined): boolean { - return proto2.util.equals(MeasurementRetention, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Metric - */ -export class Metric extends Message { - /** - * @generated from field: optional string name = 1; - */ - name?: string; - - /** - * @generated from field: optional string interval = 2; - */ - interval?: string; - - /** - * @generated from field: optional string initialDelay = 3; - */ - initialDelay?: string; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.util.intstr.IntOrString count = 4; - */ - count?: IntOrString; - - /** - * @generated from field: optional string successCondition = 5; - */ - successCondition?: string; - - /** - * @generated from field: optional string failureCondition = 6; - */ - failureCondition?: string; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.util.intstr.IntOrString failureLimit = 7; - */ - failureLimit?: IntOrString; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.util.intstr.IntOrString inconclusiveLimit = 8; - */ - inconclusiveLimit?: IntOrString; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.util.intstr.IntOrString consecutiveErrorLimit = 9; - */ - consecutiveErrorLimit?: IntOrString; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.MetricProvider provider = 10; - */ - provider?: MetricProvider; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Metric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "interval", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "initialDelay", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "count", kind: "message", T: IntOrString, opt: true }, - { no: 5, name: "successCondition", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 6, name: "failureCondition", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 7, name: "failureLimit", kind: "message", T: IntOrString, opt: true }, - { no: 8, name: "inconclusiveLimit", kind: "message", T: IntOrString, opt: true }, - { no: 9, name: "consecutiveErrorLimit", kind: "message", T: IntOrString, opt: true }, - { no: 10, name: "provider", kind: "message", T: MetricProvider, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Metric { - return new Metric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Metric { - return new Metric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Metric { - return new Metric().fromJsonString(jsonString, options); - } - - static equals(a: Metric | PlainMessage | undefined, b: Metric | PlainMessage | undefined): boolean { - return proto2.util.equals(Metric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.MetricProvider - */ -export class MetricProvider extends Message { - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.PrometheusMetric prometheus = 1; - */ - prometheus?: PrometheusMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.KayentaMetric kayenta = 2; - */ - kayenta?: KayentaMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.WebMetric web = 3; - */ - web?: WebMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.DatadogMetric datadog = 4; - */ - datadog?: DatadogMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.WavefrontMetric wavefront = 5; - */ - wavefront?: WavefrontMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.NewRelicMetric newRelic = 6; - */ - newRelic?: NewRelicMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.JobMetric job = 7; - */ - job?: JobMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.CloudWatchMetric cloudWatch = 8; - */ - cloudWatch?: CloudWatchMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.GraphiteMetric graphite = 9; - */ - graphite?: GraphiteMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.InfluxdbMetric influxdb = 10; - */ - influxdb?: InfluxdbMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.SkyWalkingMetric skywalking = 11; - */ - skywalking?: SkyWalkingMetric; - - /** - * @generated from field: map plugin = 12; - */ - plugin: { [key: string]: Uint8Array } = {}; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.MetricProvider"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "prometheus", kind: "message", T: PrometheusMetric, opt: true }, - { no: 2, name: "kayenta", kind: "message", T: KayentaMetric, opt: true }, - { no: 3, name: "web", kind: "message", T: WebMetric, opt: true }, - { no: 4, name: "datadog", kind: "message", T: DatadogMetric, opt: true }, - { no: 5, name: "wavefront", kind: "message", T: WavefrontMetric, opt: true }, - { no: 6, name: "newRelic", kind: "message", T: NewRelicMetric, opt: true }, - { no: 7, name: "job", kind: "message", T: JobMetric, opt: true }, - { no: 8, name: "cloudWatch", kind: "message", T: CloudWatchMetric, opt: true }, - { no: 9, name: "graphite", kind: "message", T: GraphiteMetric, opt: true }, - { no: 10, name: "influxdb", kind: "message", T: InfluxdbMetric, opt: true }, - { no: 11, name: "skywalking", kind: "message", T: SkyWalkingMetric, opt: true }, - { no: 12, name: "plugin", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 12 /* ScalarType.BYTES */} }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MetricProvider { - return new MetricProvider().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MetricProvider { - return new MetricProvider().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MetricProvider { - return new MetricProvider().fromJsonString(jsonString, options); - } - - static equals(a: MetricProvider | PlainMessage | undefined, b: MetricProvider | PlainMessage | undefined): boolean { - return proto2.util.equals(MetricProvider, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.MetricResult - */ -export class MetricResult extends Message { - /** - * @generated from field: optional string name = 1; - */ - name?: string; - - /** - * @generated from field: optional string phase = 2; - */ - phase?: string; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Measurement measurements = 3; - */ - measurements: Measurement[] = []; - - /** - * @generated from field: optional string message = 4; - */ - message?: string; - - /** - * @generated from field: optional int32 count = 5; - */ - count?: number; - - /** - * @generated from field: optional int32 successful = 6; - */ - successful?: number; - - /** - * @generated from field: optional int32 failed = 7; - */ - failed?: number; - - /** - * @generated from field: optional int32 inconclusive = 8; - */ - inconclusive?: number; - - /** - * @generated from field: optional int32 error = 9; - */ - error?: number; - - /** - * @generated from field: optional int32 consecutiveError = 10; - */ - consecutiveError?: number; - - /** - * @generated from field: optional bool dryRun = 11; - */ - dryRun?: boolean; - - /** - * @generated from field: map metadata = 12; - */ - metadata: { [key: string]: string } = {}; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.MetricResult"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "phase", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "measurements", kind: "message", T: Measurement, repeated: true }, - { no: 4, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "count", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 6, name: "successful", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 7, name: "failed", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 8, name: "inconclusive", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 9, name: "error", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 10, name: "consecutiveError", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 11, name: "dryRun", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 12, name: "metadata", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MetricResult { - return new MetricResult().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MetricResult { - return new MetricResult().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MetricResult { - return new MetricResult().fromJsonString(jsonString, options); - } - - static equals(a: MetricResult | PlainMessage | undefined, b: MetricResult | PlainMessage | undefined): boolean { - return proto2.util.equals(MetricResult, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.NewRelicMetric - */ -export class NewRelicMetric extends Message { - /** - * @generated from field: optional string profile = 1; - */ - profile?: string; - - /** - * @generated from field: optional string query = 2; - */ - query?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.NewRelicMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "profile", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): NewRelicMetric { - return new NewRelicMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): NewRelicMetric { - return new NewRelicMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): NewRelicMetric { - return new NewRelicMetric().fromJsonString(jsonString, options); - } - - static equals(a: NewRelicMetric | PlainMessage | undefined, b: NewRelicMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(NewRelicMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.OAuth2Config - */ -export class OAuth2Config extends Message { - /** - * @generated from field: optional string tokenUrl = 1; - */ - tokenUrl?: string; - - /** - * @generated from field: optional string clientId = 2; - */ - clientId?: string; - - /** - * @generated from field: optional string clientSecret = 3; - */ - clientSecret?: string; - - /** - * @generated from field: repeated string scopes = 4; - */ - scopes: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.OAuth2Config"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "tokenUrl", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "clientId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "clientSecret", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "scopes", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): OAuth2Config { - return new OAuth2Config().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): OAuth2Config { - return new OAuth2Config().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): OAuth2Config { - return new OAuth2Config().fromJsonString(jsonString, options); - } - - static equals(a: OAuth2Config | PlainMessage | undefined, b: OAuth2Config | PlainMessage | undefined): boolean { - return proto2.util.equals(OAuth2Config, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.PrometheusMetric - */ -export class PrometheusMetric extends Message { - /** - * @generated from field: optional string address = 1; - */ - address?: string; - - /** - * @generated from field: optional string query = 2; - */ - query?: string; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Authentication authentication = 3; - */ - authentication?: Authentication; - - /** - * @generated from field: optional int64 timeout = 4; - */ - timeout?: bigint; - - /** - * @generated from field: optional bool insecure = 5; - */ - insecure?: boolean; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.WebMetricHeader headers = 6; - */ - headers: WebMetricHeader[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.PrometheusMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "authentication", kind: "message", T: Authentication, opt: true }, - { no: 4, name: "timeout", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 5, name: "insecure", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 6, name: "headers", kind: "message", T: WebMetricHeader, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PrometheusMetric { - return new PrometheusMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PrometheusMetric { - return new PrometheusMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PrometheusMetric { - return new PrometheusMetric().fromJsonString(jsonString, options); - } - - static equals(a: PrometheusMetric | PlainMessage | undefined, b: PrometheusMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(PrometheusMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.RunSummary - */ -export class RunSummary extends Message { - /** - * @generated from field: optional int32 count = 1; - */ - count?: number; - - /** - * @generated from field: optional int32 successful = 2; - */ - successful?: number; - - /** - * @generated from field: optional int32 failed = 3; - */ - failed?: number; - - /** - * @generated from field: optional int32 inconclusive = 4; - */ - inconclusive?: number; - - /** - * @generated from field: optional int32 error = 5; - */ - error?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.RunSummary"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "count", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 2, name: "successful", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 3, name: "failed", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 4, name: "inconclusive", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 5, name: "error", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RunSummary { - return new RunSummary().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RunSummary { - return new RunSummary().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RunSummary { - return new RunSummary().fromJsonString(jsonString, options); - } - - static equals(a: RunSummary | PlainMessage | undefined, b: RunSummary | PlainMessage | undefined): boolean { - return proto2.util.equals(RunSummary, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.ScopeDetail - */ -export class ScopeDetail extends Message { - /** - * @generated from field: optional string scope = 1; - */ - scope?: string; - - /** - * @generated from field: optional string region = 2; - */ - region?: string; - - /** - * @generated from field: optional int64 step = 3; - */ - step?: bigint; - - /** - * @generated from field: optional string start = 4; - */ - start?: string; - - /** - * @generated from field: optional string end = 5; - */ - end?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.ScopeDetail"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "scope", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "region", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "step", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 4, name: "start", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "end", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ScopeDetail { - return new ScopeDetail().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ScopeDetail { - return new ScopeDetail().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ScopeDetail { - return new ScopeDetail().fromJsonString(jsonString, options); - } - - static equals(a: ScopeDetail | PlainMessage | undefined, b: ScopeDetail | PlainMessage | undefined): boolean { - return proto2.util.equals(ScopeDetail, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.SecretKeyRef - */ -export class SecretKeyRef extends Message { - /** - * @generated from field: optional string name = 1; - */ - name?: string; - - /** - * @generated from field: optional string key = 2; - */ - key?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.SecretKeyRef"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SecretKeyRef { - return new SecretKeyRef().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SecretKeyRef { - return new SecretKeyRef().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SecretKeyRef { - return new SecretKeyRef().fromJsonString(jsonString, options); - } - - static equals(a: SecretKeyRef | PlainMessage | undefined, b: SecretKeyRef | PlainMessage | undefined): boolean { - return proto2.util.equals(SecretKeyRef, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Sigv4Config - */ -export class Sigv4Config extends Message { - /** - * @generated from field: optional string region = 1; - */ - region?: string; - - /** - * @generated from field: optional string profile = 2; - */ - profile?: string; - - /** - * @generated from field: optional string roleArn = 3; - */ - roleArn?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Sigv4Config"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "region", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "profile", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "roleArn", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Sigv4Config { - return new Sigv4Config().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Sigv4Config { - return new Sigv4Config().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Sigv4Config { - return new Sigv4Config().fromJsonString(jsonString, options); - } - - static equals(a: Sigv4Config | PlainMessage | undefined, b: Sigv4Config | PlainMessage | undefined): boolean { - return proto2.util.equals(Sigv4Config, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.SkyWalkingMetric - */ -export class SkyWalkingMetric extends Message { - /** - * @generated from field: optional string address = 1; - */ - address?: string; - - /** - * @generated from field: optional string query = 2; - */ - query?: string; - - /** - * @generated from field: optional string interval = 3; - */ - interval?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.SkyWalkingMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "interval", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SkyWalkingMetric { - return new SkyWalkingMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SkyWalkingMetric { - return new SkyWalkingMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SkyWalkingMetric { - return new SkyWalkingMetric().fromJsonString(jsonString, options); - } - - static equals(a: SkyWalkingMetric | PlainMessage | undefined, b: SkyWalkingMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(SkyWalkingMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.ValueFrom - */ -export class ValueFrom extends Message { - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.SecretKeyRef secretKeyRef = 1; - */ - secretKeyRef?: SecretKeyRef; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.FieldRef fieldRef = 2; - */ - fieldRef?: FieldRef; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.ValueFrom"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "secretKeyRef", kind: "message", T: SecretKeyRef, opt: true }, - { no: 2, name: "fieldRef", kind: "message", T: FieldRef, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ValueFrom { - return new ValueFrom().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ValueFrom { - return new ValueFrom().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ValueFrom { - return new ValueFrom().fromJsonString(jsonString, options); - } - - static equals(a: ValueFrom | PlainMessage | undefined, b: ValueFrom | PlainMessage | undefined): boolean { - return proto2.util.equals(ValueFrom, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.WavefrontMetric - */ -export class WavefrontMetric extends Message { - /** - * @generated from field: optional string address = 1; - */ - address?: string; - - /** - * @generated from field: optional string query = 2; - */ - query?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.WavefrontMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): WavefrontMetric { - return new WavefrontMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): WavefrontMetric { - return new WavefrontMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): WavefrontMetric { - return new WavefrontMetric().fromJsonString(jsonString, options); - } - - static equals(a: WavefrontMetric | PlainMessage | undefined, b: WavefrontMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(WavefrontMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.WebMetric - */ -export class WebMetric extends Message { - /** - * @generated from field: optional string method = 1; - */ - method?: string; - - /** - * URL is the address of the web metric - * - * @generated from field: optional string url = 2; - */ - url?: string; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.WebMetricHeader headers = 3; - */ - headers: WebMetricHeader[] = []; - - /** - * @generated from field: optional string body = 4; - */ - body?: string; - - /** - * @generated from field: optional int64 timeoutSeconds = 5; - */ - timeoutSeconds?: bigint; - - /** - * @generated from field: optional string jsonPath = 6; - */ - jsonPath?: string; - - /** - * @generated from field: optional bool insecure = 7; - */ - insecure?: boolean; - - /** - * @generated from field: optional bytes jsonBody = 8; - */ - jsonBody?: Uint8Array; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.Authentication authentication = 9; - */ - authentication?: Authentication; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.WebMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "method", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "headers", kind: "message", T: WebMetricHeader, repeated: true }, - { no: 4, name: "body", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "timeoutSeconds", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 6, name: "jsonPath", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 7, name: "insecure", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 8, name: "jsonBody", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 9, name: "authentication", kind: "message", T: Authentication, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): WebMetric { - return new WebMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): WebMetric { - return new WebMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): WebMetric { - return new WebMetric().fromJsonString(jsonString, options); - } - - static equals(a: WebMetric | PlainMessage | undefined, b: WebMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(WebMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.WebMetricHeader - */ -export class WebMetricHeader extends Message { - /** - * @generated from field: optional string key = 1; - */ - key?: string; - - /** - * @generated from field: optional string value = 2; - */ - value?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.api.v1alpha1.WebMetricHeader"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): WebMetricHeader { - return new WebMetricHeader().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): WebMetricHeader { - return new WebMetricHeader().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): WebMetricHeader { - return new WebMetricHeader().fromJsonString(jsonString, options); - } - - static equals(a: WebMetricHeader | PlainMessage | undefined, b: WebMetricHeader | PlainMessage | undefined): boolean { - return proto2.util.equals(WebMetricHeader, a, b); - } -} - diff --git a/ui/src/gen/rbac/generated_pb.ts b/ui/src/gen/rbac/generated_pb.ts deleted file mode 100644 index 54410d2e7..000000000 --- a/ui/src/gen/rbac/generated_pb.ts +++ /dev/null @@ -1,135 +0,0 @@ -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" -// @generated from file rbac/generated.proto (package github.com.akuity.kargo.internal.api.rbac, syntax proto2) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto2 } from "@bufbuild/protobuf"; -import { ObjectMeta } from "../k8s.io/apimachinery/pkg/apis/meta/v1/generated_pb.js"; -import { PolicyRule, Role as Role$1, RoleBinding } from "../k8s.io/api/rbac/v1/generated_pb.js"; -import { ServiceAccount } from "../k8s.io/api/core/v1/generated_pb.js"; - -/** - * @generated from message github.com.akuity.kargo.internal.api.rbac.Role - */ -export class Role extends Message { - /** - * @generated from field: optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - */ - metadata?: ObjectMeta; - - /** - * @generated from field: optional bool kargoManaged = 2; - */ - kargoManaged?: boolean; - - /** - * @generated from field: repeated string subs = 3; - */ - subs: string[] = []; - - /** - * @generated from field: repeated string emails = 4; - */ - emails: string[] = []; - - /** - * @generated from field: repeated string groups = 5; - */ - groups: string[] = []; - - /** - * @generated from field: repeated k8s.io.api.rbac.v1.PolicyRule rules = 6; - */ - rules: PolicyRule[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.api.rbac.Role"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metadata", kind: "message", T: ObjectMeta, opt: true }, - { no: 2, name: "kargoManaged", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 3, name: "subs", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 4, name: "emails", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 5, name: "groups", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 6, name: "rules", kind: "message", T: PolicyRule, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Role { - return new Role().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Role { - return new Role().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Role { - return new Role().fromJsonString(jsonString, options); - } - - static equals(a: Role | PlainMessage | undefined, b: Role | PlainMessage | undefined): boolean { - return proto2.util.equals(Role, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.api.rbac.RoleResources - */ -export class RoleResources extends Message { - /** - * @generated from field: optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - */ - metadata?: ObjectMeta; - - /** - * @generated from field: optional k8s.io.api.core.v1.ServiceAccount serviceAccount = 2; - */ - serviceAccount?: ServiceAccount; - - /** - * @generated from field: repeated k8s.io.api.rbac.v1.Role roles = 3; - */ - roles: Role$1[] = []; - - /** - * @generated from field: repeated k8s.io.api.rbac.v1.RoleBinding roleBindings = 4; - */ - roleBindings: RoleBinding[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.api.rbac.RoleResources"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metadata", kind: "message", T: ObjectMeta, opt: true }, - { no: 2, name: "serviceAccount", kind: "message", T: ServiceAccount, opt: true }, - { no: 3, name: "roles", kind: "message", T: Role$1, repeated: true }, - { no: 4, name: "roleBindings", kind: "message", T: RoleBinding, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RoleResources { - return new RoleResources().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RoleResources { - return new RoleResources().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RoleResources { - return new RoleResources().fromJsonString(jsonString, options); - } - - static equals(a: RoleResources | PlainMessage | undefined, b: RoleResources | PlainMessage | undefined): boolean { - return proto2.util.equals(RoleResources, a, b); - } -} - diff --git a/ui/src/gen/rbac/v1alpha1/generated_pb.ts b/ui/src/gen/rbac/v1alpha1/generated_pb.ts index 021d57820..2f15f59c1 100644 --- a/ui/src/gen/rbac/v1alpha1/generated_pb.ts +++ b/ui/src/gen/rbac/v1alpha1/generated_pb.ts @@ -16,22 +16,17 @@ import { ServiceAccount } from "../../k8s.io/api/core/v1/generated_pb.js"; */ export class ResourceDetails extends Message { /** - * @generated from field: optional string resourceGroup = 1; - */ - resourceGroup?: string; - - /** - * @generated from field: optional string resourceType = 2; + * @generated from field: optional string resourceType = 1; */ resourceType?: string; /** - * @generated from field: optional string resourceName = 3; + * @generated from field: optional string resourceName = 2; */ resourceName?: string; /** - * @generated from field: repeated string verbs = 4; + * @generated from field: repeated string verbs = 3; */ verbs: string[] = []; @@ -43,10 +38,9 @@ export class ResourceDetails extends Message { static readonly runtime: typeof proto2 = proto2; static readonly typeName = "github.com.akuity.kargo.api.rbac.v1alpha1.ResourceDetails"; static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "resourceGroup", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "resourceType", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "resourceName", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "verbs", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, + { no: 1, name: "resourceType", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 2, name: "resourceName", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, + { no: 3, name: "verbs", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, ]); static fromBinary(bytes: Uint8Array, options?: Partial): ResourceDetails { diff --git a/ui/src/gen/rollouts/v1alpha1/generated_pb.ts b/ui/src/gen/rollouts/v1alpha1/generated_pb.ts deleted file mode 100644 index c2b0a3e2c..000000000 --- a/ui/src/gen/rollouts/v1alpha1/generated_pb.ts +++ /dev/null @@ -1,2217 +0,0 @@ -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -// @generated by protoc-gen-es v1.8.0 with parameter "target=ts" -// @generated from file rollouts/api/v1alpha1/generated.proto (package github.com.akuity.kargo.internal.controller.rollouts.v1alpha1, syntax proto2) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto2 } from "@bufbuild/protobuf"; -import { ListMeta, ObjectMeta, Time } from "../../k8s.io/apimachinery/pkg/apis/meta/v1/generated_pb.js"; -import { IntOrString } from "../../k8s.io/apimachinery/pkg/util/intstr/generated_pb.js"; -import { JobSpec } from "../../k8s.io/api/batch/v1/generated_pb.js"; - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.AnalysisRun - */ -export class AnalysisRun extends Message { - /** - * @generated from field: optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - */ - metadata?: ObjectMeta; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.AnalysisRunSpec spec = 2; - */ - spec?: AnalysisRunSpec; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.AnalysisRunStatus status = 3; - */ - status?: AnalysisRunStatus; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.AnalysisRun"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metadata", kind: "message", T: ObjectMeta, opt: true }, - { no: 2, name: "spec", kind: "message", T: AnalysisRunSpec, opt: true }, - { no: 3, name: "status", kind: "message", T: AnalysisRunStatus, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnalysisRun { - return new AnalysisRun().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AnalysisRun { - return new AnalysisRun().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnalysisRun { - return new AnalysisRun().fromJsonString(jsonString, options); - } - - static equals(a: AnalysisRun | PlainMessage | undefined, b: AnalysisRun | PlainMessage | undefined): boolean { - return proto2.util.equals(AnalysisRun, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.AnalysisRunList - */ -export class AnalysisRunList extends Message { - /** - * @generated from field: optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - */ - metadata?: ListMeta; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.AnalysisRun items = 2; - */ - items: AnalysisRun[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.AnalysisRunList"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metadata", kind: "message", T: ListMeta, opt: true }, - { no: 2, name: "items", kind: "message", T: AnalysisRun, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnalysisRunList { - return new AnalysisRunList().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AnalysisRunList { - return new AnalysisRunList().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnalysisRunList { - return new AnalysisRunList().fromJsonString(jsonString, options); - } - - static equals(a: AnalysisRunList | PlainMessage | undefined, b: AnalysisRunList | PlainMessage | undefined): boolean { - return proto2.util.equals(AnalysisRunList, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.AnalysisRunSpec - */ -export class AnalysisRunSpec extends Message { - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.Metric metrics = 1; - */ - metrics: Metric[] = []; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.Argument args = 2; - */ - args: Argument[] = []; - - /** - * @generated from field: optional bool terminate = 3; - */ - terminate?: boolean; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.DryRun dryRun = 4; - */ - dryRun: DryRun[] = []; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.MeasurementRetention measurementRetention = 5; - */ - measurementRetention: MeasurementRetention[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.AnalysisRunSpec"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metrics", kind: "message", T: Metric, repeated: true }, - { no: 2, name: "args", kind: "message", T: Argument, repeated: true }, - { no: 3, name: "terminate", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 4, name: "dryRun", kind: "message", T: DryRun, repeated: true }, - { no: 5, name: "measurementRetention", kind: "message", T: MeasurementRetention, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnalysisRunSpec { - return new AnalysisRunSpec().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AnalysisRunSpec { - return new AnalysisRunSpec().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnalysisRunSpec { - return new AnalysisRunSpec().fromJsonString(jsonString, options); - } - - static equals(a: AnalysisRunSpec | PlainMessage | undefined, b: AnalysisRunSpec | PlainMessage | undefined): boolean { - return proto2.util.equals(AnalysisRunSpec, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.AnalysisRunStatus - */ -export class AnalysisRunStatus extends Message { - /** - * @generated from field: optional string phase = 1; - */ - phase?: string; - - /** - * @generated from field: optional string message = 2; - */ - message?: string; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.MetricResult metricResults = 3; - */ - metricResults: MetricResult[] = []; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startedAt = 4; - */ - startedAt?: Time; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.RunSummary runSummary = 5; - */ - runSummary?: RunSummary; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.RunSummary dryRunSummary = 6; - */ - dryRunSummary?: RunSummary; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.AnalysisRunStatus"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "phase", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "metricResults", kind: "message", T: MetricResult, repeated: true }, - { no: 4, name: "startedAt", kind: "message", T: Time, opt: true }, - { no: 5, name: "runSummary", kind: "message", T: RunSummary, opt: true }, - { no: 6, name: "dryRunSummary", kind: "message", T: RunSummary, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnalysisRunStatus { - return new AnalysisRunStatus().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AnalysisRunStatus { - return new AnalysisRunStatus().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnalysisRunStatus { - return new AnalysisRunStatus().fromJsonString(jsonString, options); - } - - static equals(a: AnalysisRunStatus | PlainMessage | undefined, b: AnalysisRunStatus | PlainMessage | undefined): boolean { - return proto2.util.equals(AnalysisRunStatus, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.AnalysisTemplate - */ -export class AnalysisTemplate extends Message { - /** - * @generated from field: optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - */ - metadata?: ObjectMeta; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.AnalysisTemplateSpec spec = 2; - */ - spec?: AnalysisTemplateSpec; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.AnalysisTemplate"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metadata", kind: "message", T: ObjectMeta, opt: true }, - { no: 2, name: "spec", kind: "message", T: AnalysisTemplateSpec, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnalysisTemplate { - return new AnalysisTemplate().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AnalysisTemplate { - return new AnalysisTemplate().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnalysisTemplate { - return new AnalysisTemplate().fromJsonString(jsonString, options); - } - - static equals(a: AnalysisTemplate | PlainMessage | undefined, b: AnalysisTemplate | PlainMessage | undefined): boolean { - return proto2.util.equals(AnalysisTemplate, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.AnalysisTemplateList - */ -export class AnalysisTemplateList extends Message { - /** - * @generated from field: optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - */ - metadata?: ListMeta; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.AnalysisTemplate items = 2; - */ - items: AnalysisTemplate[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.AnalysisTemplateList"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metadata", kind: "message", T: ListMeta, opt: true }, - { no: 2, name: "items", kind: "message", T: AnalysisTemplate, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnalysisTemplateList { - return new AnalysisTemplateList().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AnalysisTemplateList { - return new AnalysisTemplateList().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnalysisTemplateList { - return new AnalysisTemplateList().fromJsonString(jsonString, options); - } - - static equals(a: AnalysisTemplateList | PlainMessage | undefined, b: AnalysisTemplateList | PlainMessage | undefined): boolean { - return proto2.util.equals(AnalysisTemplateList, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.AnalysisTemplateSpec - */ -export class AnalysisTemplateSpec extends Message { - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.Metric metrics = 1; - */ - metrics: Metric[] = []; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.Argument args = 2; - */ - args: Argument[] = []; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.DryRun dryRun = 3; - */ - dryRun: DryRun[] = []; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.MeasurementRetention measurementRetention = 4; - */ - measurementRetention: MeasurementRetention[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.AnalysisTemplateSpec"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metrics", kind: "message", T: Metric, repeated: true }, - { no: 2, name: "args", kind: "message", T: Argument, repeated: true }, - { no: 3, name: "dryRun", kind: "message", T: DryRun, repeated: true }, - { no: 4, name: "measurementRetention", kind: "message", T: MeasurementRetention, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnalysisTemplateSpec { - return new AnalysisTemplateSpec().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AnalysisTemplateSpec { - return new AnalysisTemplateSpec().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnalysisTemplateSpec { - return new AnalysisTemplateSpec().fromJsonString(jsonString, options); - } - - static equals(a: AnalysisTemplateSpec | PlainMessage | undefined, b: AnalysisTemplateSpec | PlainMessage | undefined): boolean { - return proto2.util.equals(AnalysisTemplateSpec, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.Argument - */ -export class Argument extends Message { - /** - * @generated from field: optional string name = 1; - */ - name?: string; - - /** - * @generated from field: optional string value = 2; - */ - value?: string; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.ValueFrom valueFrom = 3; - */ - valueFrom?: ValueFrom; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.Argument"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "valueFrom", kind: "message", T: ValueFrom, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Argument { - return new Argument().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Argument { - return new Argument().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Argument { - return new Argument().fromJsonString(jsonString, options); - } - - static equals(a: Argument | PlainMessage | undefined, b: Argument | PlainMessage | undefined): boolean { - return proto2.util.equals(Argument, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.Authentication - */ -export class Authentication extends Message { - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.Sigv4Config sigv4 = 1; - */ - sigv4?: Sigv4Config; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.OAuth2Config oauth2 = 2; - */ - oauth2?: OAuth2Config; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.Authentication"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "sigv4", kind: "message", T: Sigv4Config, opt: true }, - { no: 2, name: "oauth2", kind: "message", T: OAuth2Config, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Authentication { - return new Authentication().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Authentication { - return new Authentication().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Authentication { - return new Authentication().fromJsonString(jsonString, options); - } - - static equals(a: Authentication | PlainMessage | undefined, b: Authentication | PlainMessage | undefined): boolean { - return proto2.util.equals(Authentication, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.CloudWatchMetric - */ -export class CloudWatchMetric extends Message { - /** - * @generated from field: optional string interval = 1; - */ - interval?: string; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.CloudWatchMetricDataQuery metricDataQueries = 2; - */ - metricDataQueries: CloudWatchMetricDataQuery[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.CloudWatchMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "interval", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "metricDataQueries", kind: "message", T: CloudWatchMetricDataQuery, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CloudWatchMetric { - return new CloudWatchMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CloudWatchMetric { - return new CloudWatchMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CloudWatchMetric { - return new CloudWatchMetric().fromJsonString(jsonString, options); - } - - static equals(a: CloudWatchMetric | PlainMessage | undefined, b: CloudWatchMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(CloudWatchMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.CloudWatchMetricDataQuery - */ -export class CloudWatchMetricDataQuery extends Message { - /** - * @generated from field: optional string id = 1; - */ - id?: string; - - /** - * @generated from field: optional string expression = 2; - */ - expression?: string; - - /** - * @generated from field: optional string label = 3; - */ - label?: string; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.CloudWatchMetricStat metricStat = 4; - */ - metricStat?: CloudWatchMetricStat; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.util.intstr.IntOrString period = 5; - */ - period?: IntOrString; - - /** - * @generated from field: optional bool returnData = 6; - */ - returnData?: boolean; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.CloudWatchMetricDataQuery"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "expression", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "label", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "metricStat", kind: "message", T: CloudWatchMetricStat, opt: true }, - { no: 5, name: "period", kind: "message", T: IntOrString, opt: true }, - { no: 6, name: "returnData", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CloudWatchMetricDataQuery { - return new CloudWatchMetricDataQuery().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CloudWatchMetricDataQuery { - return new CloudWatchMetricDataQuery().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CloudWatchMetricDataQuery { - return new CloudWatchMetricDataQuery().fromJsonString(jsonString, options); - } - - static equals(a: CloudWatchMetricDataQuery | PlainMessage | undefined, b: CloudWatchMetricDataQuery | PlainMessage | undefined): boolean { - return proto2.util.equals(CloudWatchMetricDataQuery, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.CloudWatchMetricStat - */ -export class CloudWatchMetricStat extends Message { - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.CloudWatchMetricStatMetric metric = 1; - */ - metric?: CloudWatchMetricStatMetric; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.util.intstr.IntOrString period = 2; - */ - period?: IntOrString; - - /** - * @generated from field: optional string stat = 3; - */ - stat?: string; - - /** - * @generated from field: optional string unit = 4; - */ - unit?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.CloudWatchMetricStat"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metric", kind: "message", T: CloudWatchMetricStatMetric, opt: true }, - { no: 2, name: "period", kind: "message", T: IntOrString, opt: true }, - { no: 3, name: "stat", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "unit", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CloudWatchMetricStat { - return new CloudWatchMetricStat().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CloudWatchMetricStat { - return new CloudWatchMetricStat().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CloudWatchMetricStat { - return new CloudWatchMetricStat().fromJsonString(jsonString, options); - } - - static equals(a: CloudWatchMetricStat | PlainMessage | undefined, b: CloudWatchMetricStat | PlainMessage | undefined): boolean { - return proto2.util.equals(CloudWatchMetricStat, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.CloudWatchMetricStatMetric - */ -export class CloudWatchMetricStatMetric extends Message { - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.CloudWatchMetricStatMetricDimension dimensions = 1; - */ - dimensions: CloudWatchMetricStatMetricDimension[] = []; - - /** - * @generated from field: optional string metricName = 2; - */ - metricName?: string; - - /** - * @generated from field: optional string namespace = 3; - */ - namespace?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.CloudWatchMetricStatMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "dimensions", kind: "message", T: CloudWatchMetricStatMetricDimension, repeated: true }, - { no: 2, name: "metricName", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "namespace", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CloudWatchMetricStatMetric { - return new CloudWatchMetricStatMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CloudWatchMetricStatMetric { - return new CloudWatchMetricStatMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CloudWatchMetricStatMetric { - return new CloudWatchMetricStatMetric().fromJsonString(jsonString, options); - } - - static equals(a: CloudWatchMetricStatMetric | PlainMessage | undefined, b: CloudWatchMetricStatMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(CloudWatchMetricStatMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.CloudWatchMetricStatMetricDimension - */ -export class CloudWatchMetricStatMetricDimension extends Message { - /** - * @generated from field: optional string name = 1; - */ - name?: string; - - /** - * @generated from field: optional string value = 2; - */ - value?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.CloudWatchMetricStatMetricDimension"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): CloudWatchMetricStatMetricDimension { - return new CloudWatchMetricStatMetricDimension().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): CloudWatchMetricStatMetricDimension { - return new CloudWatchMetricStatMetricDimension().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): CloudWatchMetricStatMetricDimension { - return new CloudWatchMetricStatMetricDimension().fromJsonString(jsonString, options); - } - - static equals(a: CloudWatchMetricStatMetricDimension | PlainMessage | undefined, b: CloudWatchMetricStatMetricDimension | PlainMessage | undefined): boolean { - return proto2.util.equals(CloudWatchMetricStatMetricDimension, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.DatadogMetric - */ -export class DatadogMetric extends Message { - /** - * @generated from field: optional string interval = 1; - */ - interval?: string; - - /** - * @generated from field: optional string query = 2; - */ - query?: string; - - /** - * @generated from field: map queries = 3; - */ - queries: { [key: string]: string } = {}; - - /** - * @generated from field: optional string formula = 4; - */ - formula?: string; - - /** - * @generated from field: optional string apiVersion = 5; - */ - apiVersion?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.DatadogMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "interval", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "queries", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - { no: 4, name: "formula", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "apiVersion", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DatadogMetric { - return new DatadogMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DatadogMetric { - return new DatadogMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DatadogMetric { - return new DatadogMetric().fromJsonString(jsonString, options); - } - - static equals(a: DatadogMetric | PlainMessage | undefined, b: DatadogMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(DatadogMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.DryRun - */ -export class DryRun extends Message { - /** - * @generated from field: optional string metricName = 1; - */ - metricName?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.DryRun"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metricName", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): DryRun { - return new DryRun().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): DryRun { - return new DryRun().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): DryRun { - return new DryRun().fromJsonString(jsonString, options); - } - - static equals(a: DryRun | PlainMessage | undefined, b: DryRun | PlainMessage | undefined): boolean { - return proto2.util.equals(DryRun, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.FieldRef - */ -export class FieldRef extends Message { - /** - * Required: Path of the field to select in the specified API version - * - * @generated from field: optional string fieldPath = 1; - */ - fieldPath?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.FieldRef"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "fieldPath", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): FieldRef { - return new FieldRef().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): FieldRef { - return new FieldRef().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): FieldRef { - return new FieldRef().fromJsonString(jsonString, options); - } - - static equals(a: FieldRef | PlainMessage | undefined, b: FieldRef | PlainMessage | undefined): boolean { - return proto2.util.equals(FieldRef, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.GraphiteMetric - */ -export class GraphiteMetric extends Message { - /** - * @generated from field: optional string address = 1; - */ - address?: string; - - /** - * @generated from field: optional string query = 2; - */ - query?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.GraphiteMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GraphiteMetric { - return new GraphiteMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GraphiteMetric { - return new GraphiteMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GraphiteMetric { - return new GraphiteMetric().fromJsonString(jsonString, options); - } - - static equals(a: GraphiteMetric | PlainMessage | undefined, b: GraphiteMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(GraphiteMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.InfluxdbMetric - */ -export class InfluxdbMetric extends Message { - /** - * @generated from field: optional string profile = 1; - */ - profile?: string; - - /** - * @generated from field: optional string query = 2; - */ - query?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.InfluxdbMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "profile", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): InfluxdbMetric { - return new InfluxdbMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): InfluxdbMetric { - return new InfluxdbMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): InfluxdbMetric { - return new InfluxdbMetric().fromJsonString(jsonString, options); - } - - static equals(a: InfluxdbMetric | PlainMessage | undefined, b: InfluxdbMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(InfluxdbMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.JobMetric - */ -export class JobMetric extends Message { - /** - * @generated from field: optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - */ - metadata?: ObjectMeta; - - /** - * @generated from field: optional k8s.io.api.batch.v1.JobSpec spec = 2; - */ - spec?: JobSpec; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.JobMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metadata", kind: "message", T: ObjectMeta, opt: true }, - { no: 2, name: "spec", kind: "message", T: JobSpec, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): JobMetric { - return new JobMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): JobMetric { - return new JobMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): JobMetric { - return new JobMetric().fromJsonString(jsonString, options); - } - - static equals(a: JobMetric | PlainMessage | undefined, b: JobMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(JobMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.KayentaMetric - */ -export class KayentaMetric extends Message { - /** - * @generated from field: optional string address = 1; - */ - address?: string; - - /** - * @generated from field: optional string application = 2; - */ - application?: string; - - /** - * @generated from field: optional string canaryConfigName = 3; - */ - canaryConfigName?: string; - - /** - * @generated from field: optional string metricsAccountName = 4; - */ - metricsAccountName?: string; - - /** - * @generated from field: optional string configurationAccountName = 5; - */ - configurationAccountName?: string; - - /** - * @generated from field: optional string storageAccountName = 6; - */ - storageAccountName?: string; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.KayentaThreshold threshold = 7; - */ - threshold?: KayentaThreshold; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.KayentaScope scopes = 8; - */ - scopes: KayentaScope[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.KayentaMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "application", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "canaryConfigName", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "metricsAccountName", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "configurationAccountName", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 6, name: "storageAccountName", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 7, name: "threshold", kind: "message", T: KayentaThreshold, opt: true }, - { no: 8, name: "scopes", kind: "message", T: KayentaScope, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): KayentaMetric { - return new KayentaMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): KayentaMetric { - return new KayentaMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): KayentaMetric { - return new KayentaMetric().fromJsonString(jsonString, options); - } - - static equals(a: KayentaMetric | PlainMessage | undefined, b: KayentaMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(KayentaMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.KayentaScope - */ -export class KayentaScope extends Message { - /** - * @generated from field: optional string name = 1; - */ - name?: string; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.ScopeDetail controlScope = 2; - */ - controlScope?: ScopeDetail; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.ScopeDetail experimentScope = 3; - */ - experimentScope?: ScopeDetail; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.KayentaScope"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "controlScope", kind: "message", T: ScopeDetail, opt: true }, - { no: 3, name: "experimentScope", kind: "message", T: ScopeDetail, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): KayentaScope { - return new KayentaScope().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): KayentaScope { - return new KayentaScope().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): KayentaScope { - return new KayentaScope().fromJsonString(jsonString, options); - } - - static equals(a: KayentaScope | PlainMessage | undefined, b: KayentaScope | PlainMessage | undefined): boolean { - return proto2.util.equals(KayentaScope, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.KayentaThreshold - */ -export class KayentaThreshold extends Message { - /** - * @generated from field: optional int64 pass = 1; - */ - pass?: bigint; - - /** - * @generated from field: optional int64 marginal = 2; - */ - marginal?: bigint; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.KayentaThreshold"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "pass", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 2, name: "marginal", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): KayentaThreshold { - return new KayentaThreshold().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): KayentaThreshold { - return new KayentaThreshold().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): KayentaThreshold { - return new KayentaThreshold().fromJsonString(jsonString, options); - } - - static equals(a: KayentaThreshold | PlainMessage | undefined, b: KayentaThreshold | PlainMessage | undefined): boolean { - return proto2.util.equals(KayentaThreshold, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.Measurement - */ -export class Measurement extends Message { - /** - * @generated from field: optional string phase = 1; - */ - phase?: string; - - /** - * @generated from field: optional string message = 2; - */ - message?: string; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startedAt = 3; - */ - startedAt?: Time; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.apis.meta.v1.Time finishedAt = 4; - */ - finishedAt?: Time; - - /** - * @generated from field: optional string value = 5; - */ - value?: string; - - /** - * @generated from field: map metadata = 6; - */ - metadata: { [key: string]: string } = {}; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.apis.meta.v1.Time resumeAt = 7; - */ - resumeAt?: Time; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.Measurement"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "phase", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "startedAt", kind: "message", T: Time, opt: true }, - { no: 4, name: "finishedAt", kind: "message", T: Time, opt: true }, - { no: 5, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 6, name: "metadata", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - { no: 7, name: "resumeAt", kind: "message", T: Time, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Measurement { - return new Measurement().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Measurement { - return new Measurement().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Measurement { - return new Measurement().fromJsonString(jsonString, options); - } - - static equals(a: Measurement | PlainMessage | undefined, b: Measurement | PlainMessage | undefined): boolean { - return proto2.util.equals(Measurement, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.MeasurementRetention - */ -export class MeasurementRetention extends Message { - /** - * @generated from field: optional string metricName = 1; - */ - metricName?: string; - - /** - * @generated from field: optional int32 limit = 2; - */ - limit?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.MeasurementRetention"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "metricName", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "limit", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MeasurementRetention { - return new MeasurementRetention().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MeasurementRetention { - return new MeasurementRetention().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MeasurementRetention { - return new MeasurementRetention().fromJsonString(jsonString, options); - } - - static equals(a: MeasurementRetention | PlainMessage | undefined, b: MeasurementRetention | PlainMessage | undefined): boolean { - return proto2.util.equals(MeasurementRetention, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.Metric - */ -export class Metric extends Message { - /** - * @generated from field: optional string name = 1; - */ - name?: string; - - /** - * @generated from field: optional string interval = 2; - */ - interval?: string; - - /** - * @generated from field: optional string initialDelay = 3; - */ - initialDelay?: string; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.util.intstr.IntOrString count = 4; - */ - count?: IntOrString; - - /** - * @generated from field: optional string successCondition = 5; - */ - successCondition?: string; - - /** - * @generated from field: optional string failureCondition = 6; - */ - failureCondition?: string; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.util.intstr.IntOrString failureLimit = 7; - */ - failureLimit?: IntOrString; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.util.intstr.IntOrString inconclusiveLimit = 8; - */ - inconclusiveLimit?: IntOrString; - - /** - * @generated from field: optional k8s.io.apimachinery.pkg.util.intstr.IntOrString consecutiveErrorLimit = 9; - */ - consecutiveErrorLimit?: IntOrString; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.MetricProvider provider = 10; - */ - provider?: MetricProvider; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.Metric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "interval", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "initialDelay", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "count", kind: "message", T: IntOrString, opt: true }, - { no: 5, name: "successCondition", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 6, name: "failureCondition", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 7, name: "failureLimit", kind: "message", T: IntOrString, opt: true }, - { no: 8, name: "inconclusiveLimit", kind: "message", T: IntOrString, opt: true }, - { no: 9, name: "consecutiveErrorLimit", kind: "message", T: IntOrString, opt: true }, - { no: 10, name: "provider", kind: "message", T: MetricProvider, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Metric { - return new Metric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Metric { - return new Metric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Metric { - return new Metric().fromJsonString(jsonString, options); - } - - static equals(a: Metric | PlainMessage | undefined, b: Metric | PlainMessage | undefined): boolean { - return proto2.util.equals(Metric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.MetricProvider - */ -export class MetricProvider extends Message { - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.PrometheusMetric prometheus = 1; - */ - prometheus?: PrometheusMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.KayentaMetric kayenta = 2; - */ - kayenta?: KayentaMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.WebMetric web = 3; - */ - web?: WebMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.DatadogMetric datadog = 4; - */ - datadog?: DatadogMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.WavefrontMetric wavefront = 5; - */ - wavefront?: WavefrontMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.NewRelicMetric newRelic = 6; - */ - newRelic?: NewRelicMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.JobMetric job = 7; - */ - job?: JobMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.CloudWatchMetric cloudWatch = 8; - */ - cloudWatch?: CloudWatchMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.GraphiteMetric graphite = 9; - */ - graphite?: GraphiteMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.InfluxdbMetric influxdb = 10; - */ - influxdb?: InfluxdbMetric; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.SkyWalkingMetric skywalking = 11; - */ - skywalking?: SkyWalkingMetric; - - /** - * @generated from field: map plugin = 12; - */ - plugin: { [key: string]: Uint8Array } = {}; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.MetricProvider"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "prometheus", kind: "message", T: PrometheusMetric, opt: true }, - { no: 2, name: "kayenta", kind: "message", T: KayentaMetric, opt: true }, - { no: 3, name: "web", kind: "message", T: WebMetric, opt: true }, - { no: 4, name: "datadog", kind: "message", T: DatadogMetric, opt: true }, - { no: 5, name: "wavefront", kind: "message", T: WavefrontMetric, opt: true }, - { no: 6, name: "newRelic", kind: "message", T: NewRelicMetric, opt: true }, - { no: 7, name: "job", kind: "message", T: JobMetric, opt: true }, - { no: 8, name: "cloudWatch", kind: "message", T: CloudWatchMetric, opt: true }, - { no: 9, name: "graphite", kind: "message", T: GraphiteMetric, opt: true }, - { no: 10, name: "influxdb", kind: "message", T: InfluxdbMetric, opt: true }, - { no: 11, name: "skywalking", kind: "message", T: SkyWalkingMetric, opt: true }, - { no: 12, name: "plugin", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 12 /* ScalarType.BYTES */} }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MetricProvider { - return new MetricProvider().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MetricProvider { - return new MetricProvider().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MetricProvider { - return new MetricProvider().fromJsonString(jsonString, options); - } - - static equals(a: MetricProvider | PlainMessage | undefined, b: MetricProvider | PlainMessage | undefined): boolean { - return proto2.util.equals(MetricProvider, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.MetricResult - */ -export class MetricResult extends Message { - /** - * @generated from field: optional string name = 1; - */ - name?: string; - - /** - * @generated from field: optional string phase = 2; - */ - phase?: string; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.Measurement measurements = 3; - */ - measurements: Measurement[] = []; - - /** - * @generated from field: optional string message = 4; - */ - message?: string; - - /** - * @generated from field: optional int32 count = 5; - */ - count?: number; - - /** - * @generated from field: optional int32 successful = 6; - */ - successful?: number; - - /** - * @generated from field: optional int32 failed = 7; - */ - failed?: number; - - /** - * @generated from field: optional int32 inconclusive = 8; - */ - inconclusive?: number; - - /** - * @generated from field: optional int32 error = 9; - */ - error?: number; - - /** - * @generated from field: optional int32 consecutiveError = 10; - */ - consecutiveError?: number; - - /** - * @generated from field: optional bool dryRun = 11; - */ - dryRun?: boolean; - - /** - * @generated from field: map metadata = 12; - */ - metadata: { [key: string]: string } = {}; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.MetricResult"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "phase", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "measurements", kind: "message", T: Measurement, repeated: true }, - { no: 4, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "count", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 6, name: "successful", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 7, name: "failed", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 8, name: "inconclusive", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 9, name: "error", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 10, name: "consecutiveError", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 11, name: "dryRun", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 12, name: "metadata", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): MetricResult { - return new MetricResult().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): MetricResult { - return new MetricResult().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): MetricResult { - return new MetricResult().fromJsonString(jsonString, options); - } - - static equals(a: MetricResult | PlainMessage | undefined, b: MetricResult | PlainMessage | undefined): boolean { - return proto2.util.equals(MetricResult, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.NewRelicMetric - */ -export class NewRelicMetric extends Message { - /** - * @generated from field: optional string profile = 1; - */ - profile?: string; - - /** - * @generated from field: optional string query = 2; - */ - query?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.NewRelicMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "profile", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): NewRelicMetric { - return new NewRelicMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): NewRelicMetric { - return new NewRelicMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): NewRelicMetric { - return new NewRelicMetric().fromJsonString(jsonString, options); - } - - static equals(a: NewRelicMetric | PlainMessage | undefined, b: NewRelicMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(NewRelicMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.OAuth2Config - */ -export class OAuth2Config extends Message { - /** - * @generated from field: optional string tokenUrl = 1; - */ - tokenUrl?: string; - - /** - * @generated from field: optional string clientId = 2; - */ - clientId?: string; - - /** - * @generated from field: optional string clientSecret = 3; - */ - clientSecret?: string; - - /** - * @generated from field: repeated string scopes = 4; - */ - scopes: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.OAuth2Config"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "tokenUrl", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "clientId", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "clientSecret", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "scopes", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): OAuth2Config { - return new OAuth2Config().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): OAuth2Config { - return new OAuth2Config().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): OAuth2Config { - return new OAuth2Config().fromJsonString(jsonString, options); - } - - static equals(a: OAuth2Config | PlainMessage | undefined, b: OAuth2Config | PlainMessage | undefined): boolean { - return proto2.util.equals(OAuth2Config, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.PrometheusMetric - */ -export class PrometheusMetric extends Message { - /** - * @generated from field: optional string address = 1; - */ - address?: string; - - /** - * @generated from field: optional string query = 2; - */ - query?: string; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.Authentication authentication = 3; - */ - authentication?: Authentication; - - /** - * @generated from field: optional int64 timeout = 4; - */ - timeout?: bigint; - - /** - * @generated from field: optional bool insecure = 5; - */ - insecure?: boolean; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.WebMetricHeader headers = 6; - */ - headers: WebMetricHeader[] = []; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.PrometheusMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "authentication", kind: "message", T: Authentication, opt: true }, - { no: 4, name: "timeout", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 5, name: "insecure", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 6, name: "headers", kind: "message", T: WebMetricHeader, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PrometheusMetric { - return new PrometheusMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PrometheusMetric { - return new PrometheusMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PrometheusMetric { - return new PrometheusMetric().fromJsonString(jsonString, options); - } - - static equals(a: PrometheusMetric | PlainMessage | undefined, b: PrometheusMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(PrometheusMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.RunSummary - */ -export class RunSummary extends Message { - /** - * @generated from field: optional int32 count = 1; - */ - count?: number; - - /** - * @generated from field: optional int32 successful = 2; - */ - successful?: number; - - /** - * @generated from field: optional int32 failed = 3; - */ - failed?: number; - - /** - * @generated from field: optional int32 inconclusive = 4; - */ - inconclusive?: number; - - /** - * @generated from field: optional int32 error = 5; - */ - error?: number; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.RunSummary"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "count", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 2, name: "successful", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 3, name: "failed", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 4, name: "inconclusive", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - { no: 5, name: "error", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RunSummary { - return new RunSummary().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RunSummary { - return new RunSummary().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RunSummary { - return new RunSummary().fromJsonString(jsonString, options); - } - - static equals(a: RunSummary | PlainMessage | undefined, b: RunSummary | PlainMessage | undefined): boolean { - return proto2.util.equals(RunSummary, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.ScopeDetail - */ -export class ScopeDetail extends Message { - /** - * @generated from field: optional string scope = 1; - */ - scope?: string; - - /** - * @generated from field: optional string region = 2; - */ - region?: string; - - /** - * @generated from field: optional int64 step = 3; - */ - step?: bigint; - - /** - * @generated from field: optional string start = 4; - */ - start?: string; - - /** - * @generated from field: optional string end = 5; - */ - end?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.ScopeDetail"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "scope", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "region", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "step", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 4, name: "start", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "end", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ScopeDetail { - return new ScopeDetail().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ScopeDetail { - return new ScopeDetail().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ScopeDetail { - return new ScopeDetail().fromJsonString(jsonString, options); - } - - static equals(a: ScopeDetail | PlainMessage | undefined, b: ScopeDetail | PlainMessage | undefined): boolean { - return proto2.util.equals(ScopeDetail, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.SecretKeyRef - */ -export class SecretKeyRef extends Message { - /** - * @generated from field: optional string name = 1; - */ - name?: string; - - /** - * @generated from field: optional string key = 2; - */ - key?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.SecretKeyRef"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SecretKeyRef { - return new SecretKeyRef().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SecretKeyRef { - return new SecretKeyRef().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SecretKeyRef { - return new SecretKeyRef().fromJsonString(jsonString, options); - } - - static equals(a: SecretKeyRef | PlainMessage | undefined, b: SecretKeyRef | PlainMessage | undefined): boolean { - return proto2.util.equals(SecretKeyRef, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.Sigv4Config - */ -export class Sigv4Config extends Message { - /** - * @generated from field: optional string region = 1; - */ - region?: string; - - /** - * @generated from field: optional string profile = 2; - */ - profile?: string; - - /** - * @generated from field: optional string roleArn = 3; - */ - roleArn?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.Sigv4Config"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "region", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "profile", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "roleArn", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Sigv4Config { - return new Sigv4Config().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Sigv4Config { - return new Sigv4Config().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Sigv4Config { - return new Sigv4Config().fromJsonString(jsonString, options); - } - - static equals(a: Sigv4Config | PlainMessage | undefined, b: Sigv4Config | PlainMessage | undefined): boolean { - return proto2.util.equals(Sigv4Config, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.SkyWalkingMetric - */ -export class SkyWalkingMetric extends Message { - /** - * @generated from field: optional string address = 1; - */ - address?: string; - - /** - * @generated from field: optional string query = 2; - */ - query?: string; - - /** - * @generated from field: optional string interval = 3; - */ - interval?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.SkyWalkingMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "interval", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): SkyWalkingMetric { - return new SkyWalkingMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): SkyWalkingMetric { - return new SkyWalkingMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): SkyWalkingMetric { - return new SkyWalkingMetric().fromJsonString(jsonString, options); - } - - static equals(a: SkyWalkingMetric | PlainMessage | undefined, b: SkyWalkingMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(SkyWalkingMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.ValueFrom - */ -export class ValueFrom extends Message { - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.SecretKeyRef secretKeyRef = 1; - */ - secretKeyRef?: SecretKeyRef; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.FieldRef fieldRef = 2; - */ - fieldRef?: FieldRef; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.ValueFrom"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "secretKeyRef", kind: "message", T: SecretKeyRef, opt: true }, - { no: 2, name: "fieldRef", kind: "message", T: FieldRef, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ValueFrom { - return new ValueFrom().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ValueFrom { - return new ValueFrom().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ValueFrom { - return new ValueFrom().fromJsonString(jsonString, options); - } - - static equals(a: ValueFrom | PlainMessage | undefined, b: ValueFrom | PlainMessage | undefined): boolean { - return proto2.util.equals(ValueFrom, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.WavefrontMetric - */ -export class WavefrontMetric extends Message { - /** - * @generated from field: optional string address = 1; - */ - address?: string; - - /** - * @generated from field: optional string query = 2; - */ - query?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.WavefrontMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "query", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): WavefrontMetric { - return new WavefrontMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): WavefrontMetric { - return new WavefrontMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): WavefrontMetric { - return new WavefrontMetric().fromJsonString(jsonString, options); - } - - static equals(a: WavefrontMetric | PlainMessage | undefined, b: WavefrontMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(WavefrontMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.WebMetric - */ -export class WebMetric extends Message { - /** - * @generated from field: optional string method = 1; - */ - method?: string; - - /** - * URL is the address of the web metric - * - * @generated from field: optional string url = 2; - */ - url?: string; - - /** - * @generated from field: repeated github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.WebMetricHeader headers = 3; - */ - headers: WebMetricHeader[] = []; - - /** - * @generated from field: optional string body = 4; - */ - body?: string; - - /** - * @generated from field: optional int64 timeoutSeconds = 5; - */ - timeoutSeconds?: bigint; - - /** - * @generated from field: optional string jsonPath = 6; - */ - jsonPath?: string; - - /** - * @generated from field: optional bool insecure = 7; - */ - insecure?: boolean; - - /** - * @generated from field: optional bytes jsonBody = 8; - */ - jsonBody?: Uint8Array; - - /** - * @generated from field: optional github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.Authentication authentication = 9; - */ - authentication?: Authentication; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.WebMetric"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "method", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "headers", kind: "message", T: WebMetricHeader, repeated: true }, - { no: 4, name: "body", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "timeoutSeconds", kind: "scalar", T: 3 /* ScalarType.INT64 */, opt: true }, - { no: 6, name: "jsonPath", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 7, name: "insecure", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 8, name: "jsonBody", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true }, - { no: 9, name: "authentication", kind: "message", T: Authentication, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): WebMetric { - return new WebMetric().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): WebMetric { - return new WebMetric().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): WebMetric { - return new WebMetric().fromJsonString(jsonString, options); - } - - static equals(a: WebMetric | PlainMessage | undefined, b: WebMetric | PlainMessage | undefined): boolean { - return proto2.util.equals(WebMetric, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.WebMetricHeader - */ -export class WebMetricHeader extends Message { - /** - * @generated from field: optional string key = 1; - */ - key?: string; - - /** - * @generated from field: optional string value = 2; - */ - value?: string; - - constructor(data?: PartialMessage) { - super(); - proto2.util.initPartial(data, this); - } - - static readonly runtime: typeof proto2 = proto2; - static readonly typeName = "github.com.akuity.kargo.internal.controller.rollouts.v1alpha1.WebMetricHeader"; - static readonly fields: FieldList = proto2.util.newFieldList(() => [ - { no: 1, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 2, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): WebMetricHeader { - return new WebMetricHeader().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): WebMetricHeader { - return new WebMetricHeader().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): WebMetricHeader { - return new WebMetricHeader().fromJsonString(jsonString, options); - } - - static equals(a: WebMetricHeader | PlainMessage | undefined, b: WebMetricHeader | PlainMessage | undefined): boolean { - return proto2.util.equals(WebMetricHeader, a, b); - } -} - diff --git a/ui/src/gen/v1alpha1/types_pb.ts b/ui/src/gen/v1alpha1/types_pb.ts deleted file mode 100644 index 336a8d7be..000000000 --- a/ui/src/gen/v1alpha1/types_pb.ts +++ /dev/null @@ -1,2743 +0,0 @@ -// @generated by protoc-gen-es v1.3.0 with parameter "target=ts" -// @generated from file v1alpha1/types.proto (package github.com.akuity.kargo.pkg.api.v1alpha1, syntax proto3) -/* eslint-disable */ -// @ts-nocheck - -import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; -import { Message, proto3, protoInt64, Timestamp } from "@bufbuild/protobuf"; -import { ListMeta, ObjectMeta } from "../metav1/types_pb.js"; - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.ArgoCDAppUpdate - */ -export class ArgoCDAppUpdate extends Message { - /** - * @generated from field: string app_name = 1; - */ - appName = ""; - - /** - * @generated from field: optional string app_namespace = 2; - */ - appNamespace?: string; - - /** - * @generated from field: repeated github.com.akuity.kargo.pkg.api.v1alpha1.ArgoCDSourceUpdate source_updates = 3; - */ - sourceUpdates: ArgoCDSourceUpdate[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.ArgoCDAppUpdate"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "app_name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "app_namespace", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "source_updates", kind: "message", T: ArgoCDSourceUpdate, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ArgoCDAppUpdate { - return new ArgoCDAppUpdate().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ArgoCDAppUpdate { - return new ArgoCDAppUpdate().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ArgoCDAppUpdate { - return new ArgoCDAppUpdate().fromJsonString(jsonString, options); - } - - static equals(a: ArgoCDAppUpdate | PlainMessage | undefined, b: ArgoCDAppUpdate | PlainMessage | undefined): boolean { - return proto3.util.equals(ArgoCDAppUpdate, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.ArgoCDHelm - */ -export class ArgoCDHelm extends Message { - /** - * @generated from field: repeated github.com.akuity.kargo.pkg.api.v1alpha1.ArgoCDHelmImageUpdate images = 1; - */ - images: ArgoCDHelmImageUpdate[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.ArgoCDHelm"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "images", kind: "message", T: ArgoCDHelmImageUpdate, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ArgoCDHelm { - return new ArgoCDHelm().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ArgoCDHelm { - return new ArgoCDHelm().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ArgoCDHelm { - return new ArgoCDHelm().fromJsonString(jsonString, options); - } - - static equals(a: ArgoCDHelm | PlainMessage | undefined, b: ArgoCDHelm | PlainMessage | undefined): boolean { - return proto3.util.equals(ArgoCDHelm, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.ArgoCDHelmImageUpdate - */ -export class ArgoCDHelmImageUpdate extends Message { - /** - * @generated from field: string image = 1; - */ - image = ""; - - /** - * @generated from field: string key = 2; - */ - key = ""; - - /** - * @generated from field: string value = 3; - */ - value = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.ArgoCDHelmImageUpdate"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "image", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ArgoCDHelmImageUpdate { - return new ArgoCDHelmImageUpdate().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ArgoCDHelmImageUpdate { - return new ArgoCDHelmImageUpdate().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ArgoCDHelmImageUpdate { - return new ArgoCDHelmImageUpdate().fromJsonString(jsonString, options); - } - - static equals(a: ArgoCDHelmImageUpdate | PlainMessage | undefined, b: ArgoCDHelmImageUpdate | PlainMessage | undefined): boolean { - return proto3.util.equals(ArgoCDHelmImageUpdate, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.ArgoCDKustomize - */ -export class ArgoCDKustomize extends Message { - /** - * @generated from field: repeated github.com.akuity.kargo.pkg.api.v1alpha1.ArgoCDKustomizeImageUpdate images = 1; - */ - images: ArgoCDKustomizeImageUpdate[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.ArgoCDKustomize"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "images", kind: "message", T: ArgoCDKustomizeImageUpdate, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ArgoCDKustomize { - return new ArgoCDKustomize().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ArgoCDKustomize { - return new ArgoCDKustomize().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ArgoCDKustomize { - return new ArgoCDKustomize().fromJsonString(jsonString, options); - } - - static equals(a: ArgoCDKustomize | PlainMessage | undefined, b: ArgoCDKustomize | PlainMessage | undefined): boolean { - return proto3.util.equals(ArgoCDKustomize, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.ArgoCDKustomizeImageUpdate - */ -export class ArgoCDKustomizeImageUpdate extends Message { - /** - * @generated from field: string image = 1; - */ - image = ""; - - /** - * @generated from field: bool use_digest = 2; - */ - useDigest = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.ArgoCDKustomizeImageUpdate"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "image", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "use_digest", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ArgoCDKustomizeImageUpdate { - return new ArgoCDKustomizeImageUpdate().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ArgoCDKustomizeImageUpdate { - return new ArgoCDKustomizeImageUpdate().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ArgoCDKustomizeImageUpdate { - return new ArgoCDKustomizeImageUpdate().fromJsonString(jsonString, options); - } - - static equals(a: ArgoCDKustomizeImageUpdate | PlainMessage | undefined, b: ArgoCDKustomizeImageUpdate | PlainMessage | undefined): boolean { - return proto3.util.equals(ArgoCDKustomizeImageUpdate, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.ArgoCDSourceUpdate - */ -export class ArgoCDSourceUpdate extends Message { - /** - * @generated from field: string repo_url = 1 [json_name = "repoURL"]; - */ - repoUrl = ""; - - /** - * @generated from field: optional string chart = 2; - */ - chart?: string; - - /** - * @generated from field: optional bool update_target_revision = 3; - */ - updateTargetRevision?: boolean; - - /** - * @generated from field: optional github.com.akuity.kargo.pkg.api.v1alpha1.ArgoCDKustomize kustomize = 4; - */ - kustomize?: ArgoCDKustomize; - - /** - * @generated from field: optional github.com.akuity.kargo.pkg.api.v1alpha1.ArgoCDHelm helm = 5; - */ - helm?: ArgoCDHelm; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.ArgoCDSourceUpdate"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "repo_url", jsonName: "repoURL", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "chart", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "update_target_revision", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true }, - { no: 4, name: "kustomize", kind: "message", T: ArgoCDKustomize, opt: true }, - { no: 5, name: "helm", kind: "message", T: ArgoCDHelm, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ArgoCDSourceUpdate { - return new ArgoCDSourceUpdate().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ArgoCDSourceUpdate { - return new ArgoCDSourceUpdate().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ArgoCDSourceUpdate { - return new ArgoCDSourceUpdate().fromJsonString(jsonString, options); - } - - static equals(a: ArgoCDSourceUpdate | PlainMessage | undefined, b: ArgoCDSourceUpdate | PlainMessage | undefined): boolean { - return proto3.util.equals(ArgoCDSourceUpdate, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.KargoRenderPromotionMechanism - */ -export class KargoRenderPromotionMechanism extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.KargoRenderPromotionMechanism"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): KargoRenderPromotionMechanism { - return new KargoRenderPromotionMechanism().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): KargoRenderPromotionMechanism { - return new KargoRenderPromotionMechanism().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): KargoRenderPromotionMechanism { - return new KargoRenderPromotionMechanism().fromJsonString(jsonString, options); - } - - static equals(a: KargoRenderPromotionMechanism | PlainMessage | undefined, b: KargoRenderPromotionMechanism | PlainMessage | undefined): boolean { - return proto3.util.equals(KargoRenderPromotionMechanism, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.Chart - */ -export class Chart extends Message { - /** - * @generated from field: string repo_url = 1 [json_name = "repoURL"]; - */ - repoUrl = ""; - - /** - * @generated from field: string name = 2; - */ - name = ""; - - /** - * @generated from field: string version = 3; - */ - version = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.Chart"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "repo_url", jsonName: "repoURL", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Chart { - return new Chart().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Chart { - return new Chart().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Chart { - return new Chart().fromJsonString(jsonString, options); - } - - static equals(a: Chart | PlainMessage | undefined, b: Chart | PlainMessage | undefined): boolean { - return proto3.util.equals(Chart, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.ChartSubscription - */ -export class ChartSubscription extends Message { - /** - * @generated from field: string repo_url = 1 [json_name = "repoURL"]; - */ - repoUrl = ""; - - /** - * @generated from field: optional string name = 2; - */ - name?: string; - - /** - * @generated from field: optional string semver_constraint = 3; - */ - semverConstraint?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.ChartSubscription"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "repo_url", jsonName: "repoURL", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "semver_constraint", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ChartSubscription { - return new ChartSubscription().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ChartSubscription { - return new ChartSubscription().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ChartSubscription { - return new ChartSubscription().fromJsonString(jsonString, options); - } - - static equals(a: ChartSubscription | PlainMessage | undefined, b: ChartSubscription | PlainMessage | undefined): boolean { - return proto3.util.equals(ChartSubscription, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.GitCommit - */ -export class GitCommit extends Message { - /** - * @generated from field: string repo_url = 1 [json_name = "repoURL"]; - */ - repoUrl = ""; - - /** - * @generated from field: string id = 2; - */ - id = ""; - - /** - * @generated from field: string branch = 3; - */ - branch = ""; - - /** - * @generated from field: optional string health_check_commit = 4; - */ - healthCheckCommit?: string; - - /** - * @generated from field: string message = 5; - */ - message = ""; - - /** - * @generated from field: string author = 6; - */ - author = ""; - - /** - * @generated from field: string tag = 7; - */ - tag = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.GitCommit"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "repo_url", jsonName: "repoURL", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "branch", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "health_check_commit", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 6, name: "author", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 7, name: "tag", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GitCommit { - return new GitCommit().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GitCommit { - return new GitCommit().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GitCommit { - return new GitCommit().fromJsonString(jsonString, options); - } - - static equals(a: GitCommit | PlainMessage | undefined, b: GitCommit | PlainMessage | undefined): boolean { - return proto3.util.equals(GitCommit, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.GitRepoUpdate - */ -export class GitRepoUpdate extends Message { - /** - * @generated from field: string repo_url = 1 [json_name = "repoURL"]; - */ - repoUrl = ""; - - /** - * @generated from field: optional string read_branch = 2; - */ - readBranch?: string; - - /** - * @generated from field: string write_branch = 3; - */ - writeBranch = ""; - - /** - * @generated from field: optional github.com.akuity.kargo.pkg.api.v1alpha1.KustomizePromotionMechanism kustomize = 5; - */ - kustomize?: KustomizePromotionMechanism; - - /** - * @generated from field: optional github.com.akuity.kargo.pkg.api.v1alpha1.HelmPromotionMechanism helm = 6; - */ - helm?: HelmPromotionMechanism; - - /** - * @generated from field: optional github.com.akuity.kargo.pkg.api.v1alpha1.KargoRenderPromotionMechanism render = 7; - */ - render?: KargoRenderPromotionMechanism; - - /** - * @generated from field: optional github.com.akuity.kargo.pkg.api.v1alpha1.PullRequestPromotionMechanism pull_request = 8; - */ - pullRequest?: PullRequestPromotionMechanism; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.GitRepoUpdate"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "repo_url", jsonName: "repoURL", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "read_branch", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 3, name: "write_branch", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "kustomize", kind: "message", T: KustomizePromotionMechanism, opt: true }, - { no: 6, name: "helm", kind: "message", T: HelmPromotionMechanism, opt: true }, - { no: 7, name: "render", kind: "message", T: KargoRenderPromotionMechanism, opt: true }, - { no: 8, name: "pull_request", kind: "message", T: PullRequestPromotionMechanism, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GitRepoUpdate { - return new GitRepoUpdate().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GitRepoUpdate { - return new GitRepoUpdate().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GitRepoUpdate { - return new GitRepoUpdate().fromJsonString(jsonString, options); - } - - static equals(a: GitRepoUpdate | PlainMessage | undefined, b: GitRepoUpdate | PlainMessage | undefined): boolean { - return proto3.util.equals(GitRepoUpdate, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.GitSubscription - */ -export class GitSubscription extends Message { - /** - * @generated from field: string repo_url = 1 [json_name = "repoURL"]; - */ - repoUrl = ""; - - /** - * @generated from field: string branch = 2; - */ - branch = ""; - - /** - * @generated from field: string commit_selection_strategy = 3; - */ - commitSelectionStrategy = ""; - - /** - * @generated from field: optional string semver_constraint = 4; - */ - semverConstraint?: string; - - /** - * @generated from field: optional string allow_tags = 5; - */ - allowTags?: string; - - /** - * @generated from field: repeated string ignore_tags = 6; - */ - ignoreTags: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.GitSubscription"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "repo_url", jsonName: "repoURL", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "branch", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "commit_selection_strategy", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "semver_constraint", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "allow_tags", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 6, name: "ignore_tags", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GitSubscription { - return new GitSubscription().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GitSubscription { - return new GitSubscription().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GitSubscription { - return new GitSubscription().fromJsonString(jsonString, options); - } - - static equals(a: GitSubscription | PlainMessage | undefined, b: GitSubscription | PlainMessage | undefined): boolean { - return proto3.util.equals(GitSubscription, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.Health - */ -export class Health extends Message { - /** - * @generated from field: string status = 1; - */ - status = ""; - - /** - * @generated from field: repeated string issues = 2; - */ - issues: string[] = []; - - /** - * @generated from field: repeated github.com.akuity.kargo.pkg.api.v1alpha1.ArgoCDAppState argocd_apps = 3 [json_name = "argoCDApps"]; - */ - argocdApps: ArgoCDAppState[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.Health"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "status", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "issues", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 3, name: "argocd_apps", jsonName: "argoCDApps", kind: "message", T: ArgoCDAppState, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Health { - return new Health().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Health { - return new Health().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Health { - return new Health().fromJsonString(jsonString, options); - } - - static equals(a: Health | PlainMessage | undefined, b: Health | PlainMessage | undefined): boolean { - return proto3.util.equals(Health, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.ArgoCDAppState - */ -export class ArgoCDAppState extends Message { - /** - * @generated from field: string namespace = 1; - */ - namespace = ""; - - /** - * @generated from field: string name = 2; - */ - name = ""; - - /** - * @generated from field: github.com.akuity.kargo.pkg.api.v1alpha1.ArgoCDAppHealthStatus health_status = 3; - */ - healthStatus?: ArgoCDAppHealthStatus; - - /** - * @generated from field: github.com.akuity.kargo.pkg.api.v1alpha1.ArgoCDAppSyncStatus sync_status = 4; - */ - syncStatus?: ArgoCDAppSyncStatus; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.ArgoCDAppState"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "namespace", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "health_status", kind: "message", T: ArgoCDAppHealthStatus }, - { no: 4, name: "sync_status", kind: "message", T: ArgoCDAppSyncStatus }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ArgoCDAppState { - return new ArgoCDAppState().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ArgoCDAppState { - return new ArgoCDAppState().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ArgoCDAppState { - return new ArgoCDAppState().fromJsonString(jsonString, options); - } - - static equals(a: ArgoCDAppState | PlainMessage | undefined, b: ArgoCDAppState | PlainMessage | undefined): boolean { - return proto3.util.equals(ArgoCDAppState, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.ArgoCDAppHealthStatus - */ -export class ArgoCDAppHealthStatus extends Message { - /** - * @generated from field: string status = 1; - */ - status = ""; - - /** - * @generated from field: string message = 2; - */ - message = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.ArgoCDAppHealthStatus"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "status", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ArgoCDAppHealthStatus { - return new ArgoCDAppHealthStatus().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ArgoCDAppHealthStatus { - return new ArgoCDAppHealthStatus().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ArgoCDAppHealthStatus { - return new ArgoCDAppHealthStatus().fromJsonString(jsonString, options); - } - - static equals(a: ArgoCDAppHealthStatus | PlainMessage | undefined, b: ArgoCDAppHealthStatus | PlainMessage | undefined): boolean { - return proto3.util.equals(ArgoCDAppHealthStatus, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.ArgoCDAppSyncStatus - */ -export class ArgoCDAppSyncStatus extends Message { - /** - * @generated from field: string status = 1; - */ - status = ""; - - /** - * @generated from field: string revision = 2; - */ - revision = ""; - - /** - * @generated from field: repeated string revisions = 3; - */ - revisions: string[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.ArgoCDAppSyncStatus"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "status", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "revision", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "revisions", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ArgoCDAppSyncStatus { - return new ArgoCDAppSyncStatus().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ArgoCDAppSyncStatus { - return new ArgoCDAppSyncStatus().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ArgoCDAppSyncStatus { - return new ArgoCDAppSyncStatus().fromJsonString(jsonString, options); - } - - static equals(a: ArgoCDAppSyncStatus | PlainMessage | undefined, b: ArgoCDAppSyncStatus | PlainMessage | undefined): boolean { - return proto3.util.equals(ArgoCDAppSyncStatus, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.HelmChartDependencyUpdate - */ -export class HelmChartDependencyUpdate extends Message { - /** - * @generated from field: string repository = 1 [json_name = "repositoryURL"]; - */ - repository = ""; - - /** - * @generated from field: string name = 2; - */ - name = ""; - - /** - * @generated from field: string chart_path = 3; - */ - chartPath = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.HelmChartDependencyUpdate"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "repository", jsonName: "repositoryURL", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "chart_path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): HelmChartDependencyUpdate { - return new HelmChartDependencyUpdate().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): HelmChartDependencyUpdate { - return new HelmChartDependencyUpdate().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): HelmChartDependencyUpdate { - return new HelmChartDependencyUpdate().fromJsonString(jsonString, options); - } - - static equals(a: HelmChartDependencyUpdate | PlainMessage | undefined, b: HelmChartDependencyUpdate | PlainMessage | undefined): boolean { - return proto3.util.equals(HelmChartDependencyUpdate, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.HelmImageUpdate - */ -export class HelmImageUpdate extends Message { - /** - * @generated from field: string image = 1; - */ - image = ""; - - /** - * @generated from field: string values_file_path = 2; - */ - valuesFilePath = ""; - - /** - * @generated from field: string key = 3; - */ - key = ""; - - /** - * @generated from field: string value = 4; - */ - value = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.HelmImageUpdate"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "image", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "values_file_path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "key", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 4, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): HelmImageUpdate { - return new HelmImageUpdate().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): HelmImageUpdate { - return new HelmImageUpdate().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): HelmImageUpdate { - return new HelmImageUpdate().fromJsonString(jsonString, options); - } - - static equals(a: HelmImageUpdate | PlainMessage | undefined, b: HelmImageUpdate | PlainMessage | undefined): boolean { - return proto3.util.equals(HelmImageUpdate, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.HelmPromotionMechanism - */ -export class HelmPromotionMechanism extends Message { - /** - * @generated from field: repeated github.com.akuity.kargo.pkg.api.v1alpha1.HelmImageUpdate images = 1; - */ - images: HelmImageUpdate[] = []; - - /** - * @generated from field: repeated github.com.akuity.kargo.pkg.api.v1alpha1.HelmChartDependencyUpdate charts = 2; - */ - charts: HelmChartDependencyUpdate[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.HelmPromotionMechanism"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "images", kind: "message", T: HelmImageUpdate, repeated: true }, - { no: 2, name: "charts", kind: "message", T: HelmChartDependencyUpdate, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): HelmPromotionMechanism { - return new HelmPromotionMechanism().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): HelmPromotionMechanism { - return new HelmPromotionMechanism().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): HelmPromotionMechanism { - return new HelmPromotionMechanism().fromJsonString(jsonString, options); - } - - static equals(a: HelmPromotionMechanism | PlainMessage | undefined, b: HelmPromotionMechanism | PlainMessage | undefined): boolean { - return proto3.util.equals(HelmPromotionMechanism, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.PullRequestPromotionMechanism - */ -export class PullRequestPromotionMechanism extends Message { - /** - * @generated from field: github.com.akuity.kargo.pkg.api.v1alpha1.GitHubPullRequest github = 1; - */ - github?: GitHubPullRequest; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.PullRequestPromotionMechanism"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "github", kind: "message", T: GitHubPullRequest }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PullRequestPromotionMechanism { - return new PullRequestPromotionMechanism().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PullRequestPromotionMechanism { - return new PullRequestPromotionMechanism().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PullRequestPromotionMechanism { - return new PullRequestPromotionMechanism().fromJsonString(jsonString, options); - } - - static equals(a: PullRequestPromotionMechanism | PlainMessage | undefined, b: PullRequestPromotionMechanism | PlainMessage | undefined): boolean { - return proto3.util.equals(PullRequestPromotionMechanism, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.GitHubPullRequest - */ -export class GitHubPullRequest extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.GitHubPullRequest"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): GitHubPullRequest { - return new GitHubPullRequest().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): GitHubPullRequest { - return new GitHubPullRequest().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): GitHubPullRequest { - return new GitHubPullRequest().fromJsonString(jsonString, options); - } - - static equals(a: GitHubPullRequest | PlainMessage | undefined, b: GitHubPullRequest | PlainMessage | undefined): boolean { - return proto3.util.equals(GitHubPullRequest, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.Image - */ -export class Image extends Message { - /** - * @generated from field: string repo_url = 1 [json_name = "repoURL"]; - */ - repoUrl = ""; - - /** - * @generated from field: string tag = 2; - */ - tag = ""; - - /** - * @generated from field: string digest = 3; - */ - digest = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.Image"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "repo_url", jsonName: "repoURL", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "tag", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "digest", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Image { - return new Image().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Image { - return new Image().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Image { - return new Image().fromJsonString(jsonString, options); - } - - static equals(a: Image | PlainMessage | undefined, b: Image | PlainMessage | undefined): boolean { - return proto3.util.equals(Image, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.ImageSubscription - */ -export class ImageSubscription extends Message { - /** - * @generated from field: string repo_url = 1 [json_name = "repoURL"]; - */ - repoUrl = ""; - - /** - * @generated from field: string image_selection_strategy = 2; - */ - imageSelectionStrategy = ""; - - /** - * @generated from field: optional string semver_constraint = 3; - */ - semverConstraint?: string; - - /** - * @generated from field: optional string allow_tags = 4; - */ - allowTags?: string; - - /** - * @generated from field: repeated string ignore_tags = 5; - */ - ignoreTags: string[] = []; - - /** - * @generated from field: optional string platform = 6; - */ - platform?: string; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.ImageSubscription"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "repo_url", jsonName: "repoURL", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "image_selection_strategy", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "semver_constraint", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 4, name: "allow_tags", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - { no: 5, name: "ignore_tags", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true }, - { no: 6, name: "platform", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ImageSubscription { - return new ImageSubscription().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ImageSubscription { - return new ImageSubscription().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ImageSubscription { - return new ImageSubscription().fromJsonString(jsonString, options); - } - - static equals(a: ImageSubscription | PlainMessage | undefined, b: ImageSubscription | PlainMessage | undefined): boolean { - return proto3.util.equals(ImageSubscription, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.KustomizeImageUpdate - */ -export class KustomizeImageUpdate extends Message { - /** - * @generated from field: string image = 1; - */ - image = ""; - - /** - * @generated from field: string path = 2; - */ - path = ""; - - /** - * @generated from field: bool use_digest = 3; - */ - useDigest = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.KustomizeImageUpdate"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "image", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "use_digest", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): KustomizeImageUpdate { - return new KustomizeImageUpdate().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): KustomizeImageUpdate { - return new KustomizeImageUpdate().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): KustomizeImageUpdate { - return new KustomizeImageUpdate().fromJsonString(jsonString, options); - } - - static equals(a: KustomizeImageUpdate | PlainMessage | undefined, b: KustomizeImageUpdate | PlainMessage | undefined): boolean { - return proto3.util.equals(KustomizeImageUpdate, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.KustomizePromotionMechanism - */ -export class KustomizePromotionMechanism extends Message { - /** - * @generated from field: repeated github.com.akuity.kargo.pkg.api.v1alpha1.KustomizeImageUpdate images = 1; - */ - images: KustomizeImageUpdate[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.KustomizePromotionMechanism"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "images", kind: "message", T: KustomizeImageUpdate, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): KustomizePromotionMechanism { - return new KustomizePromotionMechanism().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): KustomizePromotionMechanism { - return new KustomizePromotionMechanism().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): KustomizePromotionMechanism { - return new KustomizePromotionMechanism().fromJsonString(jsonString, options); - } - - static equals(a: KustomizePromotionMechanism | PlainMessage | undefined, b: KustomizePromotionMechanism | PlainMessage | undefined): boolean { - return proto3.util.equals(KustomizePromotionMechanism, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.Project - */ -export class Project extends Message { - /** - * @generated from field: string api_version = 1; - */ - apiVersion = ""; - - /** - * @generated from field: string kind = 2; - */ - kind = ""; - - /** - * @generated from field: github.com.akuity.kargo.pkg.api.metav1.ObjectMeta metadata = 3; - */ - metadata?: ObjectMeta; - - /** - * @generated from field: github.com.akuity.kargo.pkg.api.v1alpha1.ProjectStatus status = 4; - */ - status?: ProjectStatus; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.Project"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "api_version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "metadata", kind: "message", T: ObjectMeta }, - { no: 4, name: "status", kind: "message", T: ProjectStatus }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Project { - return new Project().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Project { - return new Project().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Project { - return new Project().fromJsonString(jsonString, options); - } - - static equals(a: Project | PlainMessage | undefined, b: Project | PlainMessage | undefined): boolean { - return proto3.util.equals(Project, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.ProjectStatus - */ -export class ProjectStatus extends Message { - /** - * @generated from field: string phase = 1; - */ - phase = ""; - - /** - * @generated from field: string message = 2; - */ - message = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.ProjectStatus"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "phase", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ProjectStatus { - return new ProjectStatus().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ProjectStatus { - return new ProjectStatus().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ProjectStatus { - return new ProjectStatus().fromJsonString(jsonString, options); - } - - static equals(a: ProjectStatus | PlainMessage | undefined, b: ProjectStatus | PlainMessage | undefined): boolean { - return proto3.util.equals(ProjectStatus, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.Promotion - */ -export class Promotion extends Message { - /** - * @generated from field: string api_version = 1; - */ - apiVersion = ""; - - /** - * @generated from field: string kind = 2; - */ - kind = ""; - - /** - * @generated from field: optional github.com.akuity.kargo.pkg.api.metav1.ObjectMeta metadata = 3; - */ - metadata?: ObjectMeta; - - /** - * @generated from field: github.com.akuity.kargo.pkg.api.v1alpha1.PromotionSpec spec = 4; - */ - spec?: PromotionSpec; - - /** - * @generated from field: github.com.akuity.kargo.pkg.api.v1alpha1.PromotionStatus status = 5; - */ - status?: PromotionStatus; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.Promotion"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "api_version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "metadata", kind: "message", T: ObjectMeta, opt: true }, - { no: 4, name: "spec", kind: "message", T: PromotionSpec }, - { no: 5, name: "status", kind: "message", T: PromotionStatus }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Promotion { - return new Promotion().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Promotion { - return new Promotion().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Promotion { - return new Promotion().fromJsonString(jsonString, options); - } - - static equals(a: Promotion | PlainMessage | undefined, b: Promotion | PlainMessage | undefined): boolean { - return proto3.util.equals(Promotion, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.PromotionInfo - */ -export class PromotionInfo extends Message { - /** - * @generated from field: string name = 1; - */ - name = ""; - - /** - * @generated from field: github.com.akuity.kargo.pkg.api.v1alpha1.FreightReference freight = 2; - */ - freight?: FreightReference; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.PromotionInfo"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "freight", kind: "message", T: FreightReference }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PromotionInfo { - return new PromotionInfo().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PromotionInfo { - return new PromotionInfo().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PromotionInfo { - return new PromotionInfo().fromJsonString(jsonString, options); - } - - static equals(a: PromotionInfo | PlainMessage | undefined, b: PromotionInfo | PlainMessage | undefined): boolean { - return proto3.util.equals(PromotionInfo, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.PromotionList - */ -export class PromotionList extends Message { - /** - * @generated from field: optional github.com.akuity.kargo.pkg.api.metav1.ListMeta metadata = 1; - */ - metadata?: ListMeta; - - /** - * @generated from field: repeated github.com.akuity.kargo.pkg.api.v1alpha1.Promotion items = 2; - */ - items: Promotion[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.PromotionList"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "metadata", kind: "message", T: ListMeta, opt: true }, - { no: 2, name: "items", kind: "message", T: Promotion, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PromotionList { - return new PromotionList().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PromotionList { - return new PromotionList().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PromotionList { - return new PromotionList().fromJsonString(jsonString, options); - } - - static equals(a: PromotionList | PlainMessage | undefined, b: PromotionList | PlainMessage | undefined): boolean { - return proto3.util.equals(PromotionList, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.PromotionMechanisms - */ -export class PromotionMechanisms extends Message { - /** - * @generated from field: repeated github.com.akuity.kargo.pkg.api.v1alpha1.GitRepoUpdate git_repo_updates = 1; - */ - gitRepoUpdates: GitRepoUpdate[] = []; - - /** - * @generated from field: repeated github.com.akuity.kargo.pkg.api.v1alpha1.ArgoCDAppUpdate argocd_app_updates = 2 [json_name = "argoCDAppUpdates"]; - */ - argocdAppUpdates: ArgoCDAppUpdate[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.PromotionMechanisms"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "git_repo_updates", kind: "message", T: GitRepoUpdate, repeated: true }, - { no: 2, name: "argocd_app_updates", jsonName: "argoCDAppUpdates", kind: "message", T: ArgoCDAppUpdate, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PromotionMechanisms { - return new PromotionMechanisms().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PromotionMechanisms { - return new PromotionMechanisms().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PromotionMechanisms { - return new PromotionMechanisms().fromJsonString(jsonString, options); - } - - static equals(a: PromotionMechanisms | PlainMessage | undefined, b: PromotionMechanisms | PlainMessage | undefined): boolean { - return proto3.util.equals(PromotionMechanisms, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.PromotionPolicy - */ -export class PromotionPolicy extends Message { - /** - * @generated from field: string stage = 4; - */ - stage = ""; - - /** - * @generated from field: bool auto_promotion_enabled = 5; - */ - autoPromotionEnabled = false; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.PromotionPolicy"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 4, name: "stage", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "auto_promotion_enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PromotionPolicy { - return new PromotionPolicy().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PromotionPolicy { - return new PromotionPolicy().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PromotionPolicy { - return new PromotionPolicy().fromJsonString(jsonString, options); - } - - static equals(a: PromotionPolicy | PlainMessage | undefined, b: PromotionPolicy | PlainMessage | undefined): boolean { - return proto3.util.equals(PromotionPolicy, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.PromotionSpec - */ -export class PromotionSpec extends Message { - /** - * @generated from field: string stage = 1; - */ - stage = ""; - - /** - * @generated from field: string freight = 2; - */ - freight = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.PromotionSpec"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "stage", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "freight", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PromotionSpec { - return new PromotionSpec().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PromotionSpec { - return new PromotionSpec().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PromotionSpec { - return new PromotionSpec().fromJsonString(jsonString, options); - } - - static equals(a: PromotionSpec | PlainMessage | undefined, b: PromotionSpec | PlainMessage | undefined): boolean { - return proto3.util.equals(PromotionSpec, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.PromotionStatus - */ -export class PromotionStatus extends Message { - /** - * @generated from field: string phase = 1; - */ - phase = ""; - - /** - * @generated from field: string message = 2; - */ - message = ""; - - /** - * @generated from field: map metadata = 3; - */ - metadata: { [key: string]: string } = {}; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.PromotionStatus"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "phase", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "metadata", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): PromotionStatus { - return new PromotionStatus().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): PromotionStatus { - return new PromotionStatus().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): PromotionStatus { - return new PromotionStatus().fromJsonString(jsonString, options); - } - - static equals(a: PromotionStatus | PlainMessage | undefined, b: PromotionStatus | PlainMessage | undefined): boolean { - return proto3.util.equals(PromotionStatus, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.RepoSubscription - */ -export class RepoSubscription extends Message { - /** - * @generated from field: optional github.com.akuity.kargo.pkg.api.v1alpha1.GitSubscription git = 1; - */ - git?: GitSubscription; - - /** - * @generated from field: optional github.com.akuity.kargo.pkg.api.v1alpha1.ImageSubscription image = 2; - */ - image?: ImageSubscription; - - /** - * @generated from field: optional github.com.akuity.kargo.pkg.api.v1alpha1.ChartSubscription chart = 3; - */ - chart?: ChartSubscription; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.RepoSubscription"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "git", kind: "message", T: GitSubscription, opt: true }, - { no: 2, name: "image", kind: "message", T: ImageSubscription, opt: true }, - { no: 3, name: "chart", kind: "message", T: ChartSubscription, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): RepoSubscription { - return new RepoSubscription().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): RepoSubscription { - return new RepoSubscription().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): RepoSubscription { - return new RepoSubscription().fromJsonString(jsonString, options); - } - - static equals(a: RepoSubscription | PlainMessage | undefined, b: RepoSubscription | PlainMessage | undefined): boolean { - return proto3.util.equals(RepoSubscription, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.Stage - */ -export class Stage extends Message { - /** - * @generated from field: string api_version = 1; - */ - apiVersion = ""; - - /** - * @generated from field: string kind = 2; - */ - kind = ""; - - /** - * @generated from field: github.com.akuity.kargo.pkg.api.metav1.ObjectMeta metadata = 3; - */ - metadata?: ObjectMeta; - - /** - * @generated from field: github.com.akuity.kargo.pkg.api.v1alpha1.StageSpec spec = 4; - */ - spec?: StageSpec; - - /** - * @generated from field: github.com.akuity.kargo.pkg.api.v1alpha1.StageStatus status = 5; - */ - status?: StageStatus; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.Stage"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "api_version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "metadata", kind: "message", T: ObjectMeta }, - { no: 4, name: "spec", kind: "message", T: StageSpec }, - { no: 5, name: "status", kind: "message", T: StageStatus }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Stage { - return new Stage().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Stage { - return new Stage().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Stage { - return new Stage().fromJsonString(jsonString, options); - } - - static equals(a: Stage | PlainMessage | undefined, b: Stage | PlainMessage | undefined): boolean { - return proto3.util.equals(Stage, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.StageList - */ -export class StageList extends Message { - /** - * @generated from field: github.com.akuity.kargo.pkg.api.metav1.ListMeta metadata = 1; - */ - metadata?: ListMeta; - - /** - * @generated from field: repeated github.com.akuity.kargo.pkg.api.v1alpha1.Stage items = 2; - */ - items: Stage[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.StageList"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "metadata", kind: "message", T: ListMeta }, - { no: 2, name: "items", kind: "message", T: Stage, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): StageList { - return new StageList().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): StageList { - return new StageList().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): StageList { - return new StageList().fromJsonString(jsonString, options); - } - - static equals(a: StageList | PlainMessage | undefined, b: StageList | PlainMessage | undefined): boolean { - return proto3.util.equals(StageList, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.StageSpec - */ -export class StageSpec extends Message { - /** - * @generated from field: github.com.akuity.kargo.pkg.api.v1alpha1.Subscriptions subscriptions = 1; - */ - subscriptions?: Subscriptions; - - /** - * @generated from field: github.com.akuity.kargo.pkg.api.v1alpha1.PromotionMechanisms promotion_mechanisms = 2; - */ - promotionMechanisms?: PromotionMechanisms; - - /** - * @generated from field: optional github.com.akuity.kargo.pkg.api.v1alpha1.Verification verification = 3; - */ - verification?: Verification; - - /** - * @generated from field: string shard = 4; - */ - shard = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.StageSpec"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "subscriptions", kind: "message", T: Subscriptions }, - { no: 2, name: "promotion_mechanisms", kind: "message", T: PromotionMechanisms }, - { no: 3, name: "verification", kind: "message", T: Verification, opt: true }, - { no: 4, name: "shard", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): StageSpec { - return new StageSpec().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): StageSpec { - return new StageSpec().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): StageSpec { - return new StageSpec().fromJsonString(jsonString, options); - } - - static equals(a: StageSpec | PlainMessage | undefined, b: StageSpec | PlainMessage | undefined): boolean { - return proto3.util.equals(StageSpec, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.Freight - */ -export class Freight extends Message { - /** - * @generated from field: string api_version = 1; - */ - apiVersion = ""; - - /** - * @generated from field: string kind = 2; - */ - kind = ""; - - /** - * @generated from field: github.com.akuity.kargo.pkg.api.metav1.ObjectMeta metadata = 3; - */ - metadata?: ObjectMeta; - - /** - * @generated from field: string id = 4; - */ - id = ""; - - /** - * @generated from field: repeated github.com.akuity.kargo.pkg.api.v1alpha1.GitCommit commits = 5; - */ - commits: GitCommit[] = []; - - /** - * @generated from field: repeated github.com.akuity.kargo.pkg.api.v1alpha1.Image images = 6; - */ - images: Image[] = []; - - /** - * @generated from field: repeated github.com.akuity.kargo.pkg.api.v1alpha1.Chart charts = 7; - */ - charts: Chart[] = []; - - /** - * @generated from field: github.com.akuity.kargo.pkg.api.v1alpha1.FreightStatus status = 8; - */ - status?: FreightStatus; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.Freight"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "api_version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "metadata", kind: "message", T: ObjectMeta }, - { no: 4, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "commits", kind: "message", T: GitCommit, repeated: true }, - { no: 6, name: "images", kind: "message", T: Image, repeated: true }, - { no: 7, name: "charts", kind: "message", T: Chart, repeated: true }, - { no: 8, name: "status", kind: "message", T: FreightStatus }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Freight { - return new Freight().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Freight { - return new Freight().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Freight { - return new Freight().fromJsonString(jsonString, options); - } - - static equals(a: Freight | PlainMessage | undefined, b: Freight | PlainMessage | undefined): boolean { - return proto3.util.equals(Freight, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.FreightStatus - */ -export class FreightStatus extends Message { - /** - * @generated from field: map verified_in = 1; - */ - verifiedIn: { [key: string]: VerifiedStage } = {}; - - /** - * @generated from field: map approved_for = 2; - */ - approvedFor: { [key: string]: ApprovedStage } = {}; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.FreightStatus"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "verified_in", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: VerifiedStage} }, - { no: 2, name: "approved_for", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: ApprovedStage} }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): FreightStatus { - return new FreightStatus().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): FreightStatus { - return new FreightStatus().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): FreightStatus { - return new FreightStatus().fromJsonString(jsonString, options); - } - - static equals(a: FreightStatus | PlainMessage | undefined, b: FreightStatus | PlainMessage | undefined): boolean { - return proto3.util.equals(FreightStatus, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.VerifiedStage - */ -export class VerifiedStage extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.VerifiedStage"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): VerifiedStage { - return new VerifiedStage().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): VerifiedStage { - return new VerifiedStage().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): VerifiedStage { - return new VerifiedStage().fromJsonString(jsonString, options); - } - - static equals(a: VerifiedStage | PlainMessage | undefined, b: VerifiedStage | PlainMessage | undefined): boolean { - return proto3.util.equals(VerifiedStage, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.ApprovedStage - */ -export class ApprovedStage extends Message { - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.ApprovedStage"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): ApprovedStage { - return new ApprovedStage().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): ApprovedStage { - return new ApprovedStage().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): ApprovedStage { - return new ApprovedStage().fromJsonString(jsonString, options); - } - - static equals(a: ApprovedStage | PlainMessage | undefined, b: ApprovedStage | PlainMessage | undefined): boolean { - return proto3.util.equals(ApprovedStage, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.FreightReference - */ -export class FreightReference extends Message { - /** - * @generated from field: string id = 1; - */ - id = ""; - - /** - * @generated from field: optional google.protobuf.Timestamp first_seen = 2; - */ - firstSeen?: Timestamp; - - /** - * @generated from field: repeated github.com.akuity.kargo.pkg.api.v1alpha1.GitCommit commits = 4; - */ - commits: GitCommit[] = []; - - /** - * @generated from field: repeated github.com.akuity.kargo.pkg.api.v1alpha1.Image images = 5; - */ - images: Image[] = []; - - /** - * @generated from field: repeated github.com.akuity.kargo.pkg.api.v1alpha1.Chart charts = 6; - */ - charts: Chart[] = []; - - /** - * @generated from field: optional github.com.akuity.kargo.pkg.api.v1alpha1.VerificationInfo verification_info = 7; - */ - verificationInfo?: VerificationInfo; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.FreightReference"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "first_seen", kind: "message", T: Timestamp, opt: true }, - { no: 4, name: "commits", kind: "message", T: GitCommit, repeated: true }, - { no: 5, name: "images", kind: "message", T: Image, repeated: true }, - { no: 6, name: "charts", kind: "message", T: Chart, repeated: true }, - { no: 7, name: "verification_info", kind: "message", T: VerificationInfo, opt: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): FreightReference { - return new FreightReference().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): FreightReference { - return new FreightReference().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): FreightReference { - return new FreightReference().fromJsonString(jsonString, options); - } - - static equals(a: FreightReference | PlainMessage | undefined, b: FreightReference | PlainMessage | undefined): boolean { - return proto3.util.equals(FreightReference, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.StageStatus - */ -export class StageStatus extends Message { - /** - * @generated from field: optional github.com.akuity.kargo.pkg.api.v1alpha1.FreightReference current_freight = 2; - */ - currentFreight?: FreightReference; - - /** - * @generated from field: repeated github.com.akuity.kargo.pkg.api.v1alpha1.FreightReference history = 3; - */ - history: FreightReference[] = []; - - /** - * @generated from field: string message = 4; - */ - message = ""; - - /** - * @generated from field: optional github.com.akuity.kargo.pkg.api.v1alpha1.Health health = 5; - */ - health?: Health; - - /** - * @generated from field: optional github.com.akuity.kargo.pkg.api.v1alpha1.PromotionInfo current_promotion = 6; - */ - currentPromotion?: PromotionInfo; - - /** - * @generated from field: string phase = 7; - */ - phase = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.StageStatus"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 2, name: "current_freight", kind: "message", T: FreightReference, opt: true }, - { no: 3, name: "history", kind: "message", T: FreightReference, repeated: true }, - { no: 4, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "health", kind: "message", T: Health, opt: true }, - { no: 6, name: "current_promotion", kind: "message", T: PromotionInfo, opt: true }, - { no: 7, name: "phase", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): StageStatus { - return new StageStatus().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): StageStatus { - return new StageStatus().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): StageStatus { - return new StageStatus().fromJsonString(jsonString, options); - } - - static equals(a: StageStatus | PlainMessage | undefined, b: StageStatus | PlainMessage | undefined): boolean { - return proto3.util.equals(StageStatus, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.StageSubscription - */ -export class StageSubscription extends Message { - /** - * @generated from field: string name = 1; - */ - name = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.StageSubscription"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): StageSubscription { - return new StageSubscription().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): StageSubscription { - return new StageSubscription().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): StageSubscription { - return new StageSubscription().fromJsonString(jsonString, options); - } - - static equals(a: StageSubscription | PlainMessage | undefined, b: StageSubscription | PlainMessage | undefined): boolean { - return proto3.util.equals(StageSubscription, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.Subscriptions - */ -export class Subscriptions extends Message { - /** - * @generated from field: repeated github.com.akuity.kargo.pkg.api.v1alpha1.StageSubscription upstream_stages = 2; - */ - upstreamStages: StageSubscription[] = []; - - /** - * @generated from field: string warehouse = 3; - */ - warehouse = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.Subscriptions"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 2, name: "upstream_stages", kind: "message", T: StageSubscription, repeated: true }, - { no: 3, name: "warehouse", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Subscriptions { - return new Subscriptions().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Subscriptions { - return new Subscriptions().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Subscriptions { - return new Subscriptions().fromJsonString(jsonString, options); - } - - static equals(a: Subscriptions | PlainMessage | undefined, b: Subscriptions | PlainMessage | undefined): boolean { - return proto3.util.equals(Subscriptions, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.Warehouse - */ -export class Warehouse extends Message { - /** - * @generated from field: string api_version = 1; - */ - apiVersion = ""; - - /** - * @generated from field: string kind = 2; - */ - kind = ""; - - /** - * @generated from field: github.com.akuity.kargo.pkg.api.metav1.ObjectMeta metadata = 3; - */ - metadata?: ObjectMeta; - - /** - * @generated from field: github.com.akuity.kargo.pkg.api.v1alpha1.WarehouseSpec spec = 4; - */ - spec?: WarehouseSpec; - - /** - * @generated from field: github.com.akuity.kargo.pkg.api.v1alpha1.WarehouseStatus status = 5; - */ - status?: WarehouseStatus; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.Warehouse"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "api_version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "metadata", kind: "message", T: ObjectMeta }, - { no: 4, name: "spec", kind: "message", T: WarehouseSpec }, - { no: 5, name: "status", kind: "message", T: WarehouseStatus }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Warehouse { - return new Warehouse().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Warehouse { - return new Warehouse().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Warehouse { - return new Warehouse().fromJsonString(jsonString, options); - } - - static equals(a: Warehouse | PlainMessage | undefined, b: Warehouse | PlainMessage | undefined): boolean { - return proto3.util.equals(Warehouse, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.WarehouseSpec - */ -export class WarehouseSpec extends Message { - /** - * @generated from field: repeated github.com.akuity.kargo.pkg.api.v1alpha1.RepoSubscription subscriptions = 1; - */ - subscriptions: RepoSubscription[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.WarehouseSpec"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "subscriptions", kind: "message", T: RepoSubscription, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): WarehouseSpec { - return new WarehouseSpec().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): WarehouseSpec { - return new WarehouseSpec().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): WarehouseSpec { - return new WarehouseSpec().fromJsonString(jsonString, options); - } - - static equals(a: WarehouseSpec | PlainMessage | undefined, b: WarehouseSpec | PlainMessage | undefined): boolean { - return proto3.util.equals(WarehouseSpec, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.WarehouseStatus - */ -export class WarehouseStatus extends Message { - /** - * @generated from field: string message = 1; - */ - message = ""; - - /** - * @generated from field: int64 observed_generation = 2; - */ - observedGeneration = protoInt64.zero; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.WarehouseStatus"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "observed_generation", kind: "scalar", T: 3 /* ScalarType.INT64 */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): WarehouseStatus { - return new WarehouseStatus().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): WarehouseStatus { - return new WarehouseStatus().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): WarehouseStatus { - return new WarehouseStatus().fromJsonString(jsonString, options); - } - - static equals(a: WarehouseStatus | PlainMessage | undefined, b: WarehouseStatus | PlainMessage | undefined): boolean { - return proto3.util.equals(WarehouseStatus, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.Verification - */ -export class Verification extends Message { - /** - * @generated from field: repeated github.com.akuity.kargo.pkg.api.v1alpha1.AnalysisTemplateReference analysis_templates = 1; - */ - analysisTemplates: AnalysisTemplateReference[] = []; - - /** - * @generated from field: optional github.com.akuity.kargo.pkg.api.v1alpha1.AnalysisRunMetadata analysis_run_metadata = 2; - */ - analysisRunMetadata?: AnalysisRunMetadata; - - /** - * @generated from field: repeated github.com.akuity.kargo.pkg.api.v1alpha1.AnalysisRunArgument args = 3; - */ - args: AnalysisRunArgument[] = []; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.Verification"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "analysis_templates", kind: "message", T: AnalysisTemplateReference, repeated: true }, - { no: 2, name: "analysis_run_metadata", kind: "message", T: AnalysisRunMetadata, opt: true }, - { no: 3, name: "args", kind: "message", T: AnalysisRunArgument, repeated: true }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Verification { - return new Verification().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Verification { - return new Verification().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Verification { - return new Verification().fromJsonString(jsonString, options); - } - - static equals(a: Verification | PlainMessage | undefined, b: Verification | PlainMessage | undefined): boolean { - return proto3.util.equals(Verification, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.AnalysisTemplateReference - */ -export class AnalysisTemplateReference extends Message { - /** - * @generated from field: string name = 1; - */ - name = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.AnalysisTemplateReference"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnalysisTemplateReference { - return new AnalysisTemplateReference().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AnalysisTemplateReference { - return new AnalysisTemplateReference().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnalysisTemplateReference { - return new AnalysisTemplateReference().fromJsonString(jsonString, options); - } - - static equals(a: AnalysisTemplateReference | PlainMessage | undefined, b: AnalysisTemplateReference | PlainMessage | undefined): boolean { - return proto3.util.equals(AnalysisTemplateReference, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.AnalysisRunMetadata - */ -export class AnalysisRunMetadata extends Message { - /** - * @generated from field: map labels = 1; - */ - labels: { [key: string]: string } = {}; - - /** - * @generated from field: map annotations = 2; - */ - annotations: { [key: string]: string } = {}; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.AnalysisRunMetadata"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "labels", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - { no: 2, name: "annotations", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnalysisRunMetadata { - return new AnalysisRunMetadata().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AnalysisRunMetadata { - return new AnalysisRunMetadata().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnalysisRunMetadata { - return new AnalysisRunMetadata().fromJsonString(jsonString, options); - } - - static equals(a: AnalysisRunMetadata | PlainMessage | undefined, b: AnalysisRunMetadata | PlainMessage | undefined): boolean { - return proto3.util.equals(AnalysisRunMetadata, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.AnalysisRunArgument - */ -export class AnalysisRunArgument extends Message { - /** - * @generated from field: string name = 1; - */ - name = ""; - - /** - * @generated from field: string value = 2; - */ - value = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.AnalysisRunArgument"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "value", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnalysisRunArgument { - return new AnalysisRunArgument().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AnalysisRunArgument { - return new AnalysisRunArgument().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnalysisRunArgument { - return new AnalysisRunArgument().fromJsonString(jsonString, options); - } - - static equals(a: AnalysisRunArgument | PlainMessage | undefined, b: AnalysisRunArgument | PlainMessage | undefined): boolean { - return proto3.util.equals(AnalysisRunArgument, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.VerificationInfo - */ -export class VerificationInfo extends Message { - /** - * @generated from field: github.com.akuity.kargo.pkg.api.v1alpha1.AnalysisRunReference analysis_run = 1; - */ - analysisRun?: AnalysisRunReference; - - /** - * @generated from field: string phase = 2; - */ - phase = ""; - - /** - * @generated from field: string message = 3; - */ - message = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.VerificationInfo"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "analysis_run", kind: "message", T: AnalysisRunReference }, - { no: 2, name: "phase", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "message", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): VerificationInfo { - return new VerificationInfo().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): VerificationInfo { - return new VerificationInfo().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): VerificationInfo { - return new VerificationInfo().fromJsonString(jsonString, options); - } - - static equals(a: VerificationInfo | PlainMessage | undefined, b: VerificationInfo | PlainMessage | undefined): boolean { - return proto3.util.equals(VerificationInfo, a, b); - } -} - -/** - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.AnalysisRunReference - */ -export class AnalysisRunReference extends Message { - /** - * @generated from field: string namespace = 1; - */ - namespace = ""; - - /** - * @generated from field: string name = 2; - */ - name = ""; - - /** - * @generated from field: string phase = 3; - */ - phase = ""; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.AnalysisRunReference"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "namespace", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "phase", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): AnalysisRunReference { - return new AnalysisRunReference().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): AnalysisRunReference { - return new AnalysisRunReference().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): AnalysisRunReference { - return new AnalysisRunReference().fromJsonString(jsonString, options); - } - - static equals(a: AnalysisRunReference | PlainMessage | undefined, b: AnalysisRunReference | PlainMessage | undefined): boolean { - return proto3.util.equals(AnalysisRunReference, a, b); - } -} - -/** - * TODO: Don't define this ourselves - * - * @generated from message github.com.akuity.kargo.pkg.api.v1alpha1.Secret - */ -export class Secret extends Message { - /** - * @generated from field: string api_version = 1; - */ - apiVersion = ""; - - /** - * @generated from field: string kind = 2; - */ - kind = ""; - - /** - * @generated from field: github.com.akuity.kargo.pkg.api.metav1.ObjectMeta metadata = 3; - */ - metadata?: ObjectMeta; - - /** - * @generated from field: string type = 4; - */ - type = ""; - - /** - * @generated from field: map string_data = 5; - */ - stringData: { [key: string]: string } = {}; - - constructor(data?: PartialMessage) { - super(); - proto3.util.initPartial(data, this); - } - - static readonly runtime: typeof proto3 = proto3; - static readonly typeName = "github.com.akuity.kargo.pkg.api.v1alpha1.Secret"; - static readonly fields: FieldList = proto3.util.newFieldList(() => [ - { no: 1, name: "api_version", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 2, name: "kind", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 3, name: "metadata", kind: "message", T: ObjectMeta }, - { no: 4, name: "type", kind: "scalar", T: 9 /* ScalarType.STRING */ }, - { no: 5, name: "string_data", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} }, - ]); - - static fromBinary(bytes: Uint8Array, options?: Partial): Secret { - return new Secret().fromBinary(bytes, options); - } - - static fromJson(jsonValue: JsonValue, options?: Partial): Secret { - return new Secret().fromJson(jsonValue, options); - } - - static fromJsonString(jsonString: string, options?: Partial): Secret { - return new Secret().fromJsonString(jsonString, options); - } - - static equals(a: Secret | PlainMessage | undefined, b: Secret | PlainMessage | undefined): boolean { - return proto3.util.equals(Secret, a, b); - } -} - diff --git a/ui/src/pages/login/login.module.less b/ui/src/pages/login/login.module.less index efbb2491f..d82e042ea 100644 --- a/ui/src/pages/login/login.module.less +++ b/ui/src/pages/login/login.module.less @@ -8,6 +8,7 @@ rgb(10, 23, 49) 100% ); display: flex; + flex-direction: column; align-items: center; justify-content: center; padding: ~'@{sizeMD}px'; @@ -27,6 +28,12 @@ flex-direction: column; color: @colorWhite; align-items: center; - gap: 40px; - font-size: 20px; + gap: 15px; + font-size: 24px; + font-weight: 600; + margin-top: -100px; + + img { + width: 70px; + } } diff --git a/ui/src/pages/login/login.tsx b/ui/src/pages/login/login.tsx index ac2619017..34be77e6a 100644 --- a/ui/src/pages/login/login.tsx +++ b/ui/src/pages/login/login.tsx @@ -23,7 +23,7 @@ export const Login = () => {
Kargo Icon - Kargo + kargo
{isLoading && } diff --git a/ui/src/pages/project.tsx b/ui/src/pages/project.tsx index 0c10a86a3..fd50b96ed 100644 --- a/ui/src/pages/project.tsx +++ b/ui/src/pages/project.tsx @@ -2,7 +2,8 @@ import { faChartBar, faClockRotateLeft, faDiagramProject, - faIdBadge + faIdBadge, + faPeopleGroup } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { Tabs } from 'antd'; @@ -13,6 +14,7 @@ import { AnalysisTemplatesList } from '@ui/features/project/analysis-templates/a import { CredentialsList } from '@ui/features/project/credentials/credentials-list'; import { Events } from '@ui/features/project/events/events'; import { Pipelines } from '@ui/features/project/pipelines/pipelines'; +import { Roles } from '@ui/features/project/roles/roles'; import { ProjectSettings } from '@ui/features/project/settings/project-settings'; const tabs = { @@ -35,6 +37,11 @@ const tabs = { path: paths.projectEvents, label: 'Events', icon: faClockRotateLeft + }, + roles: { + path: paths.projectRoles, + label: 'Roles', + icon: faPeopleGroup } }; @@ -55,6 +62,8 @@ export const Project = ({ tab = 'pipelines' }: { tab?: ProjectTab }) => { return ; case 'events': return ; + case 'roles': + return ; default: return ; }