-
Notifications
You must be signed in to change notification settings - Fork 260
Add "acn" cli tool to install and manage Azure CNI #688
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
Conversation
|
/azp run |
|
No pipelines are associated with this pull request. |
| apiVersion: apps/v1 | ||
| kind: DaemonSet | ||
| metadata: | ||
| name: azure-cni-installer-agent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it installer or manager? im fine with anything but can we follow same convention everywhere
cni/installer/install.go
Outdated
|
|
||
| func (i *installerConfig) SetCNIMode(cniMode string) error { | ||
| // get paths for singletenancy and multitenancy | ||
| if cniMode != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one more check if ipv6mode is set, then mode can be only bridge..can;t be transparent
cni/installer/logwatcher.go
Outdated
| "gopkg.in/fsnotify.v1" | ||
| ) | ||
|
|
||
| func follow(filename string) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what this package is for? can add brief comment
|
/azp run |
|
No pipelines are associated with this pull request. |
vakalapa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few comments. Mostly looks good.
acncli/cmd/generate.go
Outdated
| func GenerateConflistCmd() *cobra.Command { | ||
| var cmd = &cobra.Command{ | ||
| Use: "conflist", | ||
| Short: fmt.Sprintf("Retrieves the logs of %s binary", c.AzureCNIBin), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not the right description i suppose ?
acncli/cmd/generate.go
Outdated
| fmt.Printf("%+v", viper.GetBool(c.FlagFollow)) | ||
| // this loop exists for when the logfile gets rotated, and tail loses the original file | ||
| for { | ||
| t, err := tail.TailFile(viper.GetString(c.FlagLogFilePath), tail.Config{Follow: viper.GetBool(c.FlagFollow)}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not the right func ?
acncli/cmd/generate.go
Outdated
| ) | ||
|
|
||
| // installCmd can register an object | ||
| func GenerateCmd() *cobra.Command { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this Cmd being used ? Also comment on the top.
acncli/cmd/logs.go
Outdated
| "github.com/spf13/viper" | ||
| ) | ||
|
|
||
| // installCmd can register an object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment correction.
acncli/cmd/manager.go
Outdated
| "github.com/spf13/cobra" | ||
| ) | ||
|
|
||
| // installCmd can register an object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment correction.
acncli/cmd/logs.go
Outdated
| }} | ||
|
|
||
| cmd.Flags().BoolP(c.FlagFollow, "f", c.DefaultToggles[c.FlagFollow], fmt.Sprintf("Follow the log file, similar to 'tail -f'")) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra line
| } | ||
|
|
||
| func InstallLocal(installerConf InstallerConfig) error { | ||
| fmt.Printf("📁 - Checking if destination bin directory (%s) exists...\n", installerConf.DstBinDir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<!comment> Great idea with the emojis, are these printed in stdout or logfile ? If logfile are we sure the form exists ? If stdout, some terminals may not have support for emojis.
| value: linux | ||
| - name: CNI_TYPE | ||
| value: singletenancy | ||
| - name: CNI_MODE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two different naming conventions for envs in agent and master, agent has "Azure_*".
| ) | ||
|
|
||
| func SetOrUseDefault(setValue, defaultValue string) string { | ||
| if setValue == "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check for nil too ?
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
Codecov Report
@@ Coverage Diff @@
## master #688 +/- ##
==========================================
- Coverage 38.60% 38.56% -0.05%
==========================================
Files 78 79 +1
Lines 10433 10447 +14
==========================================
+ Hits 4028 4029 +1
- Misses 5913 5926 +13
Partials 492 492 |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| return err | ||
| } | ||
|
|
||
| // only allow windows and linux binaries |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment remove or change to //only allow Single or Multi tenancy
| return err | ||
| } | ||
|
|
||
| // only allow windows and linux binaries |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
Handle extra checking can be done in a seperate PR
* tail azure-vnet.logs * dockerfile update * installer fixes * remove external deps * move to cli design * manager cmd * update vendor * minor fixes * logs * update makefile * Update manager-master.yaml * Update manager-agent.yaml
* tail azure-vnet.logs * dockerfile update * installer fixes * remove external deps * move to cli design * manager cmd * update vendor * minor fixes * logs * update makefile * Update manager-master.yaml * Update manager-agent.yaml
* tail azure-vnet.logs * dockerfile update * installer fixes * remove external deps * move to cli design * manager cmd * update vendor * minor fixes * logs * update makefile * Update manager-master.yaml * Update manager-agent.yaml
Reason for Change:
Start a long lived process to tail the azure-vnet.log and output to stdout of the installer container
Issue Fixed:
Requirements:
Notes: