Skip to content

Commit

Permalink
Prepare for release v0.16.2 (#584)
Browse files Browse the repository at this point in the history
ProductLine: KubeDB

Release: v2021.01.26

Release-tracker: kubedb/CHANGELOG#31
Signed-off-by: 1gtm <[email protected]>
  • Loading branch information
1gtm authored Jan 26, 2021
1 parent ff1a7aa commit ada47bf
Show file tree
Hide file tree
Showing 11 changed files with 266 additions and 281 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ require (
kmodules.xyz/custom-resources v0.0.0-20201124062543-bd8d35c21b0c
kmodules.xyz/monitoring-agent-api v0.0.0-20201105074044-be7a1044891a
kmodules.xyz/objectstore-api v0.0.0-20201105133858-cbb2af88d50a
kubedb.dev/apimachinery v0.16.1
kubedb.dev/apimachinery v0.16.2
stash.appscode.dev/apimachinery v0.11.9
)

Expand Down
10 changes: 2 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1382,10 +1382,6 @@ k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 h1:d4vVOjXm687F1iLSP2q3lyPPuyvTU
k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
kmodules.xyz/client-go v0.0.0-20201105071625-0b277310b9b8 h1:zs2+yI/Ola5HjdtfP29XD76Bx5BO4WchC2uN9lkhxQM=
kmodules.xyz/client-go v0.0.0-20201105071625-0b277310b9b8/go.mod h1:WXDwZBmvrcLgGcuO9iZpI9jcfPuDFfWbxA4EnhAFtGw=
kmodules.xyz/client-go v0.0.0-20201208053851-a1d7be95e006 h1:gNrNTwi0jViRqdszsb0W5CQF+ANNVFlvh/LO0A3R7dM=
kmodules.xyz/client-go v0.0.0-20201208053851-a1d7be95e006/go.mod h1:WXDwZBmvrcLgGcuO9iZpI9jcfPuDFfWbxA4EnhAFtGw=
kmodules.xyz/client-go v0.0.0-20201230092550-8ca15cfcbefa h1:1a6/yWhBhxAXzvPsPXW4tg7l93pP2B9LsEZOe4ldGPE=
kmodules.xyz/client-go v0.0.0-20201230092550-8ca15cfcbefa/go.mod h1:WXDwZBmvrcLgGcuO9iZpI9jcfPuDFfWbxA4EnhAFtGw=
kmodules.xyz/client-go v0.0.0-20210108092221-c3812eb92bd0 h1:VHpZt3cG/yY6UrA3vjoUc4pJtc/jVbjt2A3OPuMXBOQ=
kmodules.xyz/client-go v0.0.0-20210108092221-c3812eb92bd0/go.mod h1:WXDwZBmvrcLgGcuO9iZpI9jcfPuDFfWbxA4EnhAFtGw=
kmodules.xyz/client-go v0.0.0-20210118094617-273ba20ad7ca h1:w2vMnu71zJf8RB0qAMV3yt7zHnwg456u6B0S9OHz2lc=
Expand All @@ -1404,8 +1400,8 @@ kmodules.xyz/openshift v0.0.0-20201105073146-0da509a7d39f/go.mod h1:vFwB/f5rVH5Q
kmodules.xyz/prober v0.0.0-20201105074402-a243b3a27fd8 h1:UJb5lHQVFKbmlgmRLq5IWJGtz3JqYYbyVG+dNdjC9Cc=
kmodules.xyz/prober v0.0.0-20201105074402-a243b3a27fd8/go.mod h1:2eN8X5Wq7/AAgE5AWMAX8T0lE51HZiYEldG2RQuouX4=
kmodules.xyz/webhook-runtime v0.0.0-20201105073856-2dc7382b88c6/go.mod h1:xLgewoOzwR5ZrVOHQ2SR0P4E7tgCyBWbYlUawEXgeF4=
kubedb.dev/apimachinery v0.16.1 h1:KIv0QZhVdEdfLL9M2rAeuMR6WYGGWFttGuwaTXa93kQ=
kubedb.dev/apimachinery v0.16.1/go.mod h1:jfH9wMWLd+rgDagKSFegJ1OJE8FU3V3rc+0dBCdi1sk=
kubedb.dev/apimachinery v0.16.2 h1:o5WLSOFSFzvBsm8eYih+BjEJWTbmQudVLVo6r8HJkRs=
kubedb.dev/apimachinery v0.16.2/go.mod h1:EM+0s3WljTCCuZtVGVDNfED61SNw8+cdP/HAd+KwCOE=
modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=
modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=
Expand Down Expand Up @@ -1433,8 +1429,6 @@ sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
software.sslmate.com/src/go-pkcs12 v0.0.0-20180114231543-2291e8f0f237/go.mod h1:/xvNRWUqm0+/ZMiF4EX00vrSCMsE4/NHb+Pt3freEeQ=
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0=
stash.appscode.dev/apimachinery v0.11.8 h1:Po7gDpZqd+iQ8DR3zu1iJgIPQiFODPjiA6NIKhO2+7s=
stash.appscode.dev/apimachinery v0.11.8/go.mod h1:s91NxOW9K/CLv9Cl9XVCzBLgdKqVcUOyc9VrYg0NNB0=
stash.appscode.dev/apimachinery v0.11.9 h1:rTGXRrwxRSuM3bwA8W1x2PuXPQtmwUA3PL7wO5iVH5k=
stash.appscode.dev/apimachinery v0.11.9/go.mod h1:Ixnv6Oq7O6XgofgEDrbQhvFCZu2t4XDx16dPgMsxnUM=
vbom.ml/util v0.0.0-20160121211510-db5cfe13f5cc/go.mod h1:so/NYdZXCz+E3ZpW0uAoCj6uzU2+8OWDFv/HxUSs7kI=
Original file line number Diff line number Diff line change
Expand Up @@ -398,19 +398,13 @@ func (e *Elasticsearch) SetTLSDefaults(esVersion *v1alpha1.ElasticsearchVersion)
tlsConfig.Certificates = kmapi.SetMissingSpecForCertificate(tlsConfig.Certificates, kmapi.CertificateSpec{
Alias: string(ElasticsearchCACert),
SecretName: e.CertificateName(ElasticsearchCACert),
Subject: &kmapi.X509Subject{
Organizations: []string{KubeDBOrganization},
},
})
}

