Skip to content

Commit 8cd81b0

Browse files
authored
Merge pull request #1460 from antontroshin/merge-release-1.14-to-master
Merge release 1.14 to master
2 parents a3571c8 + 5446171 commit 8cd81b0

36 files changed

+553
-157
lines changed

.github/workflows/kind_e2e.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,10 @@ jobs:
5050
name: E2E tests for K8s (KinD)
5151
runs-on: ubuntu-latest
5252
env:
53-
DAPR_RUNTIME_PINNED_VERSION: 1.13.0-rc.2
53+
DAPR_RUNTIME_PINNED_VERSION: 1.13.5
5454
DAPR_DASHBOARD_PINNED_VERSION: 0.14.0
5555
DAPR_RUNTIME_LATEST_STABLE_VERSION:
5656
DAPR_DASHBOARD_LATEST_STABLE_VERSION:
57-
DAPR_TGZ: dapr-1.13.0-rc.2.tgz
5857
strategy:
5958
fail-fast: false # Keep running if one leg fails.
6059
matrix:

.github/workflows/self_hosted_e2e.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ jobs:
3838
GOARCH: ${{ matrix.target_arch }}
3939
GOPROXY: https://proxy.golang.org
4040
ARCHIVE_OUTDIR: dist/archives
41-
DAPR_RUNTIME_PINNED_VERSION: "1.13.0-rc.2"
41+
DAPR_RUNTIME_PINNED_VERSION: "1.13.5"
4242
DAPR_DASHBOARD_PINNED_VERSION: 0.14.0
4343
DAPR_RUNTIME_LATEST_STABLE_VERSION: ""
4444
DAPR_DASHBOARD_LATEST_STABLE_VERSION: ""
4545
GOLANG_PROTOBUF_REGISTRATION_CONFLICT: warn
46-
PODMAN_VERSION: 4.4.4
46+
PODMAN_VERSION: 4.9.3
4747
strategy:
4848
# TODO: Remove this when our E2E tests are stable for podman on MacOS.
4949
fail-fast: false # Keep running if one leg fails.
@@ -120,8 +120,9 @@ jobs:
120120
121121
# Start podman machine
122122
sudo podman-mac-helper install
123-
podman machine init
123+
podman machine init -v $HOME:$HOME
124124
podman machine start --log-level debug
125+
podman machine ssh sudo sysctl -w kernel.keys.maxkeys=20000
125126
echo "CONTAINER_RUNTIME=podman" >> $GITHUB_ENV
126127
- name: Determine latest Dapr Runtime version including Pre-releases
127128
if: github.base_ref == 'master'

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ e2e-build-run-k8s: build test-e2e-k8s
174174
################################################################################
175175
.PHONY: test-e2e-upgrade
176176
test-e2e-upgrade: test-deps
177-
gotestsum --jsonfile $(TEST_OUTPUT_FILE) --format standard-verbose -- -timeout 30m -count=1 -tags=e2e ./tests/e2e/upgrade/...
177+
gotestsum --jsonfile $(TEST_OUTPUT_FILE) --format standard-verbose -- -timeout 40m -count=1 -tags=e2e ./tests/e2e/upgrade/...
178178

179179
################################################################################
180180
# Build, E2E Tests for Kubernetes Upgrade #

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Output should look like so:
9393
ℹ️ dapr_redis container is running.
9494
ℹ️ dapr_zipkin container is running.
9595
ℹ️ Use `docker ps` to check running containers.
96-
✅ Success! Dapr is up and running. To get started, go here: https://aka.ms/dapr-getting-started
96+
✅ Success! Dapr is up and running. To get started, go here: https://docs.dapr.io/getting-started
9797
```
9898

9999
> Note: To see that Dapr has been installed successfully, from a command prompt run the `docker ps` command and check that the `daprio/dapr:latest`, `dapr_redis` and `dapr_zipkin` container images are all running.
@@ -120,7 +120,7 @@ Output should look like so:
120120
ℹ️ daprd binary has been installed to $HOME/.dapr/bin.
121121
ℹ️ placement binary has been installed.
122122
ℹ️ scheduler binary has been installed.
123-
✅ Success! Dapr is up and running. To get started, go here: https://aka.ms/dapr-getting-started
123+
✅ Success! Dapr is up and running. To get started, go here: https://docs.dapr.io/getting-started
124124
```
125125

126126
>Note: When initializing Dapr with the `--slim` flag only the Dapr runtime, placement, and scheduler service binaries are installed. An empty default components folder is created with no default configuration files. During `dapr run` user should use `--resources-path` (`--components-path` is deprecated and will be removed in future releases) to point to a components directory with custom configurations files or alternatively place these files in the default directory. For Linux/MacOS, the default components directory path is `$HOME/.dapr/components` and for Windows it is `%USERPROFILE%\.dapr\components`.
@@ -289,7 +289,7 @@ Output should look like as follows:
289289
ℹ️ Note: To install Dapr using Helm, see here: https://docs.dapr.io/getting-started/install-dapr/#install-with-helm-advanced
290290
291291
✅ Deploying the Dapr control plane to your cluster...
292-
✅ Success! Dapr has been installed to namespace dapr-system. To verify, run "dapr status -k" in your terminal. To get started, go here: https://aka.ms/dapr-getting-started
292+
✅ Success! Dapr has been installed to namespace dapr-system. To verify, run "dapr status -k" in your terminal. To get started, go here: https://docs.dapr.io/getting-started
293293
```
294294

295295
#### Supplying Helm values

cmd/annotate.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ func readInputsFromFS(path string) ([]io.Reader, error) {
221221
inputs = append(inputs, file)
222222
return nil
223223
})
224-
225224
if err != nil {
226225
return nil, err
227226
}

cmd/init.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ var (
4545
fromDir string
4646
containerRuntime string
4747
imageVariant string
48+
schedulerVolume string
4849
)
4950

5051
var InitCmd = &cobra.Command{
@@ -146,7 +147,7 @@ dapr init --runtime-path <path-to-install-directory>
146147
print.FailureStatusEvent(os.Stderr, err.Error())
147148
os.Exit(1)
148149
}
149-
print.SuccessStatusEvent(os.Stdout, fmt.Sprintf("Success! Dapr has been installed to namespace %s. To verify, run `dapr status -k' in your terminal. To get started, go here: https://aka.ms/dapr-getting-started", config.Namespace))
150+
print.SuccessStatusEvent(os.Stdout, fmt.Sprintf("Success! Dapr has been installed to namespace %s. To verify, run `dapr status -k' in your terminal. To get started, go here: https://docs.dapr.io/getting-started", config.Namespace))
150151
} else {
151152
dockerNetwork := ""
152153
imageRegistryURI := ""
@@ -170,12 +171,12 @@ dapr init --runtime-path <path-to-install-directory>
170171
print.FailureStatusEvent(os.Stdout, "Invalid container runtime. Supported values are docker and podman.")
171172
os.Exit(1)
172173
}
173-
err := standalone.Init(runtimeVersion, dashboardVersion, dockerNetwork, slimMode, imageRegistryURI, fromDir, containerRuntime, imageVariant, daprRuntimePath)
174+
err := standalone.Init(runtimeVersion, dashboardVersion, dockerNetwork, slimMode, imageRegistryURI, fromDir, containerRuntime, imageVariant, daprRuntimePath, &schedulerVolume)
174175
if err != nil {
175176
print.FailureStatusEvent(os.Stderr, err.Error())
176177
os.Exit(1)
177178
}
178-
print.SuccessStatusEvent(os.Stdout, "Success! Dapr is up and running. To get started, go here: https://aka.ms/dapr-getting-started")
179+
print.SuccessStatusEvent(os.Stdout, "Success! Dapr is up and running. To get started, go here: https://docs.dapr.io/getting-started")
179180
}
180181
},
181182
}
@@ -219,6 +220,7 @@ func init() {
219220
InitCmd.Flags().String("network", "", "The Docker network on which to deploy the Dapr runtime")
220221
InitCmd.Flags().StringVarP(&fromDir, "from-dir", "", "", "Use Dapr artifacts from local directory for self-hosted installation")
221222
InitCmd.Flags().StringVarP(&imageVariant, "image-variant", "", "", "The image variant to use for the Dapr runtime, for example: mariner")
223+
InitCmd.Flags().StringVarP(&schedulerVolume, "scheduler-volume", "", "dapr_scheduler", "Self-hosted only. Specify a volume for the scheduler service data directory.")
222224
InitCmd.Flags().BoolP("help", "h", false, "Print this help message")
223225
InitCmd.Flags().StringArrayVar(&values, "set", []string{}, "set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)")
224226
InitCmd.Flags().String("image-registry", "", "Custom/private docker image repository URL")

cmd/run.go

Lines changed: 61 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ import (
2424
"strings"
2525
"time"
2626

27+
"golang.org/x/mod/semver"
28+
2729
"github.com/spf13/cobra"
2830
"github.com/spf13/viper"
2931

@@ -38,34 +40,35 @@ import (
3840
)
3941

4042
var (
41-
appPort int
42-
profilePort int
43-
appID string
44-
configFile string
45-
port int
46-
grpcPort int
47-
internalGRPCPort int
48-
maxConcurrency int
49-
enableProfiling bool
50-
logLevel string
51-
protocol string
52-
componentsPath string
53-
resourcesPaths []string
54-
appSSL bool
55-
metricsPort int
56-
maxRequestBodySize int
57-
readBufferSize int
58-
unixDomainSocket string
59-
enableAppHealth bool
60-
appHealthPath string
61-
appHealthInterval int
62-
appHealthTimeout int
63-
appHealthThreshold int
64-
enableAPILogging bool
65-
apiListenAddresses string
66-
runFilePath string
67-
appChannelAddress string
68-
enableRunK8s bool
43+
appPort int
44+
profilePort int
45+
appID string
46+
configFile string
47+
port int
48+
grpcPort int
49+
internalGRPCPort int
50+
maxConcurrency int
51+
enableProfiling bool
52+
logLevel string
53+
protocol string
54+
componentsPath string
55+
resourcesPaths []string
56+
appSSL bool
57+
metricsPort int
58+
maxRequestBodySize int
59+
readBufferSize int
60+
unixDomainSocket string
61+
enableAppHealth bool
62+
appHealthPath string
63+
appHealthInterval int
64+
appHealthTimeout int
65+
appHealthThreshold int
66+
enableAPILogging bool
67+
apiListenAddresses string
68+
schedulerHostAddress string
69+
runFilePath string
70+
appChannelAddress string
71+
enableRunK8s bool
6972
)
7073

7174
const (
@@ -120,7 +123,6 @@ dapr run --run-file /path/to/directory -k
120123
Args: cobra.MinimumNArgs(0),
121124
PreRun: func(cmd *cobra.Command, args []string) {
122125
viper.BindPFlag("placement-host-address", cmd.Flags().Lookup("placement-host-address"))
123-
viper.BindPFlag("scheduler-host-address", cmd.Flags().Lookup("scheduler-host-address"))
124126
},
125127
Run: func(cmd *cobra.Command, args []string) {
126128
if len(runFilePath) > 0 {
@@ -166,26 +168,26 @@ dapr run --run-file /path/to/directory -k
166168
}
167169

168170
sharedRunConfig := &standalone.SharedRunConfig{
169-
ConfigFile: configFile,
170-
EnableProfiling: enableProfiling,
171-
LogLevel: logLevel,
172-
MaxConcurrency: maxConcurrency,
173-
AppProtocol: protocol,
174-
PlacementHostAddr: viper.GetString("placement-host-address"),
175-
SchedulerHostAddr: viper.GetString("scheduler-host-address"),
176-
ComponentsPath: componentsPath,
177-
ResourcesPaths: resourcesPaths,
178-
AppSSL: appSSL,
179-
MaxRequestBodySize: maxRequestBodySize,
180-
HTTPReadBufferSize: readBufferSize,
181-
EnableAppHealth: enableAppHealth,
182-
AppHealthPath: appHealthPath,
183-
AppHealthInterval: appHealthInterval,
184-
AppHealthTimeout: appHealthTimeout,
185-
AppHealthThreshold: appHealthThreshold,
186-
EnableAPILogging: enableAPILogging,
187-
APIListenAddresses: apiListenAddresses,
188-
DaprdInstallPath: daprRuntimePath,
171+
ConfigFile: configFile,
172+
EnableProfiling: enableProfiling,
173+
LogLevel: logLevel,
174+
MaxConcurrency: maxConcurrency,
175+
AppProtocol: protocol,
176+
PlacementHostAddr: viper.GetString("placement-host-address"),
177+
ComponentsPath: componentsPath,
178+
ResourcesPaths: resourcesPaths,
179+
AppSSL: appSSL,
180+
MaxRequestBodySize: maxRequestBodySize,
181+
HTTPReadBufferSize: readBufferSize,
182+
EnableAppHealth: enableAppHealth,
183+
AppHealthPath: appHealthPath,
184+
AppHealthInterval: appHealthInterval,
185+
AppHealthTimeout: appHealthTimeout,
186+
AppHealthThreshold: appHealthThreshold,
187+
EnableAPILogging: enableAPILogging,
188+
APIListenAddresses: apiListenAddresses,
189+
SchedulerHostAddress: schedulerHostAddress,
190+
DaprdInstallPath: daprRuntimePath,
189191
}
190192
output, err := runExec.NewOutput(&standalone.RunConfig{
191193
AppID: appID,
@@ -227,6 +229,15 @@ dapr run --run-file /path/to/directory -k
227229
output.DaprHTTPPort,
228230
output.DaprGRPCPort)
229231
}
232+
233+
if semver.Compare(fmt.Sprintf("v%v", daprVer.RuntimeVersion), "v1.14.0-rc.1") == -1 {
234+
print.InfoStatusEvent(os.Stdout, "The scheduler is only compatible with dapr runtime 1.14 onwards.")
235+
for i, arg := range output.DaprCMD.Args {
236+
if strings.HasPrefix(arg, "--scheduler-host-address") {
237+
output.DaprCMD.Args[i] = ""
238+
}
239+
}
240+
}
230241
print.InfoStatusEvent(os.Stdout, startInfo)
231242

232243
output.DaprCMD.Stdout = os.Stdout
@@ -456,7 +467,7 @@ func init() {
456467
// By marking this as deprecated, the flag will be hidden from the help menu, but will continue to work. It will show a warning message when used.
457468
RunCmd.Flags().MarkDeprecated("components-path", "This flag is deprecated and will be removed in the future releases. Use \"resources-path\" flag instead")
458469
RunCmd.Flags().String("placement-host-address", "localhost", "The address of the placement service. Format is either <hostname> for default port or <hostname>:<port> for custom port")
459-
RunCmd.Flags().String("scheduler-host-address", "localhost", "The address of the scheduler service. Format is either <hostname> for default port or <hostname>:<port> for custom port")
470+
RunCmd.Flags().StringVarP(&schedulerHostAddress, "scheduler-host-address", "", "localhost", "The address of the scheduler service. Format is either <hostname> for default port or <hostname>:<port> for custom port")
460471
// TODO: Remove below flag once the flag is removed in runtime in future release.
461472
RunCmd.Flags().BoolVar(&appSSL, "app-ssl", false, "Enable https when Dapr invokes the application")
462473
RunCmd.Flags().MarkDeprecated("app-ssl", "This flag is deprecated and will be removed in the future releases. Use \"app-protocol\" flag with https or grpcs values instead")

cmd/uninstall.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func init() {
9999
UninstallCmd.Flags().BoolVarP(&uninstallKubernetes, "kubernetes", "k", false, "Uninstall Dapr from a Kubernetes cluster")
100100
UninstallCmd.Flags().BoolVarP(&uninstallDev, "dev", "", false, "Uninstall Dapr Redis and Zipking installations from Kubernetes cluster")
101101
UninstallCmd.Flags().UintVarP(&timeout, "timeout", "", 300, "The timeout for the Kubernetes uninstall")
102-
UninstallCmd.Flags().BoolVar(&uninstallAll, "all", false, "Remove .dapr directory, Redis, Placement, Scheduler, and Zipkin containers on local machine, and CRDs on a Kubernetes cluster")
102+
UninstallCmd.Flags().BoolVar(&uninstallAll, "all", false, "Remove .dapr directory, Redis, Placement, Scheduler (and default volume in self-hosted mode), and Zipkin containers on local machine, and CRDs on a Kubernetes cluster")
103103
UninstallCmd.Flags().String("network", "", "The Docker network from which to remove the Dapr runtime")
104104
UninstallCmd.Flags().StringVarP(&uninstallNamespace, "namespace", "n", "dapr-system", "The Kubernetes namespace to uninstall Dapr from")
105105
UninstallCmd.Flags().BoolP("help", "h", false, "Print this help message")

go.mod

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ require (
3535
sigs.k8s.io/yaml v1.4.0
3636
)
3737

38-
require github.com/Masterminds/semver/v3 v3.2.0
38+
require (
39+
github.com/Masterminds/semver/v3 v3.2.0
40+
golang.org/x/mod v0.14.0
41+
)
3942

4043
require (
4144
github.com/alphadose/haxmap v1.3.1 // indirect
@@ -61,7 +64,6 @@ require (
6164
go.mongodb.org/mongo-driver v1.12.1 // indirect
6265
go.opentelemetry.io/otel/metric v1.23.1 // indirect
6366
go.uber.org/multierr v1.11.0 // indirect
64-
golang.org/x/mod v0.14.0 // indirect
6567
golang.org/x/tools v0.17.0 // indirect
6668
google.golang.org/genproto/googleapis/api v0.0.0-20240116215550-a9fa1716bcac // indirect
6769
google.golang.org/genproto/googleapis/rpc v0.0.0-20240205150955-31a09d347014 // indirect

pkg/kubernetes/kubernetes.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,15 @@ const (
4040
daprReleaseName = "dapr"
4141
dashboardReleaseName = "dapr-dashboard"
4242
latestVersion = "latest"
43+
bitnamiStableVersion = "17.14.5"
4344

4445
// dev mode constants.
4546
thirdPartyDevNamespace = "default"
4647
zipkinChartName = "zipkin"
4748
redisChartName = "redis"
4849
zipkinReleaseName = "dapr-dev-zipkin"
4950
redisReleaseName = "dapr-dev-redis"
50-
redisVersion = "6.2"
51+
redisVersion = "6.2.11"
5152
bitnamiHelmRepo = "https://charts.bitnami.com/bitnami"
5253
daprHelmRepo = "https://dapr.github.io/helm-charts"
5354
zipkinHelmRepo = "https://openzipkin.github.io/zipkin"
@@ -99,9 +100,10 @@ func Init(config InitConfiguration) error {
99100
if config.EnableDev {
100101
redisChartVals := []string{
101102
"image.tag=" + redisVersion,
103+
"replica.replicaCount=0",
102104
}
103105

104-
err = installThirdPartyWithConsole(redisReleaseName, redisChartName, latestVersion, bitnamiHelmRepo, "Dapr Redis", redisChartVals, config)
106+
err = installThirdPartyWithConsole(redisReleaseName, redisChartName, bitnamiStableVersion, bitnamiHelmRepo, "Dapr Redis", redisChartVals, config)
105107
if err != nil {
106108
return err
107109
}
@@ -124,7 +126,7 @@ func installThirdPartyWithConsole(releaseName, chartName, releaseVersion, helmRe
124126
defer installSpinning(print.Failure)
125127

126128
// releaseVersion of chart will always be latest version.
127-
err := installThirdParty(releaseName, chartName, latestVersion, helmRepo, chartValues, config)
129+
err := installThirdParty(releaseName, chartName, releaseVersion, helmRepo, chartValues, config)
128130
if err != nil {
129131
return err
130132
}
@@ -214,7 +216,7 @@ func getHelmChart(version, releaseName, helmRepo string, config *helm.Configurat
214216

215217
pull.Settings = &cli.EnvSettings{}
216218

217-
if version != latestVersion && (releaseName == daprReleaseName || releaseName == dashboardReleaseName) {
219+
if version != latestVersion && (releaseName == daprReleaseName || releaseName == dashboardReleaseName || releaseName == redisChartName) {
218220
pull.Version = chartVersion(version)
219221
}
220222

0 commit comments

Comments
 (0)