-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcertmanager.py
38 lines (27 loc) · 1003 Bytes
/
certmanager.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import logging
logger = logging.getLogger(__name__)
from .common import KubernetesResource, kgenlib
@kgenlib.register_generator(path="certmanager.issuer")
class CertManagerIssuer(KubernetesResource):
kind: str = "Issuer"
api_version: str = "cert-manager.io/v1"
def body(self):
config = self.config
super().body()
self.root.spec = config.get("spec")
@kgenlib.register_generator(path="certmanager.cluster_issuer")
class CertManagerClusterIssuer(KubernetesResource):
kind: str = "ClusterIssuer"
api_version: str = "cert-manager.io/v1"
def body(self):
config = self.config
super().body()
self.root.spec = config.get("spec")
@kgenlib.register_generator(path="certmanager.certificate")
class CertManagerCertificate(KubernetesResource):
kind: str = "Certificate"
api_version: str = "cert-manager.io/v1"
def body(self):
config = self.config
super().body()
self.root.spec = config.get("spec")