-
Notifications
You must be signed in to change notification settings - Fork 16.8k
Moved Artifactory to stable and updated version to 5.3.2 #1314
Conversation
# Conflicts: # incubator/artifactory/Chart.yaml
# Conflicts: # incubator/artifactory/Chart.yaml # incubator/artifactory/README.md # incubator/artifactory/values.yaml
Hi @jainishshah17. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
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.
Thanks for the update. I made a few comments.
stable/artifactory/README.md
Outdated
|
||
| Parameter | Description | Default | | ||
|---------------------------|-----------------------------------|----------------------------------------------------------| | ||
| `art_image.version` | Container image tag | `5.3.2` | |
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.
Documentation incomplete.
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.
Added
labels: | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" | ||
spec: | ||
replicas: {{ .Values.art_replicaCount }} |
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.
Don't use underscores. Use nesting instead.
See https://github.com/kubernetes/helm/blob/master/docs/chart_best_practices/values.md
Again, a good example would be https://github.com/kubernetes/charts/tree/master/stable/nginx-ingress/.
metadata: | ||
name: {{ .Values.art_name }} | ||
labels: | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" |
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.
Add standard labels. Apply everywhere. Here's a good example:
https://github.com/kubernetes/charts/tree/master/stable/nginx-ingress/
name
should be{{ template "fullname" . }}
app
should be{{ template "name" . }}
Adapt as in nginx-ingress example using components. You will also have to update selectors in services.
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.
Fixed
pod.beta.kubernetes.io/init-containers: '[{ | ||
"name": "remove-lost-found", | ||
"image": {{ .Values.initContainerImage | quote }}, | ||
"command": ["rm", "-rf", "{{ .Values.art_persistence.mountPath }}/lost+found"], |
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.
Why would you want to do this? Sounds like a hack to me. If lost+found
gets in your way, why don't you use a subdirectory?
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.
We do have 6 subdirectories and few files.
@unguiculus Made suggested changes please check. |
The May I direct you to the nginx-ingress example again regarding resource names: |
@unguiculus Does it looks good now? |
stable/artifactory/Chart.yaml
Outdated
@@ -1,8 +1,8 @@ | |||
apiVersion: v1 | |||
name: artifactory | |||
home: https://www.jfrog.com/artifactory/ | |||
version: 5.3.2 | |||
appVersion: 5.3.2 | |||
version: 5.4.1 |
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.
Chart version and app version are two different things. They don't have to be aligned.
Now it is kind of messed up. Don't confuse https://github.com/kubernetes/charts/tree/master/stable/nginx-ingress |
metadata: | ||
name: {{ template "artifactory.fullname" . }} | ||
labels: | ||
app: {{ template "fullname" . }} |
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.
app: {{ template "name" . }}
metadata: | ||
name: {{ template "nginx.fullname" . }} | ||
labels: | ||
app: {{ template "fullname" . }} |
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.
app: {{ template "name" . }}
targetPort: {{ .Values.nxService.internalPortHttps }} | ||
protocol: TCP | ||
name: {{ .Values.nxService.name }}https | ||
selector: |
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.
Add release: {{ .Release.Name }}
to selector.
metadata: | ||
name: {{ template "database.fullname" . }} | ||
labels: | ||
app: {{ template "fullname" . }} |
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.
app: {{ template "name" . }}
targetPort: {{ .Values.dbService.internalPort }} | ||
protocol: TCP | ||
name: {{ .Values.dbService.name }} | ||
selector: |
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.
Add release: {{ .Release.Name }}
to selector.
targetPort: {{ .Values.artService.internalPort }} | ||
protocol: TCP | ||
name: {{ .Values.artService.name }} | ||
selector: |
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.
Add release: {{ .Release.Name }}
to selector.
echo http://$SERVICE_IP/ | ||
|
||
{{- else if contains "ClusterIP" .Values.artService.type }} | ||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ .Values.artService.name }}" -o jsonpath="{.items[0].metadata.name}") |
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.
Add release
and component
labels to the selector.
Also, use the templates which use the values instead of the values directly. E. g. use {{ template "artifactory.name" . }}
instead of {{ .Values.artService.name }}
. Apply throughout NOTES.txt.
@unguiculus does it looks good now? |
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.
Almost there. Thanks you.
targetPort: {{ .Values.artService.internalPort }} | ||
protocol: TCP | ||
name: {{ .Release.Name }} | ||
selector: |
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.
Add release: {{ .Release.Name }}
to selector.
targetPort: {{ .Values.nxService.internalPortHttps }} | ||
protocol: TCP | ||
name: {{ .Release.Name }}https | ||
selector: |
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.
Add release: {{ .Release.Name }}
to selector.
targetPort: {{ .Values.dbService.internalPort }} | ||
protocol: TCP | ||
name: {{ .Release.Name }} | ||
selector: |
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.
Add release: {{ .Release.Name }}
to selector.
@unguiculus done |
stable/artifactory/Chart.yaml
Outdated
@@ -11,4 +13,6 @@ sources: | |||
maintainers: | |||
- name: Jainish shah | |||
email: jainishs@jfrog.com | |||
- name: Eldad Assis |
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.
Please use the Github username as name. We've started to recommend that because it helps identify the chart maintainer for future review.
@k8s-bot ok to test |
stable/artifactory/README.md
Outdated
**NOTE:** The Artifactory OSS does not use Nginx, so your Artifactory's Kubernetes service exposes Tomcat's port 8081 as port 80. | ||
|
||
By default it will run Artifactory-pro to run Artifactory-oss comment nginx configuration in value.yaml and use following command: | ||
Remove `nginx-deployment.yaml`, `nginx-pvc.yaml` and `nginx-service.yaml` and change art_service.externalPort to 80 in [values.yaml](values.yaml) before running command to install Artifactory-oss. |
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.
This is not ideal. You cannot just remove something when you install the chart from the repo. The user would have to download and adapt it. Please add some conditional logic to not include what's not needed for OSS. BTW, why wouldn't you run the OSS version behind Nginx?
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.
I'm sorry to be a little picky, but I'd really prefer it if you properly nested config values like so:
database:
replicaCount: 1
type: postgresql
name: artifactory
user: artifactory
pass: artXifactory1973
image:
repository: docker.bintray.io/postgres
tag: 9.5.2
pullPolicy: IfNotPresent
service:
type: ClusterIP
...
persistence:
...
artifactory:
replicaCount:
image:
repository: docker.bintray.io/jfrog/artifactory-pro
tag: 5.4.2
pullPolicy: IfNotPresent
service:
...
persistence:
...
nginx:
image:
...
service:
...
Would you mind changing that, please?
Also, you should use secrets for credentials.
Other than that, I managed to successfully test the chart on GKE.
labels: | ||
app: {{ template "name" . }} | ||
chart: {{ .Chart.Name }}-{{ .Chart.Version }} | ||
component: "{{ .Values.art_name }}" |
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.
art_name
-> artName
labels: | ||
app: {{ template "name" . }} | ||
chart: {{ .Chart.Name }}-{{ .Chart.Version }} | ||
component: "{{ .Values.art_name }}" |
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.
art_name
-> artName
stable/artifactory/README.md
Outdated
**NOTE:** The Artifactory OSS does not use Nginx, so your Artifactory's Kubernetes service exposes Tomcat's port 8081 as port 80. | ||
|
||
By default it will run Artifactory-pro to run Artifactory-oss comment nginx configuration in value.yaml and use following command: | ||
Remove `nginx-deployment.yaml`, `nginx-pvc.yaml` and `nginx-service.yaml` and change art_service.externalPort to 80 in [values.yaml](values.yaml) before running command to install Artifactory-oss. |
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.
art_service
-> artService
stable/artifactory/README.md
Outdated
| `dbPersistence.accessMode` | Database persistence volume access mode | `ReadWriteOnce` | | ||
| `dbPersistence.size` | Database persistence volume size | `10Gi` | | ||
| `artName` | Artifactory name | `artifactory` | | ||
| `artName.art_replicaCount` | Artifactory replica count | `1` | |
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.
artName.art_replicaCount
-> artName.artReplicaCount
stable/artifactory/values.yaml
Outdated
# Access the values with {{ .Values.key.subkey }} | ||
|
||
# Common | ||
replicaCount: 1 |
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.
This is not common. It's used for the DB. You should prefix this as well.
stable/artifactory/README.md
Outdated
|
||
| Parameter | Description | Default | | ||
|---------------------------|-----------------------------------|----------------------------------------------------------| | ||
| `replicaCount` | Replica count for Artifactory deployment| `1` | |
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.
Wrong. Used for DB. See below.
Have you seen my comment regarding secrets? |
@unguiculus done! |
kind: Secret | ||
metadata: | ||
labels: | ||
name: {{ template "name" . }} |
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.
name
label should be app
label.
@@ -0,0 +1,16 @@ | |||
apiVersion: v1 |
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.
I'd suggest you rename it to postgresql-secret.yaml
.
@unguiculus changed |
* upstream/master: (67 commits) Fix json whitespace (helm#1458) Use consistent whitespace in template placeholders (helm#1437) [stable/selenium] Make hub readiness probe timeout configurable (helm#1391) [stable/kube2iam]: add rbac support (helm#1286) [stable/traefik] Allow enabling traefik access logs (helm#1302) Add Stash chart (helm#1420) Add Gearman G2 chart (helm#1421) add option to include tolerations to daemonset (helm#1364) Moved Artifactory to stable and updated version to 5.3.2 (helm#1314) Concourse postgres conditional dependency (helm#1390) Typo in helm install command for dask-distributed (helm#1413) [stable/fluent-bit] Fluent Bit v0.11.12 (helm#1417) fixed cassandra chart's persistence bug (helm#1245) Prometheus: modify config to support k8s 1.6 by default (helm#1080) Add rocket.chat (helm#752) Fix influxdb deployment (helm#1424) feat(stable/etcd-operator): add support for supplying additional command args (helm#1418) add configurable service annotations helm#1234 (helm#1244) [stable/prometheus] extra environment variable for alert manager (helm#1237) [stable/heapster] Default service name to Heapster (helm#1266) ...
* Upgraded artifactory version to 4.16.0 * changes as per suggestion * Added Stable Artifactory chart * removed Incubator Artifactory chart * Fixed port issue * Fixed path * fixed readme * Added Documentation for all variables. * Updated labels * Fixed Parameter names * Fixed Notes.txt * Updated Artifactory version to 5.4.1 * Fixed metadata * Fixed naming * Changes. * Added release name to selector * Nginx for Oss and Pro * Fixed readme * using secret for database password * renamed secret to postgresql-secret.yaml
* Automated cherry pick of helm#1314 (cert-manager/cert-manager#1315) * Automated cherry pick of helm#1294 (cert-manager/cert-manager#1296) * Automated cherry pick of helm#1276 (cert-manager/cert-manager#1277) * Automated cherry pick of helm#1258 helm#1266 (cert-manager/cert-manager#1273) * Automated cherry pick of helm#1259 (cert-manager/cert-manager#1260) * Update Chart.yaml in webhook (cert-manager/cert-manager#1249)
* Automated cherry pick of helm#1314 (cert-manager/cert-manager#1315) * Automated cherry pick of helm#1294 (cert-manager/cert-manager#1296) * Automated cherry pick of helm#1276 (cert-manager/cert-manager#1277) * Automated cherry pick of helm#1258 helm#1266 (cert-manager/cert-manager#1273) * Automated cherry pick of helm#1259 (cert-manager/cert-manager#1260) * Update Chart.yaml in webhook (cert-manager/cert-manager#1249) Signed-off-by: James Munnelly <james@munnelly.eu>
No description provided.