Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
fix bugs in the controller
Browse files Browse the repository at this point in the history
  • Loading branch information
Rui-Gan authored and LavenderQAQ committed Feb 18, 2023
1 parent 1ffe70e commit bcec545
Show file tree
Hide file tree
Showing 8 changed files with 9,447 additions and 9,441 deletions.
4,408 changes: 2,204 additions & 2,204 deletions EdgeXConfig/config-nosecty.yaml

Large diffs are not rendered by default.

14,344 changes: 7,172 additions & 7,172 deletions EdgeXConfig/config.yaml

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions api/v1alpha1/edgex_conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (src *EdgeX) ConvertTo(dstRaw conversion.Hub) error {
}

// Transform additionalservice
if len(src.Spec.AdditionalDeployment) > 0 {
if len(src.Spec.AdditionalService) > 0 {
additionalService, err := json.Marshal(src.Spec.AdditionalService)
if err != nil {
return err
Expand Down Expand Up @@ -105,6 +105,5 @@ func (dst *EdgeX) ConvertFrom(srcRaw conversion.Hub) error {
dst.Spec.AdditionalService = additionalServices
}

//TODO: AdditionalService and AdditionalDeployment
return nil
}
19 changes: 13 additions & 6 deletions controllers/edgex_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -479,14 +479,21 @@ func (r *EdgeXReconciler) handleYurtAppSet(ctx context.Context, edgex *devicev1a
func annotationToComponent(annotation map[string]string) ([]*Component, error) {
var components []*Component = []*Component{}
var additionalDeployments []devicev1alpha1.DeploymentTemplateSpec = make([]devicev1alpha1.DeploymentTemplateSpec, 0)
err := json.Unmarshal([]byte(annotation["AdditionalDeployments"]), &additionalDeployments)
if err != nil {
return nil, err
if _, ok := annotation["AdditionalDeployments"]; ok {
err := json.Unmarshal([]byte(annotation["AdditionalDeployments"]), &additionalDeployments)
if err != nil {
return nil, err
}
}
var additionalServices []devicev1alpha1.ServiceTemplateSpec = make([]devicev1alpha1.ServiceTemplateSpec, 0)
err = json.Unmarshal([]byte(annotation["AdditionalServices"]), &additionalServices)
if err != nil {
return nil, err
if _, ok := annotation["AdditionalServices"]; ok {
err := json.Unmarshal([]byte(annotation["AdditionalServices"]), &additionalServices)
if err != nil {
return nil, err
}
}
if len(additionalDeployments) == 0 && len(additionalServices) == 0 {
return components, nil
}
var services map[string]*corev1.ServiceSpec = make(map[string]*corev1.ServiceSpec)
var usedServices map[string]struct{} = make(map[string]struct{})
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/data/beijing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
containerPort: 59900
envFrom:
- configMapRef:
name: common-variables
name: common-variable-jakarta
env:
- name: Service_Host
value: "edgex-device-virtual"
2 changes: 1 addition & 1 deletion test/e2e/data/hangzhou.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
containerPort: 49990
envFrom:
- configMapRef:
name: common-variables
name: common-variable-hanoi
env:
- name: Service_Host
value: "edgex-device-virtual"
30 changes: 15 additions & 15 deletions tools/collector/config/multiarch_imagelist.txt
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
lfedge/ekuiper:1.7.1-alpine
postgres:13.8-alpine
redis:7.0.5-alpine
kong:2.8.1
consul:1.13.2
postgres:13.8-alpine
lfedge/ekuiper:1.7.1-alpine
vault:1.11.4
kong:2.8.1
kong:2.5.1
vault:1.8.4
redis:6.2.6-alpine
lfedge/ekuiper:1.4.4-alpine
postgres:13.4-alpine
lfedge/ekuiper:1.4.4-alpine
consul:1.10.3
vault:1.8.9
kong:2.6.1
vault:1.8.4
kong:2.5.1
redis:6.2.6-alpine
vault:1.8.9
postgres:13.5-alpine
consul:1.10.10
redis:6.2.6-alpine
kong:2.6.1
lfedge/ekuiper:1.4.4-alpine
postgres:13.5-alpine
kong:2.4.1-alpine
vault:1.7.2
redis:6.2.4-alpine
lfedge/ekuiper:1.3.0-alpine
kong:2.4.1-alpine
postgres:12.3-alpine
redis:6.2.4-alpine
consul:1.9.5
vault:1.5.3
kong:2.0.5
emqx/kuiper:1.1.1-alpine
redis:6.0.9-alpine
postgres:12.3-alpine
vault:1.5.3
kong:2.0.5
kong:2.0.5
redis:6.0.9-alpine
80 changes: 40 additions & 40 deletions tools/collector/config/singlearch_imagelist.txt
Original file line number Diff line number Diff line change
@@ -1,65 +1,65 @@
edgexfoundry/sys-mgmt-agent:2.3.0 edgexfoundry/sys-mgmt-agent-arm64:2.3.0
edgexfoundry/core-command:2.3.0 edgexfoundry/core-command-arm64:2.3.0
edgexfoundry/device-virtual:2.3.0 edgexfoundry/device-virtual-arm64:2.3.0
edgexfoundry/edgex-ui:2.3.0 edgexfoundry/edgex-ui-arm64:2.3.0
edgexfoundry/core-data:2.3.0 edgexfoundry/core-data-arm64:2.3.0
edgexfoundry/device-rest:2.3.0 edgexfoundry/device-rest-arm64:2.3.0
edgexfoundry/support-notifications:2.3.0 edgexfoundry/support-notifications-arm64:2.3.0
edgexfoundry/core-data:2.3.0 edgexfoundry/core-data-arm64:2.3.0
edgexfoundry/sys-mgmt-agent:2.3.0 edgexfoundry/sys-mgmt-agent-arm64:2.3.0
edgexfoundry/edgex-ui:2.3.0 edgexfoundry/edgex-ui-arm64:2.3.0
edgexfoundry/security-secretstore-setup:2.3.0 edgexfoundry/security-secretstore-setup-arm64:2.3.0
edgexfoundry/core-metadata:2.3.0 edgexfoundry/core-metadata-arm64:2.3.0
edgexfoundry/security-bootstrapper:2.3.0 edgexfoundry/security-bootstrapper-arm64:2.3.0
edgexfoundry/support-scheduler:2.3.0 edgexfoundry/support-scheduler-arm64:2.3.0
edgexfoundry/core-command:2.3.0 edgexfoundry/core-command-arm64:2.3.0
edgexfoundry/support-notifications:2.3.0 edgexfoundry/support-notifications-arm64:2.3.0
edgexfoundry/app-service-configurable:2.3.0 edgexfoundry/app-service-configurable-arm64:2.3.0
edgexfoundry/support-scheduler:2.3.0 edgexfoundry/support-scheduler-arm64:2.3.0
edgexfoundry/security-proxy-setup:2.3.0 edgexfoundry/security-proxy-setup-arm64:2.3.0
edgexfoundry/device-rest:2.1.1 edgexfoundry/device-rest-arm64:2.1.1
edgexfoundry/security-bootstrapper:2.3.0 edgexfoundry/security-bootstrapper-arm64:2.3.0
edgexfoundry/security-secretstore-setup:2.1.1 edgexfoundry/security-secretstore-setup-arm64:2.1.1
edgexfoundry/support-scheduler:2.1.1 edgexfoundry/support-scheduler-arm64:2.1.1
edgexfoundry/core-command:2.1.1 edgexfoundry/core-command-arm64:2.1.1
edgexfoundry/security-bootstrapper:2.1.1 edgexfoundry/security-bootstrapper-arm64:2.1.1
edgexfoundry/support-notifications:2.1.1 edgexfoundry/support-notifications-arm64:2.1.1
edgexfoundry/core-metadata:2.1.1 edgexfoundry/core-metadata-arm64:2.1.1
edgexfoundry/security-proxy-setup:2.1.1 edgexfoundry/security-proxy-setup-arm64:2.1.1
edgexfoundry/sys-mgmt-agent:2.1.1 edgexfoundry/sys-mgmt-agent-arm64:2.1.1
edgexfoundry/support-notifications:2.1.1 edgexfoundry/support-notifications-arm64:2.1.1
edgexfoundry/device-rest:2.1.1 edgexfoundry/device-rest-arm64:2.1.1
edgexfoundry/core-data:2.1.1 edgexfoundry/core-data-arm64:2.1.1
edgexfoundry/edgex-ui:2.1.0 edgexfoundry/edgex-ui-arm64:2.1.0
edgexfoundry/support-scheduler:2.1.1 edgexfoundry/support-scheduler-arm64:2.1.1
edgexfoundry/app-service-configurable:2.1.1 edgexfoundry/app-service-configurable-arm64:2.1.1
edgexfoundry/security-bootstrapper:2.1.1 edgexfoundry/security-bootstrapper-arm64:2.1.1
edgexfoundry/security-secretstore-setup:2.1.1 edgexfoundry/security-secretstore-setup-arm64:2.1.1
edgexfoundry/device-virtual:2.1.1 edgexfoundry/device-virtual-arm64:2.1.1
edgexfoundry/security-proxy-setup:2.1.1 edgexfoundry/security-proxy-setup-arm64:2.1.1
edgexfoundry/security-bootstrapper:2.2.0 edgexfoundry/security-bootstrapper-arm64:2.2.0
edgexfoundry/support-notifications:2.2.0 edgexfoundry/support-notifications-arm64:2.2.0
edgexfoundry/core-command:2.2.0 edgexfoundry/core-command-arm64:2.2.0
edgexfoundry/device-rest:2.2.0 edgexfoundry/device-rest-arm64:2.2.0
edgexfoundry/security-secretstore-setup:2.2.0 edgexfoundry/security-secretstore-setup-arm64:2.2.0
edgexfoundry/app-service-configurable:2.1.1 edgexfoundry/app-service-configurable-arm64:2.1.1
edgexfoundry/support-scheduler:2.2.0 edgexfoundry/support-scheduler-arm64:2.2.0
edgexfoundry/core-metadata:2.2.0 edgexfoundry/core-metadata-arm64:2.2.0
edgexfoundry/app-service-configurable:2.2.0 edgexfoundry/app-service-configurable-arm64:2.2.0
edgexfoundry/security-proxy-setup:2.2.0 edgexfoundry/security-proxy-setup-arm64:2.2.0
edgexfoundry/core-data:2.2.0 edgexfoundry/core-data-arm64:2.2.0
edgexfoundry/core-command:2.2.0 edgexfoundry/core-command-arm64:2.2.0
edgexfoundry/edgex-ui:2.2.0 edgexfoundry/edgex-ui-arm64:2.2.0
edgexfoundry/security-secretstore-setup:2.2.0 edgexfoundry/security-secretstore-setup-arm64:2.2.0
edgexfoundry/device-virtual:2.2.0 edgexfoundry/device-virtual-arm64:2.2.0
edgexfoundry/security-proxy-setup:2.2.0 edgexfoundry/security-proxy-setup-arm64:2.2.0
edgexfoundry/core-metadata:2.2.0 edgexfoundry/core-metadata-arm64:2.2.0
edgexfoundry/security-bootstrapper:2.2.0 edgexfoundry/security-bootstrapper-arm64:2.2.0
edgexfoundry/device-rest:2.2.0 edgexfoundry/device-rest-arm64:2.2.0
edgexfoundry/support-notifications:2.2.0 edgexfoundry/support-notifications-arm64:2.2.0
edgexfoundry/sys-mgmt-agent:2.2.0 edgexfoundry/sys-mgmt-agent-arm64:2.2.0
edgexfoundry/edgex-ui:2.2.0 edgexfoundry/edgex-ui-arm64:2.2.0
edgexfoundry/device-rest:2.0.0 edgexfoundry/device-rest-arm64:2.0.0
edgexfoundry/device-virtual:2.0.0 edgexfoundry/device-virtual-arm64:2.0.0
edgexfoundry/app-service-configurable:2.0.1 edgexfoundry/app-service-configurable-arm64:2.0.1
edgexfoundry/security-bootstrapper:2.0.0 edgexfoundry/security-bootstrapper-arm64:2.0.0
edgexfoundry/core-metadata:2.0.0 edgexfoundry/core-metadata-arm64:2.0.0
edgexfoundry/sys-mgmt-agent:2.0.0 edgexfoundry/sys-mgmt-agent-arm64:2.0.0
edgexfoundry/app-service-configurable:2.2.0 edgexfoundry/app-service-configurable-arm64:2.2.0
edgexfoundry/support-scheduler:2.0.0 edgexfoundry/support-scheduler-arm64:2.0.0
edgexfoundry/core-command:2.0.0 edgexfoundry/core-command-arm64:2.0.0
edgexfoundry/security-proxy-setup:2.0.0 edgexfoundry/security-proxy-setup-arm64:2.0.0
edgexfoundry/core-data:2.0.0 edgexfoundry/core-data-arm64:2.0.0
edgexfoundry/sys-mgmt-agent:2.0.0 edgexfoundry/sys-mgmt-agent-arm64:2.0.0
edgexfoundry/security-bootstrapper:2.0.0 edgexfoundry/security-bootstrapper-arm64:2.0.0
edgexfoundry/app-service-configurable:2.0.1 edgexfoundry/app-service-configurable-arm64:2.0.1
edgexfoundry/core-command:2.0.0 edgexfoundry/core-command-arm64:2.0.0
edgexfoundry/security-secretstore-setup:2.0.0 edgexfoundry/security-secretstore-setup-arm64:2.0.0
edgexfoundry/device-virtual:2.0.0 edgexfoundry/device-virtual-arm64:2.0.0
edgexfoundry/core-metadata:2.0.0 edgexfoundry/core-metadata-arm64:2.0.0
edgexfoundry/device-rest:2.0.0 edgexfoundry/device-rest-arm64:2.0.0
edgexfoundry/support-notifications:2.0.0 edgexfoundry/support-notifications-arm64:2.0.0
edgexfoundry/docker-app-service-configurable:1.3.1 edgexfoundry/docker-app-service-configurable-arm64:1.3.1
edgexfoundry/core-data:2.0.0 edgexfoundry/core-data-arm64:2.0.0
edgexfoundry/docker-device-rest-go:1.2.1 edgexfoundry/docker-device-rest-go-arm64:1.2.1
edgexfoundry/docker-core-command-go:1.3.1 edgexfoundry/docker-core-command-go-arm64:1.3.1
edgexfoundry/docker-support-scheduler-go:1.3.1 edgexfoundry/docker-support-scheduler-go-arm64:1.3.1
edgexfoundry/docker-core-data-go:1.3.1 edgexfoundry/docker-core-data-go-arm64:1.3.1
edgexfoundry/docker-support-notifications-go:1.3.1 edgexfoundry/docker-support-notifications-go-arm64:1.3.1
edgexfoundry/docker-security-secrets-setup-go:1.3.1 edgexfoundry/docker-security-secrets-setup-go-arm64:1.3.1
edgexfoundry/docker-core-metadata-go:1.3.1 edgexfoundry/docker-core-metadata-go-arm64:1.3.1
edgexfoundry/docker-edgex-consul:1.3.0 edgexfoundry/docker-edgex-consul-arm64:1.3.0
edgexfoundry/docker-security-proxy-setup-go:1.3.1 edgexfoundry/docker-security-proxy-setup-go-arm64:1.3.1
edgexfoundry/docker-security-bootstrap-redis-go:1.3.1 edgexfoundry/docker-security-bootstrap-redis-go-arm64:1.3.1
edgexfoundry/docker-core-command-go:1.3.1 edgexfoundry/docker-core-command-go-arm64:1.3.1
edgexfoundry/docker-core-metadata-go:1.3.1 edgexfoundry/docker-core-metadata-go-arm64:1.3.1
edgexfoundry/docker-app-service-configurable:1.3.1 edgexfoundry/docker-app-service-configurable-arm64:1.3.1
edgexfoundry/docker-security-secretstore-setup-go:1.3.1 edgexfoundry/docker-security-secretstore-setup-go-arm64:1.3.1
edgexfoundry/docker-core-data-go:1.3.1 edgexfoundry/docker-core-data-go-arm64:1.3.1
edgexfoundry/docker-sys-mgmt-agent-go:1.3.1 edgexfoundry/docker-sys-mgmt-agent-go-arm64:1.3.1
edgexfoundry/docker-device-rest-go:1.2.1 edgexfoundry/docker-device-rest-go-arm64:1.2.1
edgexfoundry/docker-support-notifications-go:1.3.1 edgexfoundry/docker-support-notifications-go-arm64:1.3.1
edgexfoundry/docker-security-proxy-setup-go:1.3.1 edgexfoundry/docker-security-proxy-setup-go-arm64:1.3.1
edgexfoundry/docker-device-virtual-go:1.3.1 edgexfoundry/docker-device-virtual-go-arm64:1.3.1
edgexfoundry/docker-security-secretstore-setup-go:1.3.1 edgexfoundry/docker-security-secretstore-setup-go-arm64:1.3.1
edgexfoundry/docker-security-bootstrap-redis-go:1.3.1 edgexfoundry/docker-security-bootstrap-redis-go-arm64:1.3.1

0 comments on commit bcec545

Please sign in to comment.