Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CSRInfo ¶
type CSRInfo struct { Country string `yaml:"country"` State string `yaml:"state"` Locality string `yaml:"locality"` OrganisationName string `yaml:"organisationname"` OrganisationalUnitName string `yaml:"organisationalunitname"` }
CSR request details
type CertConfig ¶
type CertConfig struct { Name string `yaml:"name"` Metadata MetadataInfo `yaml:"metadata"` Spec map[string]*CertificateInfo `yaml:"spec"` }
CertConfig cert.yaml file get read into this struct
func GetCertConfig ¶
func GetCertConfig(filename string) (*CertConfig, error)
GetCertConfig reads the cert.yaml and create CertConfig object
func (*CertConfig) GetCertificateObjects ¶
func (c *CertConfig) GetCertificateObjects() []*CertificateObject
GetCertificateObject converts CertConfig to CertificateDetails object
type CertGen ¶
type CertGen struct { Namespace string // contains filtered or unexported fields }
CertGen type
func (*CertGen) GenerateCertificate ¶
func (c *CertGen) GenerateCertificate(cs *CertConfig)
GenerateCertificate Generates certificates as per the cert.yaml configuration It performes following steps: 1. Generates local certificate key and CSR 2. Sends CSR to kubernetes certificate services 3. Tries to approve that CSR 4. Once its approved, downloads the certificate 5. Creates the secret in provided namespace
type CertificateInfo ¶
type CertificateInfo struct { Name string `yaml:"name"` //References []string `yaml:"references"` CSR CSRInfo `yaml:"csr"` //AlternameNames []string `yaml:"alternamenames"` Hosts []string `yaml:"hosts"` }
CertificateInfo
type CertificateObject ¶
type CertificateObject struct { CertificateInfoObj *CertificateInfo CSR *certificates.CertificateSigningRequest CSRSpec *certificates.CertificateSigningRequestSpec CertKey []byte Cert []byte }
CertificateObject hosts all the information about specific certificate
func NewCertificateObject ¶
func NewCertificateObject(certInfo *CertificateInfo) *CertificateObject
func (*CertificateObject) CreateCertificate ¶
func (c *CertificateObject) CreateCertificate(name string) *certificates.CertificateSigningRequest
func (*CertificateObject) UpdatedApproval ¶
func (c *CertificateObject) UpdatedApproval() *certificates.CertificateSigningRequest
type MetadataInfo ¶
type MetadataInfo struct { Name string `yaml:"name"` Lables map[string]interface{} `yaml:"lables"` }
MetadataInfo