-
Notifications
You must be signed in to change notification settings - Fork 7
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
fix vulnerabilities in docker image #109
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,19 +13,20 @@ RUN curl -L https://archive.apache.org/dist/pinot/apache-pinot-$PINOT_VERSION/ap | |
mv apache-pinot-$PINOT_VERSION-bin $PINOT_HOME && \ | ||
rm -rf $PINOT_HOME/examples && \ | ||
rm -rf $PINOT_HOME/lib/* && \ | ||
rm -rf $PINOT_HOME/plugins/* | ||
rm -rf $PINOT_HOME/plugins/* && \ | ||
rm -rf $PINOT_HOME/plugins-external/* | ||
|
||
# Fetch jar | ||
RUN curl -L -o $PINOT_HOME/lib/pinot-all-${JITPACK_TAG}-shaded.jar \ | ||
https://jitpack.io/com/github/${JITPACK_REPO}/pinot-distribution/${JITPACK_TAG}/pinot-distribution-${JITPACK_TAG}-shaded.jar | ||
|
||
# Fetch plugin jars | ||
RUN for artifactId in pinot-kafka-2.0 pinot-kinesis pinot-thrift pinot-json pinot-parquet pinot-orc pinot-csv pinot-confluent-avro pinot-avro pinot-protobuf pinot-batch-ingestion-standalone pinot-batch-ingestion-hadoop pinot-batch-ingestion-spark pinot-hdfs pinot-adls pinot-gcs pinot-s3 pinot-minion-builtin-tasks pinot-segment-uploader-default pinot-segment-writer-file-based pinot-dropwizard pinot-yammer; do \ | ||
RUN for artifactId in pinot-kafka-2.0 pinot-kinesis pinot-thrift pinot-json pinot-csv pinot-confluent-avro pinot-avro pinot-protobuf pinot-batch-ingestion-standalone pinot-batch-ingestion-hadoop pinot-hdfs pinot-adls pinot-gcs pinot-s3 pinot-minion-builtin-tasks pinot-segment-uploader-default pinot-segment-writer-file-based pinot-dropwizard pinot-yammer; do \ | ||
curl -L -o $PINOT_HOME/plugins/${artifactId}-${JITPACK_TAG}-shaded.jar \ | ||
https://jitpack.io/com/github/${JITPACK_REPO}/${artifactId}/${JITPACK_TAG}/${artifactId}-${JITPACK_TAG}-shaded.jar; \ | ||
done | ||
|
||
FROM openjdk:11-jre-slim | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. openjdk images are deprecated. docker-library/openjdk#505 |
||
FROM eclipse-temurin:11-jre-jammy | ||
LABEL maintainer="Hypertrace https://www.hypertrace.org/" | ||
|
||
ENV PINOT_HOME=/opt/pinot | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,13 +45,19 @@ spec: | |
exitCode=1 | ||
i=0 | ||
while [ $i -le {{ .Values.zookeeper.retries }} ]; do | ||
bin/zookeeper-shell.sh ZooKeeper -server {{ include "zookeeper.url" . | quote }} create {{ .Values.zookeeper.path | quote }} "" | ||
bin/zookeeper-shell.sh ZooKeeper -server {{ include "zookeeper.url" . | quote }} ls {{ .Values.zookeeper.path | quote }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. new image returns error if the node already exist in zookeeper.
updated script to first check the node before creating it. |
||
if [ $? -eq 0 ]; then | ||
exitCode=0 | ||
break | ||
else | ||
bin/zookeeper-shell.sh ZooKeeper -server {{ include "zookeeper.url" . | quote }} create {{ .Values.zookeeper.path | quote }} "" | ||
if [ $? -eq 0 ]; then | ||
exitCode=0 | ||
break | ||
fi | ||
sleep {{ .Values.zookeeper.retryInterval }} | ||
i=`expr $i + 1` | ||
fi | ||
sleep {{ .Values.zookeeper.retryInterval }} | ||
i=`expr $i + 1` | ||
done | ||
exit $exitCode | ||
{{- end }} | ||
|
@@ -133,9 +139,15 @@ spec: | |
- name: log-config | ||
configMap: | ||
name: {{ include "pinot.controller.fullname" . }}-log-config | ||
{{- if not .Values.controller.persistence.enabled }} | ||
{{- if .Values.controller.persistence.existingClaim }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if |
||
- name: pinot-controller-storage | ||
persistentVolumeClaim: | ||
claimName: {{ .Values.controller.persistence.existingClaim | quote }} | ||
{{- else }} | ||
{{- if not .Values.controller.persistence.enabled }} | ||
- name: pinot-controller-storage | ||
emptyDir: {} | ||
{{- end }} | ||
{{- end }} | ||
{{- if eq .Values.cluster.storage.scheme "gs" }} | ||
- name: gcs-iam-secret | ||
|
@@ -163,6 +175,7 @@ spec: | |
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.controller.persistence.enabled }} | ||
{{- if not .Values.controller.persistence.existingClaim }} | ||
volumeClaimTemplates: | ||
- metadata: | ||
name: pinot-controller-storage | ||
|
@@ -179,5 +192,6 @@ spec: | |
resources: | ||
requests: | ||
storage: {{ .Values.controller.persistence.size | quote}} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ controller: | |
size: 2Gi | ||
mountPath: /var/pinot/controller/data | ||
storageClass: "standard" | ||
existingClaim: "" | ||
|
||
data: | ||
dir: /var/pinot/controller/data | ||
|
@@ -130,7 +131,7 @@ controller: | |
port: 7071 | ||
image: | ||
repository: hypertrace/prometheus-jmx-exporter | ||
tag: 0.1.0 | ||
tag: 0.1.1 | ||
pullPolicy: IfNotPresent | ||
resources: | ||
requests: | ||
|
@@ -246,7 +247,7 @@ broker: | |
port: 7071 | ||
image: | ||
repository: hypertrace/prometheus-jmx-exporter | ||
tag: 0.1.0 | ||
tag: 0.1.1 | ||
pullPolicy: IfNotPresent | ||
resources: | ||
requests: | ||
|
@@ -352,7 +353,7 @@ minion: | |
port: 7071 | ||
image: | ||
repository: hypertrace/prometheus-jmx-exporter | ||
tag: 0.1.0 | ||
tag: 0.1.1 | ||
pullPolicy: IfNotPresent | ||
resources: | ||
requests: | ||
|
@@ -457,7 +458,7 @@ server: | |
port: 7071 | ||
image: | ||
repository: hypertrace/prometheus-jmx-exporter | ||
tag: 0.1.0 | ||
tag: 0.1.1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
pullPolicy: IfNotPresent | ||
resources: | ||
requests: | ||
|
@@ -565,7 +566,7 @@ zookeeper: | |
retries: 10 | ||
retryInterval: 5 | ||
image: | ||
repository: "solsson/kafka" | ||
tag: "2.1.0@sha256:ac3f06d87d45c7be727863f31e79fbfdcb9c610b51ba9cf03c75a95d602f15e1" | ||
repository: "hypertrace/kafka" | ||
tag: "0.2.0" | ||
pullPolicy: IfNotPresent | ||
pullSecret: "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the following 3 plugins having critical vulnerabilities:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming we are not using them?