diff --git a/README.md b/README.md index 6515bb5f..614661bc 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,6 @@ These instructions install _kube-fledged_ to a separate namespace called "kube-f ``` $ kubectl get pods -n kube-fledged -l app=kubefledged - $ kubectl logs -f -n kube-fledged $ kubectl get imagecaches -n kube-fledged (Output should be: 'No resources found') ``` @@ -123,7 +122,6 @@ These instructions install _kube-fledged_ to a separate namespace called "kube-f ``` $ kubectl get pods -n kube-fledged -l app.kubernetes.io/name=kube-fledged - $ kubectl logs -f -n kube-fledged $ kubectl get imagecaches -n kube-fledged (Output should be: 'No resources found') ``` @@ -291,8 +289,6 @@ For more detailed description, go through _kube-fledged's_ [design proposal](doc `--image-cache-refresh-frequency:` The image cache is refreshed periodically to ensure the cache is up to date. Setting this flag to "0s" will disable refresh. default "15m" -`--cri-client-image:` The image name of the cri client. The cri client is used when deleting images during purging the cache". - `--image-pull-policy:` Image pull policy for pulling images into and refreshing the cache. Possible values are 'IfNotPresent' and 'Always'. Default value is 'IfNotPresent'. Image with no or ":latest" tag are always pulled. `--stderrthreshold:` Log level. set the value of this flag to INFO diff --git a/cmd/controller/main.go b/cmd/controller/main.go index 48cd17ee..751e1167 100644 --- a/cmd/controller/main.go +++ b/cmd/controller/main.go @@ -89,9 +89,11 @@ func main() { func init() { flag.DurationVar(&imagePullDeadlineDuration, "image-pull-deadline-duration", time.Minute*5, "Maximum duration allowed for pulling an image. After this duration, image pull is considered to have failed") flag.DurationVar(&imageCacheRefreshFrequency, "image-cache-refresh-frequency", time.Minute*15, "The image cache is refreshed periodically to ensure the cache is up to date. Setting this flag to 0s will disable refresh") - flag.StringVar(&dockerClientImage, "cri-client-image", "senthilrch/kubefledged-cri-client:latest", "The image name of the cri client. the cri client is used when deleting images during purging the cache") flag.StringVar(&imagePullPolicy, "image-pull-policy", "IfNotPresent", "Image pull policy for pulling images into the cache. Possible values are 'IfNotPresent' and 'Always'. Default value is 'IfNotPresent'. Images with no or ':latest' tag are always pulled") if fledgedNameSpace = os.Getenv("KUBEFLEDGED_NAMESPACE"); fledgedNameSpace == "" { fledgedNameSpace = "kube-fledged" } + if dockerClientImage = os.Getenv("KUBEFLEDGED_CRI_CLIENT_IMAGE"); dockerClientImage == "" { + dockerClientImage = "senthilrch/kubefledged-cri-client:latest" + } } diff --git a/deploy/kubefledged-deployment-controller.yaml b/deploy/kubefledged-deployment-controller.yaml index 323a0543..83c63f89 100644 --- a/deploy/kubefledged-deployment-controller.yaml +++ b/deploy/kubefledged-deployment-controller.yaml @@ -37,7 +37,6 @@ spec: - "--stderrthreshold=INFO" - "--image-pull-deadline-duration=5m" - "--image-cache-refresh-frequency=15m" - - "--cri-client-image=senthilrch/kubefledged-cri-client:v0.8.1" - "--image-pull-policy=IfNotPresent" imagePullPolicy: Always name: controller @@ -46,4 +45,6 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + - name: KUBEFLEDGED_CRI_CLIENT_IMAGE + value: "senthilrch/kubefledged-cri-client:v0.8.1" serviceAccountName: kubefledged-controller diff --git a/deploy/kubefledged-operator/helm-charts/kubefledged/templates/deployment-controller.yaml b/deploy/kubefledged-operator/helm-charts/kubefledged/templates/deployment-controller.yaml index ec756ecd..ee175cc3 100644 --- a/deploy/kubefledged-operator/helm-charts/kubefledged/templates/deployment-controller.yaml +++ b/deploy/kubefledged-operator/helm-charts/kubefledged/templates/deployment-controller.yaml @@ -47,7 +47,6 @@ spec: - "--stderrthreshold={{ .Values.args.controllerLogLevel }}" - "--image-pull-deadline-duration={{ .Values.args.controllerImagePullDeadlineDuration }}" - "--image-cache-refresh-frequency={{ .Values.args.controllerImageCacheRefreshFrequency }}" - - "--cri-client-image={{ .Values.image.kubefledgedCRIClientRepository }}:{{ .Chart.AppVersion }}" - "--image-pull-policy={{ .Values.args.controllerImagePullPolicy }}" imagePullPolicy: {{ .Values.image.pullPolicy }} env: @@ -55,6 +54,8 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace + - name: KUBEFLEDGED_CRI_CLIENT_IMAGE + value: {{ .Values.image.kubefledgedCRIClientRepository }}:{{ .Chart.AppVersion }} resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.nodeSelector }}