Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes in control plane services CLI flags #6925

Merged
merged 46 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
db9c826
Fixes in control plane services CLI flags
ItalyPaleAle Sep 14, 2023
533143a
Merge branch 'master' into fix-control-plane-cli
ItalyPaleAle Sep 14, 2023
d057666
Merge branch 'master' into fix-control-plane-cli
dapr-bot Sep 15, 2023
b707a17
Merge branch 'master' into fix-control-plane-cli
dapr-bot Sep 19, 2023
3ea332d
Merge branch 'master' into fix-control-plane-cli
dapr-bot Sep 20, 2023
1da6181
Merge branch 'master' into fix-control-plane-cli
dapr-bot Sep 20, 2023
7f7952b
Merge branch 'master' into fix-control-plane-cli
dapr-bot Sep 20, 2023
5144571
Merge branch 'master' into fix-control-plane-cli
dapr-bot Sep 20, 2023
19a3d7e
Merge branch 'master' into fix-control-plane-cli
dapr-bot Sep 20, 2023
b8ce571
Merge branch 'master' into fix-control-plane-cli
dapr-bot Sep 25, 2023
44325f6
Merge branch 'master' of https://github.com/dapr/dapr into fix-contro…
ItalyPaleAle Sep 30, 2023
db6b2fa
Merge branch 'master' into fix-control-plane-cli
dapr-bot Oct 4, 2023
598294e
Merge branch 'master' into fix-control-plane-cli
dapr-bot Oct 5, 2023
daf8567
Merge branch 'master' into fix-control-plane-cli
ItalyPaleAle Oct 6, 2023
9a1e466
Merge branch 'master' into fix-control-plane-cli
dapr-bot Oct 9, 2023
2f5064b
Merge branch 'master' into fix-control-plane-cli
dapr-bot Oct 9, 2023
782a715
Merge branch 'master' into fix-control-plane-cli
dapr-bot Oct 10, 2023
d63fd39
Merge branch 'master' into fix-control-plane-cli
dapr-bot Oct 10, 2023
7688036
Merge branch 'master' into fix-control-plane-cli
dapr-bot Oct 12, 2023
b3f5791
Merge branch 'master' into fix-control-plane-cli
dapr-bot Oct 13, 2023
602fe90
Merge branch 'master' into fix-control-plane-cli
dapr-bot Oct 16, 2023
245f084
Merge branch 'master' into fix-control-plane-cli
dapr-bot Oct 17, 2023
97da5ec
Merge branch 'master' into fix-control-plane-cli
dapr-bot Oct 18, 2023
1359130
Merge branch 'master' into fix-control-plane-cli
dapr-bot Oct 19, 2023
87c6082
Merge branch 'master' into fix-control-plane-cli
dapr-bot Oct 20, 2023
03bd146
Merge branch 'master' into fix-control-plane-cli
dapr-bot Oct 20, 2023
70ef3c0
Merge branch 'master' into fix-control-plane-cli
dapr-bot Oct 20, 2023
44298ab
Merge branch 'master' into fix-control-plane-cli
mukundansundar Oct 21, 2023
8a781f8
Merge branch 'master' into fix-control-plane-cli
dapr-bot Oct 21, 2023
8f5ad16
Merge branch 'master' into fix-control-plane-cli
dapr-bot Oct 21, 2023
527cba2
Merge branch 'master' into fix-control-plane-cli
dapr-bot Oct 21, 2023
ff61b5e
Merge branch 'master' into fix-control-plane-cli
dapr-bot Oct 21, 2023
e5d26ab
Merge branch 'master' into fix-control-plane-cli
dapr-bot Oct 23, 2023
9e79c4b
Merge branch 'master' into fix-control-plane-cli
dapr-bot Oct 23, 2023
cc72df0
Merge branch 'master' into fix-control-plane-cli
dapr-bot Oct 24, 2023
b4ed3da
Merge branch 'master' into fix-control-plane-cli
dapr-bot Oct 24, 2023
36f14a6
Merge branch 'master' into fix-control-plane-cli
dapr-bot Oct 24, 2023
4809e04
Merge branch 'master' into fix-control-plane-cli
dapr-bot Oct 26, 2023
81b2a43
Merge branch 'master' into fix-control-plane-cli
dapr-bot Oct 27, 2023
2138558
Merge branch 'master' into fix-control-plane-cli
dapr-bot Oct 27, 2023
5f4aacf
Merge branch 'master' into fix-control-plane-cli
dapr-bot Oct 30, 2023
8271278
Merge branch 'master' into fix-control-plane-cli
dapr-bot Oct 30, 2023
7940a2a
Merge branch 'master' into fix-control-plane-cli
dapr-bot Nov 2, 2023
7714763
Merge branch 'master' into fix-control-plane-cli
dapr-bot Nov 2, 2023
a7e8d0d
Merge branch 'master' of https://github.com/dapr/dapr into fix-contro…
ItalyPaleAle Nov 7, 2023
e7bfac7
Merge branch 'master' into fix-control-plane-cli
dapr-bot Nov 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion charts/dapr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ The Helm chart has the follow configuration options that can be supplied:
| `dapr_sentry.tls.issuer.certPEM` | Issuer Certificate cert | `""` |
| `dapr_sentry.tls.issuer.keyPEM` | Issuer Private Key cert | `""` |
| `dapr_sentry.tls.root.certPEM` | Root Certificate cert | `""` |
| `dapr_sentry.tokenAudience` | Expected audience for tokens; multiple values can be separated by a comma. Defaults to the audience expected by the Kubernetes control plane if not set | `""` |
| `dapr_sentry.runAsNonRoot` | Boolean value for `securityContext.runAsNonRoot`. You may have to set this to `false` when running in Minikube | `true` |
| `dapr_sentry.resources` | Value of `resources` attribute. Can be used to set memory/cpu resources/limits. See the section "Resource configuration" above. Defaults to empty | `{}` |
| `dapr_sentry.debug.enabled` | Boolean value for enabling debug mode | `{}` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,6 @@ spec:
{{- end }}
- "--trust-domain"
- {{ .Values.global.mtls.controlPlaneTrustDomain }}
{{- if .Values.tokenAudience }}
- "--token-audience"
- {{ .Values.tokenAudience }}
{{- end }}
{{- with .Values.global.issuerFilenames }}
- "--issuer-ca-filename"
- "{{ .ca }}"
Expand Down
2 changes: 0 additions & 2 deletions charts/dapr/charts/dapr_sentry/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ image:
nameOverride: ""
fullnameOverride: ""

tokenAudience: ""

deploymentAnnotations: {}

service:
Expand Down
12 changes: 2 additions & 10 deletions cmd/operator/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"k8s.io/klog"

"github.com/dapr/dapr/pkg/metrics"
securityConsts "github.com/dapr/dapr/pkg/security/consts"
"github.com/dapr/kit/logger"
)

Expand Down Expand Up @@ -72,12 +73,7 @@ func New() *Options {
flag.BoolVar(&opts.EnableArgoRolloutServiceReconciler, "enable-argo-rollout-service-reconciler", false, "Enable the service reconciler for Dapr-enabled Argo Rollouts")
flag.BoolVar(&opts.WatchdogCanPatchPodLabels, "watchdog-can-patch-pod-labels", false, "Allow watchdog to patch pod labels to set pods with sidecar present")

flag.StringVar(&opts.TrustAnchorsFile, "trust-anchors-file", "/var/run/secrets/dapr.io/tls/ca.crt", "Path to trust anchors file")

depCCP := flag.String("certchain", "", "DEPRECATED")
depRCF := flag.String("issuer-ca-filename", "", "DEPRECATED")
depICF := flag.String("issuer-certificate-filename", "", "DEPRECATED")
depIKF := flag.String("issuer-key-filename", "", "DEPRECATED")
flag.StringVar(&opts.TrustAnchorsFile, "trust-anchors-file", securityConsts.ControlPlaneDefaultTrustAnchorsPath, "Filepath to the trust anchors for the Dapr control plane")

ItalyPaleAle marked this conversation as resolved.
Show resolved Hide resolved
opts.Logger = logger.DefaultOptions()
opts.Logger.AttachCmdFlags(flag.StringVar, flag.BoolVar)
Expand All @@ -87,10 +83,6 @@ func New() *Options {

flag.Parse()

if len(*depRCF) > 0 || len(*depICF) > 0 || len(*depIKF) > 0 || len(*depCCP) > 0 {
log.Warn("--certchain, --issuer-ca-filename, --issuer-certificate-filename and --issuer-key-filename are deprecated and will be removed in v1.14")
}

wilc := strings.ToLower(opts.watchdogIntervalStr)
switch wilc {
case "0", "false", "f", "no", "off":
Expand Down
16 changes: 3 additions & 13 deletions cmd/placement/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"github.com/dapr/dapr/pkg/modes"
"github.com/dapr/dapr/pkg/placement/raft"
"github.com/dapr/dapr/pkg/security"
securityConsts "github.com/dapr/dapr/pkg/security/consts"
"github.com/dapr/kit/logger"
"github.com/dapr/kit/utils"
)
Expand Down Expand Up @@ -62,8 +63,6 @@ type Options struct {
Metrics *metrics.Options
}

var log = logger.NewLogger("dapr.placement.options")
daixiang0 marked this conversation as resolved.
Show resolved Hide resolved

func New() *Options {
// Default options
var opts Options
Expand All @@ -79,15 +78,10 @@ func New() *Options {
flag.IntVar(&opts.ReplicationFactor, "replicationFactor", defaultReplicationFactor, "sets the replication factor for actor distribution on vnodes")

flag.StringVar(&opts.TrustDomain, "trust-domain", "localhost", "Trust domain for the Dapr control plane")
flag.StringVar(&opts.TrustAnchorsFile, "trust-anchors-file", "/var/run/secrets/dapr.io/tls/ca.crt", "Filepath to the trust anchors for the Dapr control plane")
flag.StringVar(&opts.SentryAddress, "sentry-address", fmt.Sprintf("dapr-sentry.%s.svc:443", security.CurrentNamespace()), "Filepath to the trust anchors for the Dapr control plane")
flag.StringVar(&opts.TrustAnchorsFile, "trust-anchors-file", securityConsts.ControlPlaneDefaultTrustAnchorsPath, "Filepath to the trust anchors for the Dapr control plane")
flag.StringVar(&opts.SentryAddress, "sentry-address", fmt.Sprintf("dapr-sentry.%s.svc:443", security.CurrentNamespace()), "Address of the Sentry service")
flag.StringVar(&opts.Mode, "mode", string(modes.StandaloneMode), "Runtime mode for Placement")

depCC := flag.String("certchain", "", "DEPRECATED")
depRCF := flag.String("issuer-ca-filename", "", "DEPRECATED")
depICF := flag.String("issuer-certificate-filename", "", "DEPRECATED")
depIKF := flag.String("issuer-key-filename", "", "DEPRECATED")

opts.Logger = logger.DefaultOptions()
opts.Logger.AttachCmdFlags(flag.StringVar, flag.BoolVar)

Expand All @@ -99,10 +93,6 @@ func New() *Options {

flag.Parse()

if len(*depRCF) > 0 || len(*depICF) > 0 || len(*depIKF) > 0 || len(*depCC) > 0 {
log.Warn("--certchain, --issuer-ca-filename, --issuer-certificate-filename and --issuer-key-filename are deprecated and will be removed in v1.14.")
}

opts.RaftPeers = parsePeersFromFlag(opts.RaftPeerString)
if opts.RaftLogStorePath != "" {
opts.RaftInMemEnabled = false
Expand Down
4 changes: 0 additions & 4 deletions cmd/sentry/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ func main() {

metricsExporter := metrics.NewExporterWithOptions(log, metrics.DefaultMetricNamespace, opts.Metrics)

if len(opts.TokenAudience) > 0 {
log.Warn("--token-audience is deprecated and will be removed in Dapr v1.14")
ItalyPaleAle marked this conversation as resolved.
Show resolved Hide resolved
}

if err := utils.SetEnvVariables(map[string]string{
utils.KubeConfigVar: opts.Kubeconfig,
}); err != nil {
Expand Down
2 changes: 0 additions & 2 deletions cmd/sentry/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ type Options struct {
HealthzPort int
IssuerCredentialsPath string
TrustDomain string
TokenAudience string
Kubeconfig string
Logger logger.Options
Metrics *metrics.Options
Expand All @@ -57,7 +56,6 @@ func New() *Options {
flag.StringVar(&opts.IssuerCertFilename, "issuer-certificate-filename", config.DefaultIssuerCertFilename, "Issuer certificate filename")
flag.StringVar(&opts.IssuerKeyFilename, "issuer-key-filename", config.DefaultIssuerKeyFilename, "Issuer private key filename")
flag.StringVar(&opts.TrustDomain, "trust-domain", "localhost", "The CA trust domain")
flag.StringVar(&opts.TokenAudience, "token-audience", "", "DEPRECATED, flag has no effect.")
flag.IntVar(&opts.Port, "port", config.DefaultPort, "The port for the sentry server to listen on")
flag.IntVar(&opts.HealthzPort, "healthz-port", 8080, "The port for the healthz server to listen on")

Expand Down
3 changes: 3 additions & 0 deletions pkg/security/consts/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,7 @@ const (
// ControlPlaneAddressEnvVar is the daprd environment variable for
// configuring the control plane trust domain.
ControlPlaneTrustDomainEnvVar = "DAPR_CONTROLPLANE_TRUST_DOMAIN"

// ControlPlaneDefaultTrustAnchorsPath is the default path where the trust anchors are placed for control plane services.
ControlPlaneDefaultTrustAnchorsPath = "/var/run/secrets/dapr.io/tls/ca.crt"
)