Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Helm Operator for OpenJ9 JITServer #81

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions helm-operator/openj9-jitserver-operator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# JITServer Operator

## Installation and deployment

### Requirements
- `kubectl` installed
- A running kubernetes cluster

### Installation
You can install the JITServer Operator into a Kubernetes cluster via `kubectl` commands.

- Deploy the operator:

```
kubectl apply -f deploy.yaml
```

- Verify the operator is running:

```
kubectl get deployment -n jitserver-operator-system | grep jitserver-operator

jitserver-operator-controller-manager 1/1 1 1 11s
```

```
kubectl get pods -n jitserver-operator-system | grep jitserver-operator

jitserver-operator-controller-manager-7dc5df6d68-g62kr 2/2 Running 0 48s
```

- Deploy the Custom Resource:

```
kubectl apply -f charts_v1alpha1_openj9jitserverchart.yaml
```

- Verify the Custom Resource is running:

```
kubectl get deployment | grep openj9jitserverchart

openj9jitserverchart-sample-openj9-jitserver-chart 1/1 1 1 13s
```

```
kubectl get pods | grep openj9jitserverchart

openj9jitserverchart-sample-openj9-jitserver-chart-5d5696fcz626 1/1 Running 0 54s
```

- Issue a sample query to the Custom Resource:

```
export POD_NAME=$(kubectl get pod --namespace default -o jsonpath="{..metadata.name}" | grep openj9jitserverchart-sample-openj9-jitserver-chart)
kubectl exec $POD_NAME -i -t -- java -version

openjdk version "1.8.0_322"
IBM Semeru Runtime Open Edition (build 1.8.0_322-b06)
Eclipse OpenJ9 VM (build openj9-0.30.0, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20220128_306 (JIT enabled, AOT enabled)
OpenJ9 - 9dccbe076
OMR - dac962a28
JCL - c1d9a7af7c based on jdk8u322-b06)
```

### Uninstallation
- Clean up the Custom Resource:
```
kubectl delete -f charts_v1alpha1_openj9jitserverchart.yaml
```

- Delete the operator:
```
kubectl delete -f deploy.yaml
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
apiVersion: charts.rouagarw/v1alpha1
kind: Openj9JitserverChart
metadata:
name: openj9jitserverchart-sample
spec:
# Default values copied from <project_dir>/helm-charts/openj9-jitserver-chart/values.yaml
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: beta.kubernetes.io/arch
operator: In
values:
- amd64
- ppc64le
- s390x
env:
- name: OPENJ9_JAVA_OPTIONS
value: ""
fullnameOverride: ""
image:
pullPolicy: IfNotPresent
repository: ibm-semeru-runtimes
tag: open-8u322-b06-jre
imagePullSecrets: []
nameOverride: ""
nodeSelector: {}
podSecurityContext: {}
replicaCount: 1
resources:
limits:
cpu: 2
memory: 4Gi
requests:
cpu: 1
memory: 512Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
privileged: false
readOnlyRootFilesystem: false
runAsNonRoot: true
runAsUser: 1001
service:
port: 38400
sessionAffinity: ClientIP
type: ClusterIP
serviceAccount:
annotations: {}
create: true
name: null
tolerations: []

Loading