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

feat: add override features of workloads #22

Merged
merged 6 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 7 additions & 1 deletion api/v1alpha1/dolphinschedulercluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

const DolphinCommonPropertiesName = "common.properties"
const (
DolphinCommonPropertiesName = "common.properties"
DolphinConfigPath = "/opt/dolphinscheduler/conf"
LogbackPropertiesFileName = "logback-spring.xml"
)

const DbInitImage = "apache/dolphinscheduler-tools:3.2.1"

Expand Down Expand Up @@ -190,6 +194,8 @@ type ContainerLoggingSpec struct {
}

type ConfigOverridesSpec struct {
CommonProperties map[string]string `json:"common.properties,omitempty"`
Envs map[string]string `json:"envs,omitempty"`
}

type ConfigSpec struct {
Expand Down
30 changes: 22 additions & 8 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -1485,6 +1485,15 @@ spec:
type: array
type: object
configOverrides:
properties:
common.properties:
additionalProperties:
type: string
type: object
envs:
additionalProperties:
type: string
type: object
type: object
envOverrides:
additionalProperties:
Expand Down Expand Up @@ -3100,6 +3109,15 @@ spec:
type: array
type: object
configOverrides:
properties:
common.properties:
additionalProperties:
type: string
type: object
envs:
additionalProperties:
type: string
type: object
type: object
envOverrides:
additionalProperties:
Expand Down Expand Up @@ -4577,6 +4595,15 @@ spec:
type: array
type: object
configOverrides:
properties:
common.properties:
additionalProperties:
type: string
type: object
envs:
additionalProperties:
type: string
type: object
type: object
envOverrides:
additionalProperties:
Expand Down Expand Up @@ -6192,6 +6219,15 @@ spec:
type: array
type: object
configOverrides:
properties:
common.properties:
additionalProperties:
type: string
type: object
envs:
additionalProperties:
type: string
type: object
type: object
envOverrides:
additionalProperties:
Expand Down Expand Up @@ -7751,6 +7787,15 @@ spec:
type: array
type: object
configOverrides:
properties:
common.properties:
additionalProperties:
type: string
type: object
envs:
additionalProperties:
type: string
type: object
type: object
envOverrides:
additionalProperties:
Expand Down Expand Up @@ -9366,6 +9411,15 @@ spec:
type: array
type: object
configOverrides:
properties:
common.properties:
additionalProperties:
type: string
type: object
envs:
additionalProperties:
type: string
type: object
type: object
envOverrides:
additionalProperties:
Expand Down Expand Up @@ -10843,6 +10897,15 @@ spec:
type: array
type: object
configOverrides:
properties:
common.properties:
additionalProperties:
type: string
type: object
envs:
additionalProperties:
type: string
type: object
type: object
envOverrides:
additionalProperties:
Expand Down Expand Up @@ -12458,6 +12521,15 @@ spec:
type: array
type: object
configOverrides:
properties:
common.properties:
additionalProperties:
type: string
type: object
envs:
additionalProperties:
type: string
type: object
type: object
envOverrides:
additionalProperties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
pullPolicy: IfNotPresent
roleGroups:
default:
replicas: 3
replicas: 1
config:
resources:
cpu:
Expand All @@ -35,14 +35,15 @@ spec:
pullPolicy: IfNotPresent
roleGroups:
default:
replicas: 3
replicas: 1
config:
resources:
cpu:
min: 1
max: 2
memory:
limit: "3Gi"

api:
image:
pullPolicy: IfNotPresent
Expand All @@ -56,6 +57,17 @@ spec:
max: 2
memory:
limit: "3Gi"
logging:
logging:
loggers:
logger1:
level: ERROR
logger2:
level: DEBUG
console:
level: WARN
file:
level: WARN
alerter:
image:
pullPolicy: IfNotPresent
Expand All @@ -68,4 +80,15 @@ spec:
min: 1
max: 2
memory:
limit: "3Gi"
limit: "3Gi"
logging:
logging:
loggers:
logger1:
level: ERROR
logger2:
level: DEBUG
console:
level: WARN
file:
level: WARN
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ require (
github.com/go-logr/logr v1.4.1
github.com/onsi/ginkgo/v2 v2.17.1
github.com/onsi/gomega v1.33.0
github.com/stretchr/testify v1.8.4
github.com/zncdata-labs/operator-go v0.4.0
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e
k8s.io/api v0.29.3
Expand Down Expand Up @@ -46,6 +47,7 @@ require (
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.18.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
Expand Down
Loading
Loading