mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-06-01 04:26:49 +00:00
⚡ Fix all of the remaining issues in the Helm chart
This commit is contained in:
parent
18addbb980
commit
3cc543827a
@ -111,14 +111,16 @@ type Dependency struct {
|
||||
var namespaceMappings = map[string]interface{}{
|
||||
"metadata.name": "{{ .Values.tap.selfnamespace }}",
|
||||
}
|
||||
var serviceAccountMappings = namespaceMappings
|
||||
var clusterRoleMappings = namespaceMappings
|
||||
var serviceAccountMappings = map[string]interface{}{
|
||||
"metadata.namespace": "{{ .Values.tap.selfnamespace }}",
|
||||
}
|
||||
var clusterRoleMappings = serviceAccountMappings
|
||||
var clusterRoleBindingMappings = map[string]interface{}{
|
||||
"metadata.name": "{{ .Values.tap.selfnamespace }}",
|
||||
"metadata.namespace": "{{ .Values.tap.selfnamespace }}",
|
||||
"subjects[0].namespace": "{{ .Values.tap.selfnamespace }}",
|
||||
}
|
||||
var hubPodMappings = map[string]interface{}{
|
||||
"metadata.name": "{{ .Values.tap.selfnamespace }}",
|
||||
"metadata.namespace": "{{ .Values.tap.selfnamespace }}",
|
||||
"spec.containers[0].env": []map[string]interface{}{
|
||||
{
|
||||
"name": "POD_REGEX",
|
||||
@ -126,7 +128,7 @@ var hubPodMappings = map[string]interface{}{
|
||||
},
|
||||
{
|
||||
"name": "NAMESPACES",
|
||||
"value": "{{ .Values.tap.allnamespaces | ternary \"\" .Values.tap.namespaces | quote }}",
|
||||
"value": "{{ .Values.tap.allnamespaces | ternary \"\" .Values.tap.namespaces }}",
|
||||
},
|
||||
{
|
||||
"name": "STORAGE_LIMIT",
|
||||
@ -139,26 +141,23 @@ var hubPodMappings = map[string]interface{}{
|
||||
},
|
||||
"spec.containers[0].image": "{{ .Values.tap.docker.registry }}/hub:{{ .Values.tap.docker.tag }}",
|
||||
"spec.containers[0].imagePullPolicy": "{{ .Values.tap.docker.imagePullPolicy }}",
|
||||
"spec.imagePullSecrets": "{{ .Values.tap.docker.imagepullsecrets }}",
|
||||
"spec.containers[0].resources.limits.cpu": "{{ .Values.tap.resources.hub.limits.cpu }}",
|
||||
"spec.containers[0].resources.limits.memory": "{{ .Values.tap.resources.hub.limits.memory }}",
|
||||
"spec.containers[0].resources.requests.cpu": "{{ .Values.tap.resources.hub.requests.cpu }}",
|
||||
"spec.containers[0].resources.requests.memory": "{{ .Values.tap.resources.hub.requests.memory }}",
|
||||
"spec.containers[0].command[0]": "{{ .Values.tap.debug | ternary \"./hub -debug\" \"./hub\" }}",
|
||||
}
|
||||
var hubServiceMappings = namespaceMappings
|
||||
var hubServiceMappings = serviceAccountMappings
|
||||
var frontPodMappings = map[string]interface{}{
|
||||
"metadata.name": "{{ .Values.tap.selfnamespace }}",
|
||||
"metadata.namespace": "{{ .Values.tap.selfnamespace }}",
|
||||
"spec.containers[0].image": "{{ .Values.tap.docker.registry }}/front:{{ .Values.tap.docker.tag }}",
|
||||
"spec.containers[0].imagePullPolicy": "{{ .Values.tap.docker.imagePullPolicy }}",
|
||||
"spec.imagePullSecrets": "{{ .Values.tap.docker.imagepullsecrets }}",
|
||||
}
|
||||
var frontServiceMappings = namespaceMappings
|
||||
var frontServiceMappings = serviceAccountMappings
|
||||
var workerDaemonSetMappings = map[string]interface{}{
|
||||
"metadata.name": "{{ .Values.tap.selfnamespace }}",
|
||||
"metadata.namespace": "{{ .Values.tap.selfnamespace }}",
|
||||
"spec.template.spec.containers[0].image": "{{ .Values.tap.docker.registry }}/worker:{{ .Values.tap.docker.tag }}",
|
||||
"spec.template.spec.containers[0].imagePullPolicy": "{{ .Values.tap.docker.imagePullPolicy }}",
|
||||
"spec.imagePullSecrets": "{{ .Values.tap.docker.imagepullsecrets }}",
|
||||
"spec.template.spec.containers[0].resources.limits.cpu": "{{ .Values.tap.resources.worker.limits.cpu }}",
|
||||
"spec.template.spec.containers[0].resources.limits.memory": "{{ .Values.tap.resources.worker.limits.memory }}",
|
||||
"spec.template.spec.containers[0].resources.requests.cpu": "{{ .Values.tap.resources.worker.requests.cpu }}",
|
||||
|
@ -11,3 +11,30 @@ then install Kubeshark:
|
||||
```shell
|
||||
helm install kubeshark kubeshark/kubeshark
|
||||
```
|
||||
|
||||
## Locally
|
||||
|
||||
Clone the repo:
|
||||
|
||||
```shell
|
||||
git clone git@github.com:kubeshark/kubeshark.git --depth 1
|
||||
cd kubeshark/helm-chart
|
||||
```
|
||||
|
||||
See the generated templates
|
||||
|
||||
```shell
|
||||
helm template .
|
||||
```
|
||||
|
||||
Install Kubeshark:
|
||||
|
||||
```shell
|
||||
helm install kubeshark .
|
||||
```
|
||||
|
||||
Uninstall Kubeshark:
|
||||
|
||||
```shell
|
||||
helm uninstall kubeshark
|
||||
```
|
||||
|
@ -6,5 +6,5 @@ metadata:
|
||||
kubeshark-cli-version: v1
|
||||
kubeshark-created-by: kubeshark
|
||||
kubeshark-managed-by: kubeshark
|
||||
name: '{{ .Values.tap.selfnamespace }}'
|
||||
namespace: kubeshark
|
||||
name: kubeshark-service-account
|
||||
namespace: '{{ .Values.tap.selfnamespace }}'
|
||||
|
@ -6,8 +6,8 @@ metadata:
|
||||
kubeshark-cli-version: v1
|
||||
kubeshark-created-by: kubeshark
|
||||
kubeshark-managed-by: kubeshark
|
||||
name: '{{ .Values.tap.selfnamespace }}'
|
||||
namespace: kubeshark
|
||||
name: kubeshark-cluster-role
|
||||
namespace: '{{ .Values.tap.selfnamespace }}'
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
|
@ -6,8 +6,8 @@ metadata:
|
||||
kubeshark-cli-version: v1
|
||||
kubeshark-created-by: kubeshark
|
||||
kubeshark-managed-by: kubeshark
|
||||
name: '{{ .Values.tap.selfnamespace }}'
|
||||
namespace: kubeshark
|
||||
name: kubeshark-service-account
|
||||
namespace: '{{ .Values.tap.selfnamespace }}'
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
|
@ -6,8 +6,8 @@ metadata:
|
||||
app: kubeshark-hub
|
||||
kubeshark-created-by: kubeshark
|
||||
kubeshark-managed-by: kubeshark
|
||||
name: '{{ .Values.tap.selfnamespace }}'
|
||||
namespace: kubeshark
|
||||
name: kubeshark-hub
|
||||
namespace: '{{ .Values.tap.selfnamespace }}'
|
||||
spec:
|
||||
containers:
|
||||
- command:
|
||||
@ -16,7 +16,7 @@ spec:
|
||||
- name: POD_REGEX
|
||||
value: '{{ .Values.tap.regex }}'
|
||||
- name: NAMESPACES
|
||||
value: '{{ .Values.tap.allnamespaces | ternary "" .Values.tap.namespaces | quote }}'
|
||||
value: '{{ .Values.tap.allnamespaces | ternary "" .Values.tap.namespaces }}'
|
||||
- name: STORAGE_LIMIT
|
||||
value: '{{ .Values.tap.storagelimit }}'
|
||||
- name: LICENSE
|
||||
@ -32,7 +32,6 @@ spec:
|
||||
cpu: '{{ .Values.tap.resources.hub.requests.cpu }}'
|
||||
memory: '{{ .Values.tap.resources.hub.requests.memory }}'
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
imagePullSecrets: '{{ .Values.tap.docker.imagepullsecrets }}'
|
||||
serviceAccountName: kubeshark-service-account
|
||||
terminationGracePeriodSeconds: 0
|
||||
tolerations:
|
||||
|
@ -5,8 +5,8 @@ metadata:
|
||||
labels:
|
||||
kubeshark-created-by: kubeshark
|
||||
kubeshark-managed-by: kubeshark
|
||||
name: '{{ .Values.tap.selfnamespace }}'
|
||||
namespace: kubeshark
|
||||
name: kubeshark-hub
|
||||
namespace: '{{ .Values.tap.selfnamespace }}'
|
||||
spec:
|
||||
ports:
|
||||
- name: kubeshark-hub
|
||||
|
@ -6,8 +6,8 @@ metadata:
|
||||
app: kubeshark-front
|
||||
kubeshark-created-by: kubeshark
|
||||
kubeshark-managed-by: kubeshark
|
||||
name: '{{ .Values.tap.selfnamespace }}'
|
||||
namespace: kubeshark
|
||||
name: kubeshark-front
|
||||
namespace: '{{ .Values.tap.selfnamespace }}'
|
||||
spec:
|
||||
containers:
|
||||
- env:
|
||||
@ -35,7 +35,6 @@ spec:
|
||||
cpu: 50m
|
||||
memory: 50Mi
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
imagePullSecrets: '{{ .Values.tap.docker.imagepullsecrets }}'
|
||||
serviceAccountName: kubeshark-service-account
|
||||
terminationGracePeriodSeconds: 0
|
||||
tolerations:
|
||||
|
@ -5,8 +5,8 @@ metadata:
|
||||
labels:
|
||||
kubeshark-created-by: kubeshark
|
||||
kubeshark-managed-by: kubeshark
|
||||
name: '{{ .Values.tap.selfnamespace }}'
|
||||
namespace: kubeshark
|
||||
name: kubeshark-front
|
||||
namespace: '{{ .Values.tap.selfnamespace }}'
|
||||
spec:
|
||||
ports:
|
||||
- name: kubeshark-front
|
||||
|
@ -6,10 +6,9 @@ metadata:
|
||||
app: kubeshark-worker-daemon-set
|
||||
kubeshark-created-by: kubeshark
|
||||
kubeshark-managed-by: kubeshark
|
||||
name: '{{ .Values.tap.selfnamespace }}'
|
||||
namespace: kubeshark
|
||||
name: kubeshark-worker-daemon-set
|
||||
namespace: '{{ .Values.tap.selfnamespace }}'
|
||||
spec:
|
||||
imagePullSecrets: '{{ .Values.tap.docker.imagepullsecrets }}'
|
||||
selector:
|
||||
matchLabels:
|
||||
app: kubeshark-worker-daemon-set
|
||||
|
Loading…
Reference in New Issue
Block a user