Skip to content
This repository was archived by the owner on Feb 22, 2022. It is now read-only.

Adding JFrog Distribution - #5631

Merged
k8s-ci-robot merged 17 commits into
helm:masterfrom
jainishshah17:distribution
Jun 13, 2018
Merged

k8s-ci-robot merged 17 commits into
helm:masterfrom
jainishshah17:distribution

Conversation

@jainishshah17

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Special notes for your reviewer:

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels May 18, 2018
-Dspring.profiles.active=production'
- name: mongo_connectionString
{{- if .Values.mongodb.mongodbUsername }}
value: 'mongodb://{{ .Values.mongodb.db.distributionUser }}:{{ .Values.mongodb.db.distributionPassword }}@{{ .Release.Name }}-mongodb:27017/{{ .Values.mongodb.db.name }}'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Best practice is usually to wrap up connection details in a secret.

-Xmx{{ .Values.distributor.resources.limits.memory | trunc 1 }}g
-Dspring.profiles.active=production'
- name: redis_connectionString
value: 'redis://:{{ .Values.redis.redisPassword }}@{{ .Release.Name }}-redis:6379'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please also wrap up the connection details into a secret.

command:
- 'sh'
- '-c'
- 'sh /scripts/setup.sh'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do you have issues with this running? Configmaps are mounted readonly.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@rjkernick It works for me on k8s 1.9.6.

@rjkernick

Copy link
Copy Markdown
Collaborator

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 22, 2018
data:
{{- if .Values.mongodb.mongodbUsername }}
mongo_connectionString: {{ template "mongodb.url" . }}
audit_mongo_connectionString: {{ template "mongodb.audit.url" . }}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can probably remove the if/else here as they have the same body.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@rjkernick done

@rjkernick

Copy link
Copy Markdown
Collaborator

/assign
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 23, 2018
Create a default fully qualified distribution name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "distribution.fullname" -}}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why doesn't this allow a fullnameOverride?

@@ -0,0 +1,111 @@
apiVersion: extensions/v1beta1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

apps/v1beta2

name: {{ template "distribution.fullname" . }}
labels:
app: {{ template "distribution.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The latest _helpers.tpl you get with helm create has a chart partial. Please update accordingly.

labels:
app: {{ template "distribution.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
component: {{ .Values.distribution.name }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do component names have to be configurable?

@@ -0,0 +1,80 @@
apiVersion: extensions/v1beta1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

apps/v1beta2

Comment thread incubator/distribution/values.yaml Outdated
db:
name: bintray
adminUser: admin
adminPassword: password

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Passwords should be auto-generated by default.

Comment thread incubator/distribution/values.yaml Outdated
persistence:
enabled: true
size: 10Gi
resources:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Don't set defaults for resources. Comment them out.

Comment thread incubator/distribution/values.yaml Outdated
repository: "docker.bintray.io/jfrog/distribution-distributor"
version: 1.0.0
imagePullPolicy: IfNotPresent
token: "eyJ2ZXIiOiIyIiwidHlwIjoiSldUIiwiYWxnIjoiUlMyNTYiLCJraWQiOiJ6WWFWQjVFRlpkOXlpbWtCNkZTbDAtSWFhMHRPWldLX293c1BTVTNTZmdNIn0.eyJzdWIiOiJJTlRFUk5BTCIsInNjcCI6ImFwcGxpZWQtcGVybWlzc2lvbnNcL3N5c3RlbSIsImF1ZCI6ImpmZHNAMDFjN3pxd2FnOWNmNTAwd2FnOXZhcTF3cjkiLCJpc3MiOiJqZmRzQDAxYzd6cXdhZzljZjUwMHdhZzl2YXExd3I5IiwiZXhwIjoyNDY3NjI1MDczLCJpYXQiOjE1MjE1NDUwNzMsImp0aSI6IjE0ZjJjN2IxLTMzYzQtNDA0Yy04YTllLTJmZjU2OGFjODRlOSJ9.ACfT3pfu4wTTt1wOkyqwYCp9UUVWNwMLl3ZyuO-igDR9N_G-G3oMkuCFekAzgOrTcbGjrXTDMNwoRyYhHUs4wtYxM9yAA-u72EhVz10stL9B0d2JUOamc8xJaLvQDhL38TYiTjdgNVsy726qgxzX2xnx1M8VSp9Qnw7r2ZGBQ6LjrESIUZb8IXy-93oxYqDSkWvjOJZiNQXhJBgOzhzq3r-buaGgxOMoC7DduCctCT0FIxd1jrsZPUnpH3YGE374j7YGcGBdy7eQj-skM3YircJVgk6XFYJBKZBJ8pX3NLZznirG2m9QbhLCRhH1T6B4g-HZvy251wz3QBUdmzO6Cg"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@unguiculus

Copy link
Copy Markdown
Member

/assign

@k8s-ci-robot k8s-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label May 25, 2018
## Configuration

The following table lists the configurable parameters of the distribution chart and their default values.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you format the table properly?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

- name: BT_SERVER_URL
value: {{ .Values.distribution.env.btServerUrl | quote }}
{{- if .Values.distribution.env.artifactoryEdge1Url }}
- name: artifactory_edge_1_url

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just wondering. It's kind of uncommon to have env vars lowercase. If case doesn't matter, I'd suggest you make them all uppercase.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's Case sensitive. Will get fixed with the future release of our product.

Comment thread incubator/distribution/values.yaml Outdated
## This is critical to protect against OOMKill by Kubernetes!
mongodbExtraFlags:
- "--wiredTigerCacheSizeGB=1"
mongodbRootPassword: password

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Don't specify default passwords. You could used the required function to display error messages and provide passwords for CI only.

See https://github.com/kubernetes/charts/blob/master/test/README.md#providing-custom-test-values

@unguiculus

Copy link
Copy Markdown
Member

/retest

@unguiculus

Copy link
Copy Markdown
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 13, 2018
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jainishshah17, rjkernick, unguiculus

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 13, 2018
@k8s-ci-robot
k8s-ci-robot merged commit 145a8d6 into helm:master Jun 13, 2018
jainishshah17 added a commit to jainishshah17/charts that referenced this pull request Jun 14, 2018
* art-ha-static-volumes: (60 commits)
  added support for static pv
  [stable/artifactory] adding support for edge node and replicator (helm#5649)
  [stable/grafana] Set the user and fs group for grafana (helm#5854)
  [stable/stolon] Fix issue with secret deletion during helm upgrade (helm#5903)
  cert-manager: fast-forward to upstream 36289cf0 (helm#5919)
  Split Jenkins readiness and liveness probe periods (helm#5704)
  Kafka release name check (helm#5770)
  Adding JFrog Distribution (helm#5631)
  Correct default zookeeper host to be compatible with zk charts (helm#5824)
  [stable/redis] add RBAC (helm#5971)
  [stable/wordpress] Set dependencies to latest version (helm#6074)
  [stable/rabbitmq] Release 1.1.6 (helm#6095)
  [stable/mariadb] Fix configurable parameters (helm#6092)
  [stable/keycloak] Add option to configure sidecars and misc improvements (helm#6090)
  [stable/kubewatch] - Use maintained bitnami image for kubewatch (helm#5871)
  [stable/ghost] Release 4.0.1 (helm#6085)
  update PROCESSES.md to clarify promotion process (helm#6084)
  [incubator/drone] Move drone from incubator to stable (helm#5780)
  fix for helm#6039 (helm#6042)
  [stable/sonatype-nexus] Update image to 3.12.1 (helm#6076)
  ...
@jainishshah17
jainishshah17 deleted the distribution branch June 20, 2018 19:38
voron pushed a commit to dysnix/helm-charts that referenced this pull request Sep 5, 2018
* added JFrog Distribution

* Fixed version

* removed extra empty line

* using secret for connection string

* removed unused condition

* chart.name from template

* removed resource value and added new apiVersion

* removed extra spaces

* removed default token

* fullnameOverride for distribution

* removed unused condition.

* Changing default external port to 80

* removed post install hook.

* removed hardcoded password and made it required

* added token for testing

* removed non overriding values

Signed-off-by: voron <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants