Skip to content

Commit

Permalink
fixup! fixup! add createOrUpdateExportDataUploadJob
Browse files Browse the repository at this point in the history
  • Loading branch information
ushitora-anqou committed Nov 6, 2024
1 parent c196c54 commit 3741f08
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
6 changes: 6 additions & 0 deletions charts/mantle/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ spec:
{{- with .Values.controller.overwriteMBCSchedule }}
- --overwrite-mbc-schedule={{ . }}
{{- end }}
{{- with .Values.controller.objectStorageBucketName }}
- --object-storage-bucket-name={{ . }}
{{- end }}
{{- with .Values.controller.objectStorageEndpoint}}
- --object-storage-endpoint={{ . }}
{{- end }}
env:
- name: POD_NAME
valueFrom:
Expand Down
14 changes: 6 additions & 8 deletions cmd/controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ func checkCommandlineArgs() error {
if caCertConfigMapSrc != "" && caCertKeySrc == "" {
return errors.New("--ca-cert-key must be specified if --role is 'primary' or 'secondary', and --ca-cert-configmap is specified")
}
if objectStorageBucketName == "" {
return errors.New("--object-storage-bucket-name must be specified if --role is 'primary' or 'secondary'")
}
if objectStorageEndpoint == "" {
return errors.New("--object-storage-endpoint must be specified if --role is 'primary' or 'secondary'")
}
default:
return fmt.Errorf("role should be one of 'standalone', 'primary', or 'secondary': %s", role)
}
Expand All @@ -144,14 +150,6 @@ func setupReconcilers(mgr manager.Manager, primarySettings *controller.PrimarySe
caCertConfigMap = &caCertConfigMapSrc
}

if objectStorageBucketName == "" {
return errors.New("--object-storage-bucket-name must be specified")
}

if objectStorageEndpoint == "" {
return errors.New("--object-storage-endpoint must be specified")
}

backupReconciler := controller.NewMantleBackupReconciler(
mgr.GetClient(),
mgr.GetScheme(),
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/testdata/values-mantle-primary-template.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
controller:
role: primary
mantleServiceEndpoint: {ENDPOINT}
objectStorageBucketName: dummy
objectStorageEndpoint: dummy
2 changes: 2 additions & 0 deletions test/e2e/testdata/values-mantle-secondary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ controller:
mantleServiceEndpoint: ":58080"
ports:
- containerPort: 58080
objectStorageBucketName: dummy
objectStorageEndpoint: dummy

secondaryService:
type: NodePort
Expand Down

0 comments on commit 3741f08

Please sign in to comment.