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

fix vulnerabilities in docker image #109

Merged
merged 2 commits into from
Oct 20, 2022
Merged

fix vulnerabilities in docker image #109

merged 2 commits into from
Oct 20, 2022

Conversation

ravisingal
Copy link
Contributor

  1. fix vulnerabilities in docker image
  2. add capability to mount existing claim in pinot controller pods
  3. update prometheus-jmx-exporter image version

2. add capability to mount existing claim in pinot controller pods

# 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 \
Copy link
Contributor Author

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:

  1. pinot-input-format/pinot-orc
  2. pinot-input-format/pinot-parquet
  3. pinot-batch-ingestion/pinot-batch-ingestion-spark

Copy link
Contributor

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?

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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

openjdk images are deprecated. docker-library/openjdk#505

@@ -133,9 +133,15 @@ spec:
- name: log-config
configMap:
name: {{ include "pinot.controller.fullname" . }}-log-config
{{- if not .Values.controller.persistence.enabled }}
{{- if .Values.controller.persistence.existingClaim }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if existingClaim is defined, it will be used instead of creating a new PVC.

tim-mwangi
tim-mwangi previously approved these changes Oct 20, 2022
@@ -457,7 +458,7 @@ server:
port: 7071
image:
repository: hypertrace/prometheus-jmx-exporter
tag: 0.1.0
tag: 0.1.1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

laxmanchekka
laxmanchekka previously approved these changes Oct 20, 2022
@ravisingal ravisingal dismissed stale reviews from laxmanchekka and tim-mwangi via 1a1f7af October 20, 2022 17:09
@@ -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 }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new image returns error if the node already exist in zookeeper.

WatchedEvent state:SyncConnected type:None path:null
Node already exists: /pinot
[2022-10-20 16:45:45,596] ERROR Exiting JVM with code 1 (org.apache.zookeeper.util.ServiceUtils)

updated script to first check the node before creating it.

@ravisingal ravisingal merged commit b7d1b1f into main Oct 20, 2022
@ravisingal ravisingal deleted the fix-vulnerabilities branch October 20, 2022 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants