Skip to content

Commit

Permalink
fix: fix enum typo error
Browse files Browse the repository at this point in the history
Signed-off-by: Rory Z <[email protected]>
  • Loading branch information
Rory-Z committed Aug 30, 2023
1 parent db53674 commit 0bacc3f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions apis/apps/v2beta1/emqx_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ type BootstrapAPIKey struct {
}

type Config struct {
//+kubebuilder:validation:Enum=merge;replace
//+kubebuilder:default=merge
//+kubebuilder:validation:Enum=Merge;Replace
//+kubebuilder:default=Merge
Mode string `json:"mode,omitempty"`
// EMQX config, HOCON format, like etc/emqx.conf file
Data string `json:"data,omitempty"`
Expand Down
6 changes: 3 additions & 3 deletions config/crd/bases/apps.emqx.io_emqxes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6505,10 +6505,10 @@ spec:
data:
type: string
mode:
default: merge
default: Merge
enum:
- merge
- replace
- Merge
- Replace
type: string
type: object
coreTemplate:
Expand Down
3 changes: 2 additions & 1 deletion controllers/apps/v2beta1/sync_emqx_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package v2beta1
import (
"context"
"net/http"
"strings"

emperror "emperror.dev/errors"
appsv2beta1 "github.com/emqx/emqx-operator/apis/apps/v2beta1"
Expand Down Expand Up @@ -120,7 +121,7 @@ func getEMQXConfigsByAPI(r innerReq.RequesterInterface) (string, error) {
}

func putEMQXConfigsByAPI(r innerReq.RequesterInterface, mode, config string) error {
url := r.GetURL("api/v5/configs", "mode="+mode)
url := r.GetURL("api/v5/configs", "mode="+strings.ToLower(mode))

resp, body, err := r.Request("PUT", url, []byte(config), http.Header{
"Content-Type": []string{"text/plain"},
Expand Down
4 changes: 2 additions & 2 deletions deploy/charts/emqx-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 2.2.1
version: 2.2.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 2.2.1
appVersion: 2.2.2
Original file line number Diff line number Diff line change
Expand Up @@ -6517,10 +6517,10 @@ spec:
data:
type: string
mode:
default: merge
default: Merge
enum:
- merge
- replace
- Merge
- Replace
type: string
type: object
coreTemplate:
Expand Down

0 comments on commit 0bacc3f

Please sign in to comment.