Skip to content

Commit

Permalink
Merge branch 'main' of github.com:datreeio/admission-webhook-datree i…
Browse files Browse the repository at this point in the history
…nto change_webhook_version_to_scanner_version
  • Loading branch information
royhadad committed Jun 29, 2023
2 parents 2cc3ec8 + c2efa3d commit f6f2b6a
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 3 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,14 @@ null
<td><pre lang="json">
null
</pre>
</td>
</tr>
<tr>
<td>devMode.enabled</td>
<td></td>
<td><pre lang="json">
false
</pre>
</td>
</tr>
</tbody>
Expand Down
6 changes: 3 additions & 3 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ cmd_button(name='enable all',

namespace_create('datree')
DATREE_TOKEN=os.environ.get('DATREE_TOKEN')
k8s_yaml(helm('./charts/datree-admission-webhook/', name='admission-webhook', values='internal/fixtures/values.dev.yaml', namespace='datree', set=['securityContext.runAsUser=1000', 'securityContext.readOnlyRootFilesystem=false', 'clusterScanner.image.pullPolicy=Never', "datree.token={}".format(DATREE_TOKEN)]))
k8s_yaml(helm('./charts/datree-admission-webhook/', name='admission-webhook', values='internal/fixtures/values.dev.yaml', namespace='datree', set=['devMode.enabled=true ','securityContext.runAsUser=1000', 'securityContext.readOnlyRootFilesystem=false', 'clusterScanner.image.pullPolicy=Never', "datree.token={}".format(DATREE_TOKEN)]))



Expand All @@ -36,12 +36,12 @@ def debugging():

local_resource(
name='datree-webhook-server-debuging',
serve_cmd='bash ./tilt/scripts/port-forwarding-for-debugging.sh "datree-webhook-server" "8443 5555"',
serve_cmd='bash ./tilt/scripts/port-forwarding-for-debugging.sh "datree-webhook-server" "5555"',
)

local_resource(
name='cluster-scanner debugging',
serve_cmd='bash ./tilt/scripts/port-forwarding-for-debugging.sh "datree-cluster-scanner-server" "8080 5556"',
serve_cmd='bash ./tilt/scripts/port-forwarding-for-debugging.sh "datree-cluster-scanner-server" "5556"',
)

local_resource(
Expand Down
8 changes: 8 additions & 0 deletions charts/datree-admission-webhook/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,14 @@ null
<td><pre lang="json">
null
</pre>
</td>
</tr>
<tr>
<td>devMode.enabled</td>
<td></td>
<td><pre lang="json">
false
</pre>
</td>
</tr>
</tbody>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if not .Values.devMode.enabled }}
apiVersion: batch/v1
kind: Job
metadata:
Expand Down Expand Up @@ -39,7 +40,9 @@ spec:
- >-
kubectl delete validatingwebhookconfigurations.admissionregistration.k8s.io datree-webhook -n {{template "datree.namespace" .}};
kubectl label ns kube-system {{template "datree.namespace" .}} admission.datree/validate-;
{{- end }}
---
{{ if not .Values.devMode.enabled }}
apiVersion: batch/v1
kind: Job
metadata:
Expand Down Expand Up @@ -86,3 +89,4 @@ spec:
else
echo "Error: Failed to send cluster uninstallation request"; \
fi
{{- end }}
3 changes: 3 additions & 0 deletions charts/datree-admission-webhook/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,6 @@ readinessProbe:
scheme:
initialDelaySeconds:
periodSeconds:

devMode:
enabled: false

0 comments on commit f6f2b6a

Please sign in to comment.