-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only apply imagePullPolicy to plugins if instructed (#1705)
Adds a new option which allows the user to specify whether or not to apply the imagePullPolicy to all plugins and override their stated values. This is important since even the default value was overwriting explicit values in the plugins leading to confusing behavior. Techinically a breaking change for someone who was running sonobuoy CLI with the --image-pull-policy flag to overwrite explicit values. They will now need to add the --force-image-pull-policy flag to obtain the same behavior. This makes all modifications to plugins explicit via some option rather than this one being implicit. Fixes #1652 Signed-off-by: John Schnake <[email protected]>
- Loading branch information
1 parent
b293bf0
commit 692522d
Showing
42 changed files
with
544 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
147 changes: 147 additions & 0 deletions
147
pkg/client/testdata/imagePullPolicy-not-all-plugins.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: sonobuoy | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
component: sonobuoy | ||
name: sonobuoy-serviceaccount | ||
namespace: sonobuoy | ||
--- | ||
apiVersion: v1 | ||
data: | ||
config.json: '{"Description":"DEFAULT","UUID":"","Version":"static-version-for-testing","ResultsDir":"/tmp/sonobuoy/results","Resources":null,"Filters":{"Namespaces":".*","LabelSelector":""},"Limits":{"PodLogs":{"Namespaces":"kube-system","SonobuoyNamespace":true,"FieldSelectors":[],"LabelSelector":"","Previous":false,"SinceSeconds":null,"SinceTime":null,"Timestamps":false,"TailLines":null,"LimitBytes":null}},"QPS":30,"Burst":50,"Server":{"bindaddress":"0.0.0.0","bindport":8080,"advertiseaddress":"","timeoutseconds":21600},"Plugins":null,"PluginSearchPath":["./plugins.d","/etc/sonobuoy/plugins.d","~/sonobuoy/plugins.d"],"Namespace":"sonobuoy","WorkerImage":"sonobuoy/sonobuoy:static-version-for-testing","ImagePullPolicy":"IfNotPresent","ImagePullSecrets":"","AggregatorPermissions":"clusterAdmin","ProgressUpdatesPort":"8099","SecurityContextMode":"nonroot"}' | ||
kind: ConfigMap | ||
metadata: | ||
labels: | ||
component: sonobuoy | ||
name: sonobuoy-config-cm | ||
namespace: sonobuoy | ||
--- | ||
apiVersion: v1 | ||
data: | ||
plugin-0.yaml: |- | ||
sonobuoy-config: | ||
driver: "" | ||
plugin-name: myplugin1 | ||
spec: | ||
env: | ||
- name: RESULTS_DIR | ||
value: /tmp/sonobuoy/results | ||
- name: SONOBUOY | ||
value: "true" | ||
- name: SONOBUOY_CONFIG_DIR | ||
value: /tmp/sonobuoy/config | ||
- name: SONOBUOY_K8S_VERSION | ||
value: v99+static.testing | ||
- name: SONOBUOY_PROGRESS_PORT | ||
value: "8099" | ||
- name: SONOBUOY_RESULTS_DIR | ||
value: /tmp/sonobuoy/results | ||
imagePullPolicy: Never | ||
name: "" | ||
volumeMounts: | ||
- mountPath: /tmp/sonobuoy/results | ||
name: results | ||
plugin-1.yaml: |- | ||
sonobuoy-config: | ||
driver: "" | ||
plugin-name: myplugin2 | ||
spec: | ||
env: | ||
- name: RESULTS_DIR | ||
value: /tmp/sonobuoy/results | ||
- name: SONOBUOY | ||
value: "true" | ||
- name: SONOBUOY_CONFIG_DIR | ||
value: /tmp/sonobuoy/config | ||
- name: SONOBUOY_K8S_VERSION | ||
value: v99+static.testing | ||
- name: SONOBUOY_PROGRESS_PORT | ||
value: "8099" | ||
- name: SONOBUOY_RESULTS_DIR | ||
value: /tmp/sonobuoy/results | ||
imagePullPolicy: Always | ||
name: "" | ||
volumeMounts: | ||
- mountPath: /tmp/sonobuoy/results | ||
name: results | ||
kind: ConfigMap | ||
metadata: | ||
labels: | ||
component: sonobuoy | ||
name: sonobuoy-plugins-cm | ||
namespace: sonobuoy | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
labels: | ||
component: sonobuoy | ||
sonobuoy-component: aggregator | ||
tier: analysis | ||
name: sonobuoy | ||
namespace: sonobuoy | ||
spec: | ||
containers: | ||
- args: | ||
- aggregator | ||
- --no-exit | ||
- --level=info | ||
- -v=4 | ||
- --alsologtostderr | ||
command: | ||
- /sonobuoy | ||
env: | ||
- name: SONOBUOY_ADVERTISE_IP | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: status.podIP | ||
image: sonobuoy/sonobuoy:static-version-for-testing | ||
name: kube-sonobuoy | ||
volumeMounts: | ||
- mountPath: /etc/sonobuoy | ||
name: sonobuoy-config-volume | ||
- mountPath: /plugins.d | ||
name: sonobuoy-plugins-volume | ||
- mountPath: /tmp/sonobuoy | ||
name: output-volume | ||
restartPolicy: Never | ||
securityContext: | ||
fsGroup: 2000 | ||
runAsGroup: 3000 | ||
runAsUser: 1000 | ||
serviceAccountName: sonobuoy-serviceaccount | ||
tolerations: | ||
- key: kubernetes.io/e2e-evict-taint-key | ||
operator: Exists | ||
volumes: | ||
- configMap: | ||
name: sonobuoy-config-cm | ||
name: sonobuoy-config-volume | ||
- configMap: | ||
name: sonobuoy-plugins-cm | ||
name: sonobuoy-plugins-volume | ||
- emptyDir: {} | ||
name: output-volume | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
component: sonobuoy | ||
sonobuoy-component: aggregator | ||
name: sonobuoy-aggregator | ||
namespace: sonobuoy | ||
spec: | ||
ports: | ||
- port: 8080 | ||
protocol: TCP | ||
targetPort: 8080 | ||
selector: | ||
sonobuoy-component: aggregator | ||
type: ClusterIP | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.