Skip to content

Commit f2904eb

Browse files
committed
Support OpenShift deployment
Signed-off-by: Tamal Saha <tamal@appscode.com>
1 parent 89041ef commit f2904eb

File tree

2,243 files changed

+298212
-35
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,243 files changed

+298212
-35
lines changed

apis/installer/fuzzer/fuzzer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ import (
2424
)
2525

2626
// Funcs returns the fuzzer functions for this api group.
27-
var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
28-
return []interface{}{
27+
var Funcs = func(codecs runtimeserializer.CodecFactory) []any {
28+
return []any{
2929
func(s *v1alpha1.InboxAgent, c fuzz.Continue) {
3030
c.FuzzNoCustom(s) // fuzz self without calling this function again
3131
},

apis/installer/v1alpha1/inbox_agent_types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package v1alpha1
1919
import (
2020
core "k8s.io/api/core/v1"
2121
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
22+
"kmodules.xyz/resource-metadata/apis/shared"
2223
)
2324

2425
const (
@@ -81,6 +82,8 @@ type InboxAgentSpec struct {
8182
Apiserver InboxAgentApiserver `json:"apiserver"`
8283
Monitoring Monitoring `json:"monitoring"`
8384
InboxServer InboxServerInfo `json:"inboxServer"`
85+
// +optional
86+
Distro shared.DistroSpec `json:"distro"`
8487
}
8588

8689
type InboxAgentApiserver struct {

apis/installer/v1alpha1/inbox_server_dist_types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package v1alpha1
1919
import (
2020
core "k8s.io/api/core/v1"
2121
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
22+
"kmodules.xyz/resource-metadata/apis/shared"
2223
)
2324

2425
const (
@@ -56,6 +57,8 @@ type InboxServerDistributedSpec struct {
5657
S3 S3Spec `json:"s3"`
5758
Tika TikaSpec `json:"tika"`
5859
Service ServiceSpec `json:"service"`
60+
// +optional
61+
Distro shared.DistroSpec `json:"distro"`
5962
}
6063

6164
type DnsSpec struct {

apis/installer/v1alpha1/inbox_server_types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package v1alpha1
1919
import (
2020
core "k8s.io/api/core/v1"
2121
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
22+
"kmodules.xyz/resource-metadata/apis/shared"
2223
)
2324

2425
const (
@@ -52,6 +53,8 @@ type InboxServerSpec struct {
5253
AdminIngress IngressSpec `json:"adminIngress"`
5354
Postgresql PostgresqlSpec `json:"postgresql"`
5455
Migrate InboxServerMigrateSpec `json:"migrate"`
56+
// +optional
57+
Distro shared.DistroSpec `json:"distro"`
5558
}
5659

5760
type JamesSpec struct {

apis/installer/v1alpha1/zz_generated.deepcopy.go

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

catalog/imagelist.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
---
21
- bitnami/kubectl:latest
32
- busybox:latest
43
- cassandra:4.1.3
5-
- ghcr.io/appscode/inbox-agent:v0.0.3
4+
- ghcr.io/appscode/inbox-agent:v0.0.5
65
- ghcr.io/appscode/inbox-server:latest
6+
- ghcr.io/appscode/inbox-server:postgres-latest
77
- ghcr.io/appscode/kube-rbac-proxy:v0.15.0
88
- ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.110.0
99
- ghcr.io/open-telemetry/opentelemetry-operator/target-allocator:main
1010
- opensearchproject/opensearch:2.1.0
1111
- otel/opentelemetry-collector-contrib:0.95.0
1212
- quay.io/brancz/kube-rbac-proxy:v0.15.0
13-
- quay.io/prometheus-operator/prometheus-operator:v0.80.0
14-
- quay.io/prometheus/alertmanager:v0.28.0
13+
- quay.io/prometheus-operator/prometheus-operator:v0.82.0
14+
- quay.io/prometheus/alertmanager:v0.28.1
1515
- quay.io/prometheus/node-exporter:v1.8.2
16-
- quay.io/prometheus/prometheus:v3.1.0
16+
- quay.io/prometheus/prometheus:v3.3.1
1717
- rabbitmq:3.12.1-management
18-
- registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.5.1
18+
- registry.k8s.io/ingress-nginx/kube-webhook-certgen:v1.5.3
1919
- registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.12.0

charts/inbox-agent/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
apiVersion: v2
33
description: Inbox Agent by AppsCode
44
name: inbox-agent
5-
version: v2024.12.30
6-
appVersion: v0.0.3
5+
version: v2025.12.15
6+
appVersion: v0.0.5
77
home: https://github.com/ops-center
88
icon: https://cdn.appscode.com/images/products/searchlight/searchlight-512x512.png
99
sources: [https://github.com/ops-center]

charts/inbox-agent/README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
```bash
88
$ helm repo add appscode https://charts.appscode.com/stable/
99
$ helm repo update
10-
$ helm search repo appscode/inbox-agent --version=v2024.12.30
11-
$ helm upgrade -i inbox-agent appscode/inbox-agent -n monitoring --create-namespace --version=v2024.12.30
10+
$ helm search repo appscode/inbox-agent --version=v2025.12.15
11+
$ helm upgrade -i inbox-agent appscode/inbox-agent -n monitoring --create-namespace --version=v2025.12.15
1212
```
1313

1414
## Introduction
@@ -24,7 +24,7 @@ This chart deploys Inbox Agent on a [Kubernetes](http://kubernetes.io) cluster u
2424
To install/upgrade the chart with the release name `inbox-agent`:
2525

2626
```bash
27-
$ helm upgrade -i inbox-agent appscode/inbox-agent -n monitoring --create-namespace --version=v2024.12.30
27+
$ helm upgrade -i inbox-agent appscode/inbox-agent -n monitoring --create-namespace --version=v2025.12.15
2828
```
2929

3030
The command deploys Inbox Agent on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
@@ -94,17 +94,19 @@ The following table lists the configurable parameters of the `inbox-agent` chart
9494
| inboxServer.emailDomain | | <code>cloud.appscode.com</code> |
9595
| inboxServer.token | | <code>xyz</code> |
9696
| inboxServer.caBundle | | <code>xyz</code> |
97+
| distro.openshift | Set true, if installed in OpenShift | <code>false</code> |
98+
| distro.ubi | Set operator or all to use ubi images | <code>""</code> |
9799

98100

99101
Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade -i`. For example:
100102

101103
```bash
102-
$ helm upgrade -i inbox-agent appscode/inbox-agent -n monitoring --create-namespace --version=v2024.12.30 --set nameOverride=''
104+
$ helm upgrade -i inbox-agent appscode/inbox-agent -n monitoring --create-namespace --version=v2025.12.15 --set nameOverride=''
103105
```
104106

105107
Alternatively, a YAML file that specifies the values for the parameters can be provided while
106108
installing the chart. For example:
107109

108110
```bash
109-
$ helm upgrade -i inbox-agent appscode/inbox-agent -n monitoring --create-namespace --version=v2024.12.30 --values values.yaml
111+
$ helm upgrade -i inbox-agent appscode/inbox-agent -n monitoring --create-namespace --version=v2025.12.15 --values values.yaml
110112
```

charts/inbox-agent/templates/_helpers.tpl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,17 @@ imagePullSecrets:
110110
{{- toYaml . | nindent 2 }}
111111
{{- end -}}
112112
{{- end -}}
113+
114+
{{/*
115+
Returns whether the OpenShift distribution is used
116+
*/}}
117+
{{- define "distro.openshift" -}}
118+
{{- or (.Capabilities.APIVersions.Has "project.openshift.io/v1/Project") .Values.distro.openshift -}}
119+
{{- end }}
120+
121+
{{/*
122+
Returns if ubi images are to be used
123+
*/}}
124+
{{- define "operator.ubi" -}}
125+
{{ ternary "-ubi" "" (list "operator" "all" | has .Values.distro.ubi) }}
126+
{{- end }}

charts/inbox-agent/templates/operator/deployment.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,15 @@ spec:
5252
serviceAccountName: {{ include "inbox-agent.serviceAccountName" . }}
5353
containers:
5454
- name: operator
55-
image: "{{ include "operator.registry" . }}/{{ .Values.operator.repository }}:{{ .Values.operator.tag | default .Chart.AppVersion }}"
55+
image: {{ include "operator.registry" . }}/{{ .Values.operator.repository }}:{{ .Values.operator.tag | default .Chart.AppVersion }}{{ include "operator.ubi" . }}
5656
imagePullPolicy: {{ .Values.imagePullPolicy }}
57+
{{- if eq "true" ( include "distro.openshift" . ) }}
58+
securityContext:
59+
{{- toYaml (omit .Values.operator.securityContext "runAsUser" "runAsGroup" "fsGroup" "supplementalGroups") | nindent 10 }}
60+
{{- else }}
5761
securityContext:
5862
{{- toYaml .Values.operator.securityContext | nindent 10 }}
63+
{{- end }}
5964
args:
6065
- operator
6166
- --v={{ .Values.logLevel }}
@@ -135,8 +140,13 @@ spec:
135140
defaultMode: 420
136141
secretName: {{ include "inbox-agent.fullname" . }}-config
137142
{{- end }}
143+
{{- if eq "true" ( include "distro.openshift" . ) }}
144+
securityContext:
145+
{{- toYaml (omit .Values.podSecurityContext "runAsUser" "runAsGroup" "fsGroup" "supplementalGroups") | nindent 8 }}
146+
{{- else }}
138147
securityContext:
139148
{{- toYaml .Values.podSecurityContext | nindent 8 }}
149+
{{- end }}
140150
{{- if or $tolerations $criticalAddon }}
141151
tolerations:
142152
{{- with $tolerations }}

0 commit comments

Comments
 (0)