Skip to content

Commit

Permalink
install odigos in openshift
Browse files Browse the repository at this point in the history
  • Loading branch information
esara committed May 23, 2024
1 parent b24dc5f commit 66b8de1
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 19 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ helm upgrade --install odigos odigos/odigos --namespace odigos-system --create-n
kubectl label namespace odigos-system odigos.io/system-object="true"
```

### Upgrade Existing Odigos Installation
### Install Odigos Odigos in Openshift

```console
helm repo update
helm upgrade odigos odigos/odigos --namespace odigos-system
helm upgrade --install odigos odigos/odigos --namespace odigos-system --create-namespace --set openshift=true
kubectl label namespace odigos-system odigos.io/system-object="true"
```

### Uninstall Odigos
Expand Down
30 changes: 13 additions & 17 deletions charts/odigos/templates/autoscaler/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,29 @@ metadata:
name: odigos-autoscaler
rules:
- apiGroups:
- odigos.io
- ""
resources:
- instrumentedapplications
- configmaps
- services
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- odigos.io
resources:
- instrumentedapplications/finalizers
verbs:
- update
- apiGroups:
- odigos.io
- apps
resources:
- instrumentedapplications/status
- daemonsets
- deployments
verbs:
- get
- patch
- update
- list
- watch
- apiGroups:
- odigos.io
resources:
- instrumentedapplications
- collectorsgroups
- odigosconfigurations
- destinations
- processors
verbs:
Expand All @@ -47,13 +41,15 @@ rules:
- odigos.io
resources:
- collectorsgroups/finalizers
- instrumentedapplications/finalizers
- destinations/finalizers
verbs:
- update
- apiGroups:
- odigos.io
resources:
- collectorsgroups/status
- instrumentedapplications/status
- destinations/status
verbs:
- get
Expand Down Expand Up @@ -104,4 +100,4 @@ rules:
verbs:
- get
- list
- watch
- watch
8 changes: 8 additions & 0 deletions charts/odigos/templates/odiglet/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ rules:
- get
- list
- watch
- apiGroups:
- apps
resources:
- daemonsets/finalizers
- deployments/finalizers
- statefulsets/finalizers
verbs:
- update
- apiGroups:
- apps
resources:
Expand Down
15 changes: 15 additions & 0 deletions charts/odigos/templates/odiglet/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,18 @@ roleRef:
kind: ClusterRole
name: odiglet
apiGroup: rbac.authorization.k8s.io
---
{{ if eq .Values.openshift true }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: system:openshift:scc:anyuid:{{ .Release.Namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:openshift:scc:anyuid
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: Group
name: system:serviceaccounts:{{ .Release.Namespace }}
{{- end }}
16 changes: 16 additions & 0 deletions charts/odigos/templates/odiglet/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ spec:
- name: run-dir
mountPath: /run
mountPropagation: Bidirectional
{{ if eq .Values.openshift true }}
- name: host
mountPath: /host
readOnly: true
- name: selinux
mountPath: /host/etc/selinux
mountPropagation: Bidirectional
{{ end }}
- name: var-dir
mountPath: /var
mountPropagation: Bidirectional
Expand All @@ -78,6 +86,14 @@ spec:
- name: run-dir
hostPath:
path: /run
{{ if eq .Values.openshift true }}
- name: host
hostPath:
path: /
- name: selinux
hostPath:
path: /etc/selinux
{{- end }}
- name: var-dir
hostPath:
path: /var
Expand Down
18 changes: 18 additions & 0 deletions charts/odigos/templates/odiglet/rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{ if eq .Values.openshift true }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: system:openshift:scc:privileged
namespace: {{ .Release.Namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:openshift:scc:privileged
subjects:
- kind: ServiceAccount
name: odiglet
namespace: {{ .Release.Namespace }}
- kind: ServiceAccount
name: odigos-data-collection
namespace: {{ .Release.Namespace }}
{{- end }}

0 comments on commit 66b8de1

Please sign in to comment.