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

Moved Artifactory to stable and updated version to 5.3.2 #1314

Merged
merged 25 commits into from Jul 6, 2017

Conversation

jainishshah17
Copy link
Contributor

No description provided.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 16, 2017
@k8s-ci-robot
Copy link
Contributor

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 @k8s-bot ok to test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

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.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 16, 2017
Copy link
Member

@unguiculus unguiculus left a 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.


| Parameter | Description | Default |
|---------------------------|-----------------------------------|----------------------------------------------------------|
| `art_image.version` | Container image tag | `5.3.2` |
Copy link
Member

Choose a reason for hiding this comment

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

Documentation incomplete.

Copy link
Contributor Author

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 }}
Copy link
Member

Choose a reason for hiding this comment

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

metadata:
name: {{ .Values.art_name }}
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
Copy link
Member

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.

Copy link
Contributor Author

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"],
Copy link
Member

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?

Copy link
Contributor Author

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 unguiculus self-assigned this Jun 18, 2017
@jainishshah17
Copy link
Contributor Author

@unguiculus Made suggested changes please check.

@unguiculus
Copy link
Member

The app label is not yet correct everywhere.

May I direct you to the nginx-ingress example again regarding resource names:
https://github.com/kubernetes/charts/blob/master/stable/nginx-ingress/templates/controller-deployment.yaml#L11
https://github.com/kubernetes/charts/blob/master/stable/nginx-ingress/templates/_helpers.tpl#L18-L25

@jainishshah17
Copy link
Contributor Author

@unguiculus Does it looks good now?

@@ -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
Copy link
Member

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.

@unguiculus
Copy link
Member

Now it is kind of messed up. Don't confuse name and the app label. Let me again suggest you to study the nginx-ingress chart as mentioned above. It has multiple components as well. Check how they are structured, named, and labeled.

https://github.com/kubernetes/charts/tree/master/stable/nginx-ingress
https://github.com/kubernetes/charts/blob/master/stable/nginx-ingress/templates/_helpers.tpl

metadata:
name: {{ template "artifactory.fullname" . }}
labels:
app: {{ template "fullname" . }}
Copy link
Member

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" . }}
Copy link
Member

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:
Copy link
Member

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" . }}
Copy link
Member

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:
Copy link
Member

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:
Copy link
Member

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}")
Copy link
Member

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.

@jainishshah17
Copy link
Contributor Author

@unguiculus does it looks good now?

Copy link
Member

@unguiculus unguiculus left a 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:
Copy link
Member

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:
Copy link
Member

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:
Copy link
Member

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.

@jainishshah17
Copy link
Contributor Author

@unguiculus done

@@ -11,4 +13,6 @@ sources:
maintainers:
- name: Jainish shah
email: jainishs@jfrog.com
- name: Eldad Assis
Copy link
Member

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.

@unguiculus
Copy link
Member

@k8s-bot 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 Jul 1, 2017
**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.
Copy link
Member

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?

Copy link
Member

@unguiculus unguiculus left a 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 }}"
Copy link
Member

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 }}"
Copy link
Member

Choose a reason for hiding this comment

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

art_name -> artName

**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.
Copy link
Member

Choose a reason for hiding this comment

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

art_service-> artService

| `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` |
Copy link
Member

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

# Access the values with {{ .Values.key.subkey }}

# Common
replicaCount: 1
Copy link
Member

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.


| Parameter | Description | Default |
|---------------------------|-----------------------------------|----------------------------------------------------------|
| `replicaCount` | Replica count for Artifactory deployment| `1` |
Copy link
Member

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.

@unguiculus
Copy link
Member

Have you seen my comment regarding secrets?

@jainishshah17
Copy link
Contributor Author

@unguiculus done!

kind: Secret
metadata:
labels:
name: {{ template "name" . }}
Copy link
Member

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
Copy link
Member

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.

@jainishshah17
Copy link
Contributor Author

@unguiculus changed

@unguiculus unguiculus added code reviewed lgtm Indicates that a PR is ready to be merged. labels Jul 6, 2017
@unguiculus unguiculus merged commit 689cc8b into helm:master Jul 6, 2017
lachie83 added a commit to lachie83/charts that referenced this pull request Jul 10, 2017
* 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)
  ...
yanns pushed a commit to yanns/charts that referenced this pull request Jul 28, 2017
* 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
munnerz added a commit to munnerz/charts-1 that referenced this pull request Feb 5, 2019
* 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)
munnerz added a commit to munnerz/charts-1 that referenced this pull request Feb 5, 2019
* 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>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. code reviewed lgtm Indicates that a PR is ready to be merged. size/large UX reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants