[OOM-K8S-CERT-EXTERNAL-PROVIDER] Add health check of CMPv2 provisioner (cert-service...
[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                 healthEndpoint:
64                   description: Path of health check endpoint.
65                   type: string
66                 certEndpoint:
67                   description: Path of cerfificate signing enpoint.
68                   type: string
69                 caName:
70                   description: Name of the external CA server configured on CertService API side.
71                   type: string
72                 certSecretRef:
73                   description: Reference to K8s secret which contains certificate, private key and CA certificate
74                     needed to connect to CertService API (which requires client certificate authentication)
75                   properties:
76                     name:
77                       description: The name of K8s secret to select certificates from. Secret must be in the same
78                         namespace as CMPv2Issuer.
79                       type: string
80                     keyRef:
81                       description: The key of the secret to select private key from. Must be a
82                         valid secret key.
83                       type: string
84                     certRef:
85                       description: The key of the secret to select cert from. Must be a
86                         valid secret key.
87                       type: string
88                     cacertRef:
89                       description: The key of the secret to select cacert from. Must be a
90                         valid secret key.
91                       type: string
92                   required:
93                     - name
94                     - keyRef
95                     - certRef
96                     - cacertRef
97                   type: object
98               required:
99                 - url
100                 - healthEndpoint
101                 - certEndpoint
102                 - caName
103                 - certSecretRef
104               type: object
105             status:
106               description: CMPv2IssuerStatus defines the observed state of CMPv2Issuer
107               properties:
108                 conditions:
109                   items:
110                     description: CMPv2IssuerCondition contains condition information for
111                       the certservice issuer.
112                     properties:
113                       lastTransitionTime:
114                         description: LastTransitionTime is the timestamp corresponding
115                           to the last status change of this condition.
116                         format: date-time
117                         type: string
118                       message:
119                         description: Message is a human readable description of the details
120                           of the last transition, complementing reason.
121                         type: string
122                       reason:
123                         description: Reason is a brief machine readable explanation for
124                           the condition's last transition.
125                         type: string
126                       status:
127                         allOf:
128                           - enum:
129                               - "True"
130                               - "False"
131                               - Unknown
132                           - enum:
133                               - "True"
134                               - "False"
135                               - Unknown
136                         description: Status of the condition, one of ('True', 'False',
137                           'Unknown').
138                         type: string
139                       type:
140                         description: Type of the condition, currently ('Ready').
141                         enum:
142                           - Ready
143                         type: string
144                     required:
145                       - status
146                       - type
147                     type: object
148                   type: array
149               type: object
150           type: object