cc88438850bb4ae96e8937f1102b31482db8ef7b
[oom/platform/cert-service.git] / certServiceK8sExternalProvider / deploy / crd.yaml
1 # ============LICENSE_START=======================================================
2 # oom-certservice-k8s-external-provider
3 # ================================================================================
4 # Copyright (c) 2019 Smallstep Labs, Inc.
5 # Modifications copyright (C) 2020 Nokia. All rights reserved.
6 # ================================================================================
7 # This source code was copied from the following git repository:
8 # https://github.com/smallstep/step-issuer
9 # The source code was modified for usage in the ONAP project.
10 # ================================================================================
11 # Licensed under the Apache License, Version 2.0 (the "License");
12 # you may not use this file except in compliance with the License.
13 # You may obtain a copy of the License at
14 #
15 #      http://www.apache.org/licenses/LICENSE-2.0
16 #
17 # Unless required by applicable law or agreed to in writing, software
18 # distributed under the License is distributed on an "AS IS" BASIS,
19 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 # See the License for the specific language governing permissions and
21 # limitations under the License.
22 # ============LICENSE_END=========================================================
23 #
24
25 apiVersion: apiextensions.k8s.io/v1
26 kind: CustomResourceDefinition
27 metadata:
28   name: cmpv2issuers.certmanager.onap.org
29 spec:
30   group: certmanager.onap.org
31   names:
32     kind: CMPv2Issuer
33     listKind: CMPv2IssuerList
34     plural: cmpv2issuers
35     singular: cmpv2issuer
36   scope: Namespaced
37   versions:
38     - name: v1
39       served: true
40       storage: true
41       schema:
42         openAPIV3Schema:
43           description: CMPv2Issuer is the Schema for the cmpv2issuers API
44           properties:
45             apiVersion:
46               description: 'APIVersion defines the versioned schema of this representation
47                 of an object. Servers should convert recognized schemas to the latest
48                 internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/cmpv2api-conventions.md#resources'
49               type: string
50             kind:
51               description: 'Kind is a string value representing the REST resource this
52                 object represents. Servers may infer this from the endpoint the client
53                 submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/cmpv2api-conventions.md#types-kinds'
54               type: string
55             metadata:
56               type: object
57             spec:
58               description: CMPv2IssuerSpec defines the desired state of CMPv2Issuer
59               properties:
60                 url:
61                   description: URL to CertService API.
62                   type: string
63                 caName:
64                   description: Name of the external CA server configured on CertService API side.
65                   type: string
66                 certSecretRef:
67                   description: Reference to K8s secret which contains certificate, private key and CA certificate
68                     needed to connect to CertService API (which requires client certificate authentication)
69                   properties:
70                     name:
71                       description: The name of K8s secret to select certificates from. Secret must be in the same
72                         namespace as CMPv2Issuer.
73                       type: string
74                     keyRef:
75                       description: The key of the secret to select private key from. Must be a
76                         valid secret key.
77                       type: string
78                     certRef:
79                       description: The key of the secret to select cert from. Must be a
80                         valid secret key.
81                       type: string
82                     cacertRef:
83                       description: The key of the secret to select cacert from. Must be a
84                         valid secret key.
85                       type: string
86                   required:
87                     - name
88                     - keyRef
89                     - certRef
90                     - cacertRef
91                   type: object
92               required:
93                 - url
94                 - caName
95                 - certSecretRef
96               type: object
97             status:
98               description: CMPv2IssuerStatus defines the observed state of CMPv2Issuer
99               properties:
100                 conditions:
101                   items:
102                     description: CMPv2IssuerCondition contains condition information for
103                       the certservice issuer.
104                     properties:
105                       lastTransitionTime:
106                         description: LastTransitionTime is the timestamp corresponding
107                           to the last status change of this condition.
108                         format: date-time
109                         type: string
110                       message:
111                         description: Message is a human readable description of the details
112                           of the last transition, complementing reason.
113                         type: string
114                       reason:
115                         description: Reason is a brief machine readable explanation for
116                           the condition's last transition.
117                         type: string
118                       status:
119                         allOf:
120                           - enum:
121                               - "True"
122                               - "False"
123                               - Unknown
124                           - enum:
125                               - "True"
126                               - "False"
127                               - Unknown
128                         description: Status of the condition, one of ('True', 'False',
129                           'Unknown').
130                         type: string
131                       type:
132                         description: Type of the condition, currently ('Ready').
133                         enum:
134                           - Ready
135                         type: string
136                     required:
137                       - status
138                       - type
139                     type: object
140                   type: array
141               type: object
142           type: object