// transport layer is always secured with certificate
tlsConfig.Certificates = kmapi.SetMissingSpecForCertificate(tlsConfig.Certificates, kmapi.CertificateSpec{
Alias: string(ElasticsearchTransportCert),
SecretName: e.CertificateName(ElasticsearchTransportCert),
Subject: &kmapi.X509Subject{
Organizations: []string{KubeDBOrganization},
},
})

// If SSL is enabled, set missing certificate spec
Expand All @@ -419,9 +413,6 @@ func (e *Elasticsearch) SetTLSDefaults(esVersion *v1alpha1.ElasticsearchVersion)
tlsConfig.Certificates = kmapi.SetMissingSpecForCertificate(tlsConfig.Certificates, kmapi.CertificateSpec{
Alias: string(ElasticsearchHTTPCert),
SecretName: e.CertificateName(ElasticsearchHTTPCert),
Subject: &kmapi.X509Subject{
Organizations: []string{KubeDBOrganization},
},
})

// Set missing admin certificate spec, if authPlugin is either "OpenDistro" or "SearchGuard"
Expand All @@ -430,9 +421,6 @@ func (e *Elasticsearch) SetTLSDefaults(esVersion *v1alpha1.ElasticsearchVersion)
tlsConfig.Certificates = kmapi.SetMissingSpecForCertificate(tlsConfig.Certificates, kmapi.CertificateSpec{
Alias: string(ElasticsearchAdminCert),
SecretName: e.CertificateName(ElasticsearchAdminCert),
Subject: &kmapi.X509Subject{
Organizations: []string{KubeDBOrganization},
},
})
}

Expand All @@ -442,27 +430,30 @@ func (e *Elasticsearch) SetTLSDefaults(esVersion *v1alpha1.ElasticsearchVersion)
tlsConfig.Certificates = kmapi.SetMissingSpecForCertificate(tlsConfig.Certificates, kmapi.CertificateSpec{
Alias: string(ElasticsearchMetricsExporterCert),
SecretName: e.CertificateName(ElasticsearchMetricsExporterCert),
Subject: &kmapi.X509Subject{
Organizations: []string{KubeDBOrganization},
},
})
}

// archiver
tlsConfig.Certificates = kmapi.SetMissingSpecForCertificate(tlsConfig.Certificates, kmapi.CertificateSpec{
Alias: string(ElasticsearchArchiverCert),
SecretName: e.CertificateName(ElasticsearchArchiverCert),
Subject: &kmapi.X509Subject{
Organizations: []string{KubeDBOrganization},
},
})
}

// Force overwrite the private key encoding type to PKCS#8
for id := range tlsConfig.Certificates {
// Force overwrite the private key encoding type to PKCS#8
tlsConfig.Certificates[id].PrivateKey = &kmapi.CertificatePrivateKey{
Encoding: kmapi.PKCS8,
}
// Set default subject to O:KubeDB, if missing.
// It isn't set from SetMissingSpecForCertificate(),
// Because the default organization(ie. kubedb) gets merged, even if
// the organizations[] isn't empty.
if tlsConfig.Certificates[id].Subject == nil {
tlsConfig.Certificates[id].Subject = &kmapi.X509Subject{
Organizations: []string{KubeDBOrganization},
}
}
}

e.Spec.TLS = tlsConfig
Expand Down
Loading

0 comments on commit ada47bf

Please sign in to comment.