use clear name for env var denoting namespace to watch (#129)
This commit is contained in:
		
							parent
							
								
									8d5faaa5a5
								
							
						
					
					
						commit
						702d901bd9
					
				|  | @ -27,7 +27,7 @@ func init() { | ||||||
| 	flag.BoolVar(&config.NoTeamsAPI, "noteamsapi", false, "Disable all access to the teams API") | 	flag.BoolVar(&config.NoTeamsAPI, "noteamsapi", false, "Disable all access to the teams API") | ||||||
| 	flag.Parse() | 	flag.Parse() | ||||||
| 
 | 
 | ||||||
| 	config.Namespace = os.Getenv("MY_POD_NAMESPACE") | 	config.Namespace = os.Getenv("WATCH_NAMESPACE") | ||||||
| 	if config.Namespace == "" { | 	if config.Namespace == "" { | ||||||
| 		config.Namespace = "default" | 		config.Namespace = "default" | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | @ -15,7 +15,7 @@ spec: | ||||||
|         image: pierone.example.com/acid/postgres-operator:0.1 |         image: pierone.example.com/acid/postgres-operator:0.1 | ||||||
|         imagePullPolicy: IfNotPresent |         imagePullPolicy: IfNotPresent | ||||||
|         env: |         env: | ||||||
|         - name: MY_POD_NAMESPACE |         - name: WATCH_NAMESPACE | ||||||
|           valueFrom: |           valueFrom: | ||||||
|             fieldRef: |             fieldRef: | ||||||
|               fieldPath: metadata.namespace |               fieldPath: metadata.namespace | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue