Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

add trust domain to mesh root certificate #4767

Merged
merged 2 commits into from
Jun 2, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions charts/osm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ The following table lists the configurable parameters of the osm chart and their
| osm.tracing.endpoint | string | `"/api/v2/spans"` | Tracing collector's API path where the spans will be sent to |
| osm.tracing.image | string | `"jaegertracing/all-in-one"` | Image used for tracing |
| osm.tracing.port | int | `9411` | Port of the tracing collector service |
| osm.trustDomain | string | `"cluster.local"` | The trust domain to use as part of the common name when requesting new certificates. |
| osm.validatorWebhook.webhookConfigurationName | string | `""` | Name of the ValidatingWebhookConfiguration |
| osm.vault.host | string | `""` | Hashicorp Vault host/service - where Vault is installed |
| osm.vault.port | int | `8200` | port to use to connect to Vault |
Expand Down
1 change: 1 addition & 0 deletions charts/osm/templates/preset-mesh-root-certificate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ metadata:
data:
preset-mesh-root-certificate.json: |
{
"trustDomain": {{.Values.osm.trustDomain | mustToJson}},
"provider": {
{{- if eq (.Values.osm.certificateProvider.kind | lower) "tresor"}}
"tresor": {
Expand Down
10 changes: 10 additions & 0 deletions charts/osm/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,16 @@
"envoyproxy/envoy-windows:v1.19.3@sha256:f990f024e7e95f07b6c0d416684734607761e382c35d1ba9414c7e3fbf23969c"
]
},
"trustDomain": {
"$id": "#/properties/osm/properties/trustDomain",
"type": "string",
"title": "The certificate issuance Trust Domain",
"description": "The trust domain to use as part of the common name when requesting new certificates.",
"examples": [
"cluster.local",
"example.com"
]
},
"certificateProvider": {
"$id": "#/properties/osm/properties/certificateProvider",
"type": "object",
Expand Down
3 changes: 3 additions & 0 deletions charts/osm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ osm:
# -- Image used for Prometheus
image: prom/prometheus:v2.34.0

# -- The trust domain to use as part of the common name when requesting new certificates.
trustDomain: cluster.local

certificateProvider:
# -- The Certificate manager type: `tresor`, `vault` or `cert-manager`
kind: tresor
Expand Down
4 changes: 4 additions & 0 deletions cmd/osm-bootstrap/crds/config_mesh_root_certificate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ spec:
required:
- provider
properties:
trustDomain:
description: Trust Domain to use in common name for certificates, ie "example.com"
type: string
default: cluster.local
provider:
description: Certificate provider used by the mesh control plane
type: object
Expand Down
3 changes: 3 additions & 0 deletions pkg/apis/config/v1alpha2/meshrootcertificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ type MeshRootCertificate struct {
type MeshRootCertificateSpec struct {
// Provider specifies the mesh certificate provider
Provider ProviderSpec `json:"provider"`

// TrustDomain is the trust domain to use as a suffix in Common Names for new certificates.
TrustDomain string `json:"trustDomain"`
}

// ProviderSpec defines the certificate provider used by the mesh control plane
Expand Down