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

Sync image #76

Merged
merged 25 commits into from
Jan 14, 2023
Merged

Sync image #76

merged 25 commits into from
Jan 14, 2023

Conversation

yangbobo6
Copy link
Contributor

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:
/kind enhancement
/sig iot

What this PR does / why we need it:

Merge the crawled images into single-architecture and multi-architecture, and push to openyurt

Which issue(s) this PR fixes:

Fixes #60

@codecov
Copy link

codecov bot commented Jan 10, 2023

Codecov Report

Merging #76 (ab6184b) into main (ccde306) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #76   +/-   ##
=======================================
  Coverage   18.40%   18.40%           
=======================================
  Files           2        2           
  Lines         402      402           
=======================================
  Hits           74       74           
  Misses        322      322           
  Partials        6        6           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

for i, version := range versions {
components := version.Components
newArray := make([]string, 0)
for j, _ := range components {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Underline is redundant

for j := range components

go.mod Outdated
@@ -8,6 +8,7 @@ require (
github.com/onsi/gomega v1.19.0
github.com/openyurtio/api v0.0.0-20220907024010-e5bfc9cc1b4b
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.9.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yurt-edgex-manager does not use logrus library. Try to delete it, then run go mod tidy.

@LavenderQAQ
Copy link
Member

Another problem is that we need to replace the original image repo prefix in the configuration file with openyurt instead.
Example:

- name: edgex-device-rest
  image: edgexfoundry/device-rest:2.3.0
  volumns:
    - name: edgex-init
      hostPath: /edgex-init
      mountPath: /edgex-init
    - name: anonymous_volume1
      hostPath: /tmp/edgex/secrets/device-rest
      mountPath: /tmp/edgex/secrets/device-rest
  ports:
    - protocol: TCP
      port: 59986
      targetPort: 59986
  componentEnv:
    SERVICE_HOST: edgex-device-rest

Replace to:

- name: edgex-device-rest
  image: openyurt/device-rest:2.3.0
  volumns:
    - name: edgex-init
      hostPath: /edgex-init
      mountPath: /edgex-init
    - name: anonymous_volume1
      hostPath: /tmp/edgex/secrets/device-rest
      mountPath: /tmp/edgex/secrets/device-rest
  ports:
    - protocol: TCP
      port: 59986
      targetPort: 59986
  componentEnv:
    SERVICE_HOST: edgex-device-rest

@LavenderQAQ
Copy link
Member

You can pass the REPO environment variable from the makefile into the collector as a flag

.PHONY: run
run:
	go run main.go --debug=$(DEBUG) --repo=$(REPO)

@yangbobo6
Copy link
Contributor Author

You can pass the REPO environment variable from the makefile into the collector as a flag

.PHONY: run
run:
	go run main.go --debug=$(DEBUG) --repo=$(REPO)

I'm going to fix these problem right away.

"github.com/sirupsen/logrus"
)

var (
collectLog *logrus.Entry
branchesURL = "https://github.com/edgexfoundry/edgex-compose/branches/all"
extractVersionRegexp = `branch="(.*?)"`
singleArchPath = "./config/singlearch_imagelist.txt"
multiArchPath = "./config/multiarch_imagelist.txt"
repoName = "openyurt/"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The repo name should be read from the makefile to make debugging easier.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok,I will change it.

@LavenderQAQ LavenderQAQ self-requested a review January 14, 2023 02:33
@LavenderQAQ
Copy link
Member

/lgtm

@LavenderQAQ LavenderQAQ merged commit 2a5cad1 into openyurtio:main Jan 14, 2023
@yangbobo6 yangbobo6 deleted the sync_image branch February 8, 2023 05:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[EdgeX Auto-Collector] Synchronize the images of edgex to openyurt
3 participants