mirror of
				https://github.com/fluxcd/flux2.git
				synced 2025-11-01 01:25:53 +08:00 
			
		
		
		
	 0f5204a8c1
			
		
	
	0f5204a8c1
	
	
	
		
			
			- use source API package instead of a text template - use controller-runtime client instead of kubectl
		
			
				
	
	
		
			22 lines
		
	
	
		
			327 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			327 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package main
 | |
| 
 | |
| import (
 | |
| 	"time"
 | |
| 
 | |
| 	"github.com/spf13/cobra"
 | |
| )
 | |
| 
 | |
| var createCmd = &cobra.Command{
 | |
| 	Use:   "create",
 | |
| 	Short: "Create commands",
 | |
| }
 | |
| 
 | |
| var (
 | |
| 	interval time.Duration
 | |
| )
 | |
| 
 | |
| func init() {
 | |
| 	createCmd.PersistentFlags().DurationVarP(&interval, "interval", "", time.Minute, "source sync interval")
 | |
| 	rootCmd.AddCommand(createCmd)
 | |
| }
 |