Documentation ¶
Index ¶
- func AddRotator(ctx context.Context, mgr manager.Manager, cr *CertRotator) error
- func GetGRPCClientCredentials(secret *corev1.Secret) (credentials.TransportCredentials, error)
- func GetGRPCServerCredentials(secret *corev1.Secret) (credentials.TransportCredentials, error)
- func RunnerServe(namespace, addr string, sigterm chan os.Signal) error
- func StartGRPCServerForTesting(ctx context.Context, server *runner.TerraformRunnerServer, namespace string, ...) error
- func ValidCert(caCert, cert, key []byte, dnsName string, at time.Time) (bool, error)
- type CertRotator
- type KeyPairArtifacts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddRotator ¶
AddRotator adds the CertRotator to the manager
func GetGRPCClientCredentials ¶
func GetGRPCClientCredentials(secret *corev1.Secret) (credentials.TransportCredentials, error)
GetGRPCClientCredentials returns transport credentials for a client connection
func GetGRPCServerCredentials ¶
func GetGRPCServerCredentials(secret *corev1.Secret) (credentials.TransportCredentials, error)
GetGRPCServerCredentials returns transport credentials for a server
func StartGRPCServerForTesting ¶
func StartGRPCServerForTesting(ctx context.Context, server *runner.TerraformRunnerServer, namespace string, addr string, mgr controllerruntime.Manager, rotator *CertRotator) error
StartGRPCServerForTesting should be used only for testing
Types ¶
type CertRotator ¶
type CertRotator struct { SecretKey types.NamespacedName CAName string CAOrganization string DNSName string Ready chan struct{} CAValidityDuration time.Duration CertValidityDuration time.Duration RotationCheckFrequency time.Duration LookaheadInterval time.Duration // contains filtered or unexported fields }
CertRotator contains cert artifacts and a channel to close when the certs are ready.
func (*CertRotator) IsCertReady ¶
func (cr *CertRotator) IsCertReady(ctx context.Context) bool
func (*CertRotator) RefreshRunnerCertIfNeeded ¶
type KeyPairArtifacts ¶
type KeyPairArtifacts struct { Cert *x509.Certificate Key *rsa.PrivateKey CertPEM []byte KeyPEM []byte }
KeyPairArtifacts stores cert artifacts.
Click to show internal directories.
Click to hide internal directories.