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

helm lamp stack chart #1288

Merged
merged 21 commits into from Dec 5, 2017
Merged

helm lamp stack chart #1288

merged 21 commits into from Dec 5, 2017

Conversation

fnerdman
Copy link
Collaborator

See lamp/README.md for details of the chart. Let me know if you have any suggestions to complete the pull request.

@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. labels Jun 13, 2017
@viglesiasce
Copy link
Contributor

@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 5, 2017
@viglesiasce
Copy link
Contributor

/test

@viglesiasce
Copy link
Contributor

Can you add a default PW for the mysql like in the MySQL chart? This will allow the chart to install with the default values and make CI go through.

Example:
https://github.com/ROKKYT1/charts/blob/445ccf8418f19e258c54514eec5be773b1219401/stable/mysql/templates/secrets.yaml#L12

@viglesiasce
Copy link
Contributor

BTW awesome chart!!!!!!

@viglesiasce viglesiasce self-requested a review July 5, 2017 21:57
Copy link
Contributor

@viglesiasce viglesiasce left a comment

Choose a reason for hiding this comment

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

Make a default PW (hopefully random) for the MySQL root PW.

@fnerdman
Copy link
Collaborator Author

@viglesiasce
Random password is not a good idea. I've run into a lot of problems because updating the release would reset the password and then things like cloning the release would not work anymore. I've disabled the mysql container by default and now the build finishes successfully.

@fnerdman
Copy link
Collaborator Author

/retest

…ependency removed by adding the httpd config files to the chart
@fnerdman
Copy link
Collaborator Author

fnerdman commented Aug 8, 2017

@viglesiasce I'd like to contribute a 'nextcloud' chart which uses the lamp chart as a dependency. How long will it take to accept this pull request?

@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Sep 12, 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.

Please have a look at our best practices, especially regarding standard labels. Make sure all resources get our standard labels.
https://github.com/kubernetes/helm/blob/master/docs/chart_best_practices/labels.md

Note that we've started namespacing template (see #1785). Please apply this to your chart.

Please update the PR with latest master.

apiVersion: v1
description: Modular and transparent LAMP stack chart supporting PHP-FPM, Release Cloning, LoadBalancer, Ingress, SSL and lots more!
name: lamp
version: 0.1.0
Copy link
Member

Choose a reason for hiding this comment

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

Add appVersion.

Copy link
Contributor

Choose a reason for hiding this comment

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

We can leave this off since there is a conglomeration of app versions.


## Prerequisites

- Kubernetes 1.4+ with Beta APIs enabled
Copy link
Member

Choose a reason for hiding this comment

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

1.7+

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

Choose a reason for hiding this comment

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

Use initContainers field on the PodSpec instead of annotation.

@@ -0,0 +1,126 @@
{{- if .Values.ingress.enabled -}}
Copy link
Member

Choose a reason for hiding this comment

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

One file per resource, please.

kind: Ingress
metadata:
name: {{ template "fullname" . }}-www
annotations:
Copy link
Member

Choose a reason for hiding this comment

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

Instead of wrapping various annotations in if blocks, I'd suggest you add the annotations to the configuration. This would also be more flexible.

heritage: "{{ .Release.Service }}"
{{- if .Values.persistence.storageClass }}
annotations:
volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }}
Copy link
Member

Choose a reason for hiding this comment

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

No longer use annotation for storage class. We've developed a pattern for persistence (see #1869). Please follow this approach.

{{- if and .Values.sftp.enabled .Values.ingress.enabled }}

---

Copy link
Member

Choose a reason for hiding this comment

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

One file per resource, please.

#repository: php
#tag: fpm
pullPolicy: Always
fpm_enabled: true
Copy link
Member

Choose a reason for hiding this comment

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

Use camel case instead of underscores. Apply everywhere.

@unguiculus unguiculus self-assigned this Nov 3, 2017
@unguiculus
Copy link
Member

Marking this as stale. Please update within one week.

@fnerdman
Copy link
Collaborator Author

@unguiculus
I've fixed almost all of the issues. There are two things to note:

  • appVersion: since there are different "apps" being used, such as php, mysql etc. and the versions can change via values, i wouldn't know which one to chose

  • I added custom annotations to ingress however some of the annotations inside if clauses i left since they access template variables / have a broader spectrum and need more logic elsewhere

@unguiculus unguiculus removed the stale label Nov 17, 2017
metadata:
name: {{ template "lamp.fullname" . }}-httpd
labels:
app: {{ template "lamp.fullname" . }}
Copy link
Member

Choose a reason for hiding this comment

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

Should be app: {{ template "lamp.name" . }}. Please update everywhere.

protocol: TCP
name: sftp
selector:
app: {{ template "lamp.fullname" . }}
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 label to selector.

name: phpmyadmin
{{ end }}
selector:
app: {{ template "lamp.fullname" . }}
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 label to selector.

@fnerdman
Copy link
Collaborator Author

@unguiculus updated

@unguiculus
Copy link
Member

@viglesiasce Could you have another look, please?

apiVersion: v1
description: Modular and transparent LAMP stack chart supporting PHP-FPM, Release Cloning, LoadBalancer, Ingress, SSL and lots more!
name: lamp
version: 0.1.0
Copy link
Contributor

Choose a reason for hiding this comment

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

We can leave this off since there is a conglomeration of app versions.

## `ingress.kubernetes.io/proxy-body-size
annotations:
ingress.kubernetes.io/proxy-body-size: "50m"
kubernetes.io/ingress.class: nginx
Copy link
Contributor

Choose a reason for hiding this comment

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

Should leave these commented so that you can use the default ingress in the cluster, unless the proxy-body-size and NGINX is required.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Indeed, nginx ingress controller is not mandatory although some features such as ssl are only working with nginx controller. I've commented that part out and added explanations regarding nginx controller requirements to the values which need the controller.

@viglesiasce
Copy link
Contributor

/ok-to-test

@viglesiasce
Copy link
Contributor

awesome in that case:

/lgtm

@unguiculus all set on my end, merge when you are ready

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 27, 2017
@unguiculus unguiculus merged commit d284317 into helm:master Dec 5, 2017
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. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants