mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-19 02:05:23 +00:00
PT-2299 - collect openssl x509 certificate information for each secret
- Added missed secrets for PostgreSQL Operator v1
This commit is contained in:
@@ -6,13 +6,13 @@ import (
|
||||
"compress/gzip"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"html/template"
|
||||
"log"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"strings"
|
||||
"text/template"
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
@@ -132,6 +132,16 @@ func New(location, namespace, resource string, kubeconfig string, forwardport st
|
||||
resource: "perconapgclusters",
|
||||
dataNames: []string{"ca.crt"},
|
||||
},
|
||||
sslSecret{
|
||||
secret: "{{ .Name }}-ssl-keypair",
|
||||
resource: "perconapgclusters",
|
||||
dataNames: []string{"tls.crt"},
|
||||
},
|
||||
sslSecret{
|
||||
secret: "{{ .Name }}-replication-ssl-keypair",
|
||||
resource: "perconapgclusters",
|
||||
dataNames: []string{"tls.crt"},
|
||||
},
|
||||
sslSecret{
|
||||
secret: "pgo.tls",
|
||||
resource: "perconapgclusters",
|
||||
|
@@ -276,12 +276,16 @@ func TestSSLResourceOption(t *testing.T) {
|
||||
cmds: [][]string{
|
||||
{"tar", "--to-command", "grep -m 1 -o ca.crt", "-xzf", "cluster-dump.tar.gz", "--wildcards", "cluster-dump/*/*ssl-ca"},
|
||||
{"tar", "--to-command", "grep -m 1 -o Certificate", "-xzf", "cluster-dump.tar.gz", "--wildcards", "cluster-dump/*/*ssl-ca"},
|
||||
{"tar", "--to-command", "grep -m 1 -o tls.crt", "-xzf", "cluster-dump.tar.gz", "--wildcards", "cluster-dump/*/*-ssl-keypair"},
|
||||
{"tar", "--to-command", "grep -m 1 -o Certificate", "-xzf", "cluster-dump.tar.gz", "--wildcards", "cluster-dump/*/*-ssl-keypair"},
|
||||
{"tar", "--to-command", "grep -m 1 -o tls.crt", "-xzf", "cluster-dump.tar.gz", "--wildcards", "cluster-dump/*/pgo.tls"},
|
||||
{"tar", "--to-command", "grep -m 1 -o Certificate", "-xzf", "cluster-dump.tar.gz", "--wildcards", "cluster-dump/*/pgo.tls"},
|
||||
},
|
||||
want: []string{
|
||||
"ca.crt",
|
||||
"Certificate",
|
||||
"tls.crt\ntls.crt",
|
||||
"Certificate\nCertificate",
|
||||
"tls.crt",
|
||||
"Certificate",
|
||||
},
|
||||
|
Reference in New Issue
Block a user