func newCASecret(cr *argoprojv1a1.ArgoCD) (*corev1.Secret, error) {
	secret := argoutil.NewTLSSecret(cr.ObjectMeta, "ca")

	key, err := argoutil.NewPrivateKey()
	if err != nil {
		return nil, err
	}

	cert, err := argoutil.NewSelfSignedCACertificate(key)
	if err != nil {
		return nil, err
	}

	secret.Data = map[string][]byte{
		corev1.TLSCertKey:       argoutil.EncodeCertificatePEM(cert),
		corev1.TLSPrivateKeyKey: argoutil.EncodePrivateKeyPEM(key),
	}

	return secret, nil
}
// newCASecret creates a new CA secret with the given suffix for the given ArgoCD.
newCASecret creates a new CA secret with the given suffix for the given ArgoCD.
// newCASecret creates a new CA secret with the given suffix for the given ArgoCD .
func newCASecret(cr *argoprojv1a1.ArgoCD) (*corev1.Secret, error) {
	secret := argoutil.NewTLSSecret(cr.ObjectMeta, "ca")
	key, err := argoutil.NewPrivateKey()
	if err != nil {
		return nil, err
	}
	cert, err := argoutil.NewSelfSignedCACertificate(key)
	if err != nil {
		return nil, err
	}
	secret.Data = map[string][]byte{
		corev1.TLSCertKey:       argoutil.EncodeCertificatePEM(cert),
		corev1.TLSPrivateKeyKey: argoutil.EncodePrivateKeyPEM(key),
	}
	return secret, nil
}
func newCASecret ( cr * argoprojv1a1 . ArgoCD ) ( * corev1 . Secret , error ) { secret := argoutil . NewTLSSecret ( cr . ObjectMeta , " " ) key , err := argoutil . NewPrivateKey ( ) if err != nil { return nil , err } cert , err := argoutil . NewSelfSignedCACertificate ( key ) if err != nil { return nil , err } secret . Data = map [ string ] [ ] byte { corev1 . TLSCertKey : argoutil . EncodeCertificatePEM ( cert ) , corev1 . TLSPrivateKeyKey : argoutil . EncodePrivateKeyPEM ( key ) , } return secret , nil }
newCASecret creates a new CA secret with the given suffix for the given ArgoCD.
newCASecret creates a new CA secret with the given suffix for the given ArgoCD .