diff options
author | Jan Malkiewicz <jan.malkiewicz@nokia.com> | 2020-10-15 09:04:18 +0200 |
---|---|---|
committer | Jan Malkiewicz <jan.malkiewicz@nokia.com> | 2020-10-15 16:01:53 +0200 |
commit | f5fb53b031c2f1c4bc4872de59b9774a559d786f (patch) | |
tree | 2345c86aeaedfef576b513c3b325ce303c1261c7 /certServiceK8sExternalProvider/deploy | |
parent | 720466562b0ea1e67ff36f44e0d95645837316d4 (diff) |
[OOM-K8S-CERT-EXTERNAL-PROVIDER] Mock implementaion enhanced (part II)
Rename CertServiceIssuer -> CMPv2Issuer
Checking for Issuer.Kind (has to be CMPv2Issuer)
Introduced exit codes
Refactoring file names and packages
Moved tests to main package (according to GOlang convention)
Issue-ID: OOM-2559
Signed-off-by: Jan Malkiewicz <jan.malkiewicz@nokia.com>
Change-Id: I710d9f6c9bd22318e5152e5215b78d5a9e7b4540
Diffstat (limited to 'certServiceK8sExternalProvider/deploy')
-rw-r--r-- | certServiceK8sExternalProvider/deploy/_certificate_example_.yaml (renamed from certServiceK8sExternalProvider/deploy/_certificte_example_.yaml) | 6 | ||||
-rw-r--r-- | certServiceK8sExternalProvider/deploy/configuration.yaml | 4 | ||||
-rw-r--r-- | certServiceK8sExternalProvider/deploy/crd.yaml | 24 | ||||
-rw-r--r-- | certServiceK8sExternalProvider/deploy/roles.yaml | 22 |
4 files changed, 28 insertions, 28 deletions
diff --git a/certServiceK8sExternalProvider/deploy/_certificte_example_.yaml b/certServiceK8sExternalProvider/deploy/_certificate_example_.yaml index 70708036..60665d7f 100644 --- a/certServiceK8sExternalProvider/deploy/_certificte_example_.yaml +++ b/certServiceK8sExternalProvider/deploy/_certificate_example_.yaml @@ -43,8 +43,8 @@ spec: duration: 24h # Renew 8 hours before the certificate expiration renewBefore: 8h - # The reference to the step issuer + # The reference to the CMPv2 issuer issuerRef: group: certmanager.onap.org - kind: CertificateRequest - name: certservice-issuer + kind: CMPv2Issuer + name: cmpv2-issuer diff --git a/certServiceK8sExternalProvider/deploy/configuration.yaml b/certServiceK8sExternalProvider/deploy/configuration.yaml index 08e26fce..95c38d75 100644 --- a/certServiceK8sExternalProvider/deploy/configuration.yaml +++ b/certServiceK8sExternalProvider/deploy/configuration.yaml @@ -23,9 +23,9 @@ # apiVersion: certmanager.onap.org/v1 -kind: CertServiceIssuer +kind: CMPv2Issuer metadata: - name: certservice-issuer + name: cmpv2-issuer namespace: onap spec: url: https://certservice.default.svc.cluster.local diff --git a/certServiceK8sExternalProvider/deploy/crd.yaml b/certServiceK8sExternalProvider/deploy/crd.yaml index 9bdbf350..1d45b0c9 100644 --- a/certServiceK8sExternalProvider/deploy/crd.yaml +++ b/certServiceK8sExternalProvider/deploy/crd.yaml @@ -25,14 +25,14 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: - name: certserviceissuers.certmanager.onap.org + name: cmpv2issuers.certmanager.onap.org spec: group: certmanager.onap.org names: - kind: CertServiceIssuer - listKind: CertServiceIssuerList - plural: certserviceissuers - singular: certserviceissuer + kind: CMPv2Issuer + listKind: CMPv2IssuerList + plural: cmpv2issuers + singular: cmpv2issuer scope: Namespaced versions: - name: v1 @@ -40,29 +40,29 @@ spec: storage: true schema: openAPIV3Schema: - description: CertServiceIssuer is the Schema for the certserviceissuers API + description: CMPv2Issuer is the Schema for the cmpv2issuers API properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/cmpv2api-conventions.md#resources' type: string kind: description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/cmpv2api-conventions.md#types-kinds' type: string metadata: type: object spec: - description: CertServiceIssuerSpec defines the desired state of CertServiceIssuer + description: CMPv2IssuerSpec defines the desired state of CMPv2Issuer properties: url: description: URL is the base URL for the certservice certificates instance. type: string keyRef: description: keyRef is a reference to a Secret containing the - provisioner password used to decrypt the provisioner private key. + cmpv2provisioner password used to decrypt the cmpv2provisioner private key. properties: key: description: The key of the secret to select from. Must be a @@ -81,11 +81,11 @@ spec: - keyRef type: object status: - description: CertServiceIssuerStatus defines the observed state of CertServiceIssuer + description: CMPv2IssuerStatus defines the observed state of CMPv2Issuer properties: conditions: items: - description: CertServiceIssuerCondition contains condition information for + description: CMPv2IssuerCondition contains condition information for the certservice issuer. properties: lastTransitionTime: diff --git a/certServiceK8sExternalProvider/deploy/roles.yaml b/certServiceK8sExternalProvider/deploy/roles.yaml index 8b47c886..61691f4f 100644 --- a/certServiceK8sExternalProvider/deploy/roles.yaml +++ b/certServiceK8sExternalProvider/deploy/roles.yaml @@ -25,7 +25,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: - name: certservice-issuer-leader-election-role + name: cmpv2-issuer-leader-election-role namespace: onap rules: - apiGroups: @@ -58,7 +58,7 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: certservice-issuer-manager-role + name: cmpv2-issuer-manager-role rules: - apiGroups: - "" @@ -95,7 +95,7 @@ rules: - apiGroups: - certmanager.onap.org resources: - - certserviceissuers + - cmpv2issuers verbs: - create - delete @@ -107,7 +107,7 @@ rules: - apiGroups: - certmanager.onap.org resources: - - certserviceissuers/status + - cmpv2issuers/status verbs: - get - patch @@ -116,7 +116,7 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: certservice-issuer-proxy-role + name: cmpv2-issuer-proxy-role rules: - apiGroups: - authentication.k8s.io @@ -134,12 +134,12 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: certservice-issuer-leader-election-rolebinding + name: cmpv2-issuer-leader-election-rolebinding namespace: onap roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: certservice-issuer-leader-election-role + name: cmpv2-issuer-leader-election-role subjects: - kind: ServiceAccount name: default @@ -148,11 +148,11 @@ subjects: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: certservice-issuer-manager-rolebinding + name: cmpv2-issuer-manager-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: certservice-issuer-manager-role + name: cmpv2-issuer-manager-role subjects: - kind: ServiceAccount name: default @@ -161,11 +161,11 @@ subjects: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: certservice-issuer-proxy-rolebinding + name: cmpv2-issuer-proxy-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: certservice-issuer-proxy-role + name: cmpv2-issuer-proxy-role subjects: - kind: ServiceAccount name: default |