Skip to content

Commit

Permalink
Merge pull request #100 from g-soeldner/feat/certtemplate
Browse files Browse the repository at this point in the history
Feat/certtemplate
  • Loading branch information
inteon authored Jun 26, 2023
2 parents e3f6e0b + 47df033 commit f4144e5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/v1beta1/googlecasissuer_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ type GoogleCASIssuerSpec struct {
// Credentials is a reference to a Kubernetes Secret Key that contains Google Service Account Credentials
// +optional
Credentials cmmetav1.SecretKeySelector `json:"credentials,omitempty"`

// CertificateTemplate is specific certificate template to
// use. Omit to not specify a template
// +optional
CertificateTemplate string `json:"certificateTemplate,omitempty"`
}

// GoogleCASIssuerStatus defines the observed state of GoogleCASIssuer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ spec:
certificateAuthorityId:
description: CertificateAuthorityId is specific certificate authority to use to sign. Omit in order to load balance across all CAs in the pool
type: string
certificateTemplate:
description: CertificateTemplate is specific certificate template to use. Omit to not specify a template
type: string
credentials:
description: Credentials is a reference to a Kubernetes Secret Key that contains Google Service Account Credentials
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ spec:
certificateAuthorityId:
description: CertificateAuthorityId is specific certificate authority to use to sign. Omit in order to load balance across all CAs in the pool
type: string
certificateTemplate:
description: CertificateTemplate is specific certificate template to use. Omit to not specify a template
type: string
credentials:
description: Credentials is a reference to a Kubernetes Secret Key that contains Google Service Account Credentials
type: object
Expand Down
1 change: 1 addition & 0 deletions pkg/cas/cas.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ func (c *casSigner) Sign(csr []byte, expiry time.Duration) (cert []byte, ca []by
Seconds: expiry.Milliseconds() / 1000,
Nanos: 0,
},
CertificateTemplate: c.spec.CertificateTemplate,
},
RequestId: uuid.New().String(),
IssuingCertificateAuthorityId: c.spec.CertificateAuthorityId,
Expand Down

0 comments on commit f4144e5

Please sign in to comment.