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

Add chart for Traefik-based ingress controller #146

Merged
merged 18 commits into from
Nov 2, 2016
Merged

Add chart for Traefik-based ingress controller #146

merged 18 commits into from
Nov 2, 2016

Conversation

krancour
Copy link
Contributor

@krancour krancour commented Oct 24, 2016

Current Todo:

  • Decide on whether this chart should be in stable or incubator

@k8s-ci-robot
Copy link
Contributor

Can a kubernetes member verify that this patch is reasonable to test? If so, please reply with "@k8s-bot ok to test" on its own line.

Regular contributors should join the org to skip this step.

@prydonius
Copy link
Member

Thanks @krancour!

## Introduction

This chart bootstraps Traefik as a Kubernetes ingress controller with optional support for SSL and
Let's Encrypt. By default, Traefik will be installed into the `kube-system` namespace.
Copy link
Member

Choose a reason for hiding this comment

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

Is this a requirement? I think we generally prefer that Helm manages the namespace Charts get installed into with the --namespace flag.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not a hard and fast requirement, however, since ingress controllers are frequently used to watch Ingress objects cluster-wide (i.e. in all namespaces), they often require the elevated permissions of the kube-system namespace's default service account.

When writing this chart, I assumed that for the less-frequent (or so I imagine) use case where someone does want to install this into some other namespace that --namespace would override the hard-coded default of kube-system. I've put that to the test now, however, and found it doesn't work that way!

cc @technosophos @michelleN isn't --namespace supposed to override whatever default is hard-coded in the chart's manifests? Or was it just wishful thinking on my part that it works that way?

At any rate, it does seem that what is best for now is that I omit this hard-coded default and instead document that this component would most often be installed into kube-system.

Copy link
Contributor Author

@krancour krancour Oct 24, 2016

Choose a reason for hiding this comment

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

@prydonius I've amended the PR as discussed above.

Copy link
Contributor

@chrislovecnm chrislovecnm 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 PR, looks awesome. Have some recommended tweaks

@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2016 Deis
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this? This project is Apache 2 licensed and now we have MIT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, that's a tricky question. It seems individual charts are subject to their own license, no? What I opted to do here was use the same license that Traefik itself uses. If that's the wrong move, lmk.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this code/repo can have a separate license from the source of traefik itself.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok. I'll change it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm actually just going to remove the license from this chart altogether. It seems license is optional for charts and no other chart in this repo includes one. I'm going to follow that precedent.

labels:
k8s-app: traefik-ingress-controller
version: {{ .Chart.Version }}
spec:
Copy link
Contributor

Choose a reason for hiding this comment

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

ready and lively probes please, as well as resource limits ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep. Good call.

{{- if .Values.acme.enabled }}
- name: acme
{{- if .Values.acme.persistence.enabled }}
persistentVolumeClaim:
Copy link
Contributor

Choose a reason for hiding this comment

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

It there value to have storage classes?

Copy link
Contributor

Choose a reason for hiding this comment

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

It == Is

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure what you're asking here. Can you clarify please?

This currently follows the exact pattern used by the stable MySQL chart for persistent storage.

Copy link
Contributor

Choose a reason for hiding this comment

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

The storage class is defined in the PVC not the deployment. Nothing to see here.

ssl:
enabled: false
enforced: false
defaultCert: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUVtekNDQTRPZ0F3SUJBZ0lKQUpBR1FsTW1DMGt5TUEwR0NTcUdTSWI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QVRFLS0tLS0K
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be a secret name instead? Then the docs could outline how to create that secret (keys/values) such that it can be used here?

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 I can make an argument for keeping it as it is...

The base64 encoded cert and key you put here becomes a secret. This means that you provide customizations to this either through --set on the command line or in your own values.yaml. i.e. You can customize these through the usual Helm workflow for customizing a chart.

Compare that to some other approach that requires a careful reading of the documentation and an "out of band" effort to create the secrets... I don't believe that compares favorably to what's in place now.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fair. I'm fine as is. If users want something different, I'm sure they will chime in down the road.

Could I ask you to add instructions on getting those values? Also what do the default certs point to?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The readme has a table describing the configuration options. It's clear that the cert and key should be base64 encoded. I can add more specific instructions if you like. lmk

The cert that's included is a self-signed cert for *.example.com-- so it's basically garbage. The benefit, however, is that it's enough to get people going.

I will update the table to reflect the details of this cert.

@viglesiasce
Copy link
Contributor

Awesome stuff @krancour!

@viglesiasce
Copy link
Contributor

@k8s-bot ok to test

@ekozan
Copy link

ekozan commented Oct 25, 2016

@krancour Can you integrate HostPort option or I'll make a PR after merge

@krancour
Copy link
Contributor Author

@ekozan, did you mean NodePort? You want that as an alternative to type: LoadBalancer?

That seems a reasonable option (but not a default). It would certainly be a benefit to anyone who wants to run this anywhere where the "cloud provider" no-ops provisioning of an external load balancer-- e.g. minikube or bare metal.

I'd be happy to add that.

```

After installing the chart, create a DNS CNAME record for applicable domains to direct inbound
traffic the load balancer. You can you the command below to find the load balancer's DNS name:
Copy link
Member

Choose a reason for hiding this comment

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

a couple minor typos here; perhaps the following were intended: ... direct inbound traffic to the load balancer and You can use the command ...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice eye, @vdice. Will fix.

@viglesiasce
Copy link
Contributor

Tested manually and all things seem to check out. Thanks again @krancour! Let me know when you've patched the README fixes. Also if you'd like to get this into stable, adding a NOTES.txt pointing people in the right direction for how to configure and use traefik would do the trick.

@krancour
Copy link
Contributor Author

@viglesiasce great. I will try and amend with all suggested fixes as soon as time permits-- a few hours off, for sure.

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example:

```bash
$ helm install --name my-release --namespace kube-system --set dashboard.enabled=true,dashboard.domain=traefik.example.com stable/traefik
Copy link

Choose a reason for hiding this comment

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

Actually it's incubator/traefik not stable/traefik

Copy link
Contributor

Choose a reason for hiding this comment

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

If he adds a NOTES.txt it can be merged into stable directly

@ekozan
Copy link

ekozan commented Oct 25, 2016

Yeap it's an alternative for barebone cluster ;)

We need
Add option for switch the default type of service: LoadBalancer / HostPort / NodePort
Add option for switch to Deamonset is needed too :p i'll handle this if you dont want to add this one

@ultimateboy
Copy link
Contributor

ultimateboy commented Oct 25, 2016

Just thought I'd report my successful testing of this chart, and Traefik's ability to issue certs from Let's Encrypt.

helm install incubator/traefik --name my-traefik --namespace kube-system --set dashboard.enabled=true,dashboard.domain=traefik.domain.you.own.com,ssl.enabled=true,acme.enabled=true,[email protected]
kubectl run nginx --image=nginx
kubecl expose deploy nginx --port=80 --target-port=80
echo "apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: nginx
  namespace: default
spec:
  rules:
  - host: some.domain.you.own.com
    http:
      paths:
      - backend:
          serviceName: nginx
          servicePort: 80" > ingress.yaml

kubectl create -f ingress.yaml
echo | openssl s_client -servername some.domain.you.own.com -connect some.domain.you.own.com:443 2>/dev/null | openssl x509 -noout -issuer
issuer= /C=US/O=Let's Encrypt/CN=Let's Encrypt Authority X3

@krancour
Copy link
Contributor Author

It'll be tomorrow before I get to this.

@krancour
Copy link
Contributor Author

krancour commented Oct 27, 2016

@viglesiasce I've addressed comments apart from one. You indicated I should add a NOTES.txt "pointing people in the right direction for how to configure and use traefik."

I'm unclear on what that should contain or what its purpose would be.

charts.yaml already points users in the direction of the Traefik documentation. That aside, detailed knowledge of configuring Traefik isn't required to use this chart, since all customizations are carried out not by editing Traefik's config directly, but by supplying a values.yaml instead.

@krancour
Copy link
Contributor Author

@ultimateboy offline you asked me to support LE staging to avoid rate limits when testing / experimenting. I've added that now and made it the default as well (when ACME is enabled). Check it out and lmk what you think.

Copy link
Contributor

@lachie83 lachie83 left a comment

Choose a reason for hiding this comment

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

Can we add a disclaimer on the current state of Traefik and it's prod readiness?

@@ -8,7 +8,7 @@ microservices with ease.
This chart bootstraps Traefik as a Kubernetes ingress controller with optional support for SSL and
Let's Encrypt.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you a disclaimer about the state of Traefik?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep. Meant to, as we'd discussed. Forgot. Coming atcha.

@@ -8,7 +8,7 @@ microservices with ease.
This chart bootstraps Traefik as a Kubernetes ingress controller with optional support for SSL and
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks great! Thanks for the updates!

Copy link
Contributor

@lachie83 lachie83 left a comment

Choose a reason for hiding this comment

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

NOTES.txt looks much better! Thanks

@prydonius
Copy link
Member

@lachie83 @viglesiasce @krancour

By putting this chart into stable may give the impression that it's ready for primetime.

Agreed, if the project itself is not production-ready then the package should be in incubator.

@@ -3,6 +3,9 @@
[Traefik](http://traefik.io/) is a modern HTTP reverse proxy and load balancer made to deploy
microservices with ease.

__DISCLAIMER:__ While this chart has been well-tested, testers have encountered occasional issues
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks @krancour

@krancour
Copy link
Contributor Author

krancour commented Nov 2, 2016

To clarify, I believe Traefik regards itself as production ready and people certainly do use Traefik in production. Any assertion about production readiness here is purely based on @lachie83's and my own hesitation to endorse this as such.

@krancour
Copy link
Contributor Author

krancour commented Nov 2, 2016

So I'm going to move this to incubator. Standby.

@krancour
Copy link
Contributor Author

krancour commented Nov 2, 2016

Moved

@lachie83
Copy link
Contributor

lachie83 commented Nov 2, 2016

To clarify, I believe Traefik regards itself as production ready and people certainly do use Traefik in production. Any assertion about production readiness here is purely based on @lachie83's and my own hesitation to endorse this as such.

Agreed 👍

@viglesiasce
Copy link
Contributor

I dont know about that folks. Where is this production ready requirement coming from for stable? Its not listed anywhere and the other requirements are quite explicit. I don't want us to cross this line.

@krancour
Copy link
Contributor Author

krancour commented Nov 2, 2016

So if the chart's own author(s) would hesitate to use it in production (depending on the use case), this can still qualify as "stable?"

@krancour
Copy link
Contributor Author

krancour commented Nov 2, 2016

Maybe some clarification on what, precisely, is meant by "stable" is in order. I will acknowledge I made a pretty big (and perhaps incorrect) assumption that stability was equated with production readiness.

@lachie83
Copy link
Contributor

lachie83 commented Nov 2, 2016

I dont know about that folks. Where is this production ready requirement coming from for stable? Its not listed anywhere and the other requirements are quite explicit. I don't want us to cross this line.

Understood and I agree that it's not our position to decide whether something is production ready. I don't want to cross that line. Stable does not mean Prod Ready

How about we approach this from a difference angle - putting this in the incubator is a great way for it to gather some miles

@lachie83 lachie83 removed their assignment Nov 2, 2016
@viglesiasce
Copy link
Contributor

viglesiasce commented Nov 2, 2016

Stable charts meet these requirements.

If we cross the line of requiring things to be production ready then we need to define production ready in a way that is obvious otherwise we are going to end up with a lot of bikeshedding. For most packages (rpm and deb) the defaults are sane but not production ready.

@krancour
Copy link
Contributor Author

krancour commented Nov 2, 2016

How about we approach this from a difference angle - putting this in the incubator is a great way for it to gather some miles

@viglesiasce is there any validity to that notion? That things are "promoted" so stable after proving themselves in the incubator?

@viglesiasce
Copy link
Contributor

The only thing we say in the README.md is that stable charts meet the criteria in the technical requirements. If we want to change that policy then we need to update the documentation via a PR where we can hash out the why and how.

@krancour
Copy link
Contributor Author

krancour commented Nov 2, 2016

Ok. I'm going to strike the last commit (the move to incubator) from this PR.

@lachie83
Copy link
Contributor

lachie83 commented Nov 2, 2016

Thanks for the great discussion and clarification.

Given that this chart meets the requirements. My vote is on putting this in stable.

@krancour
Copy link
Contributor Author

krancour commented Nov 2, 2016

All set. Back in stable.

@prydonius
Copy link
Member

@viglesiasce you're right, for some reason I thought some level of 'production-readiness' was a requirement. I would argue for promoting the stable repo as a source of 'production-ready' charts, but it's a separate discussion to define what we could mean by that and whether it makes sense to enforce it.

@lachie83
Copy link
Contributor

lachie83 commented Nov 2, 2016

LGTM

1 similar comment
@viglesiasce
Copy link
Contributor

LGTM

@prydonius
Copy link
Member

@krancour lgtm, all good to merge?

@krancour
Copy link
Contributor Author

krancour commented Nov 2, 2016

Yes

@lachie83 lachie83 merged commit 6b02be8 into helm:master Nov 2, 2016
@lachie83
Copy link
Contributor

lachie83 commented Nov 2, 2016

Thanks all! Excited to have this chart!

@krancour krancour deleted the traefik branch November 2, 2016 18:34
shubham14bajpai pushed a commit to shubham14bajpai/charts that referenced this pull request Sep 6, 2021
- add openebs operator 2.1.0-RC1
- add cstor operator 2.1.0-RC1 and dependents
- add zfs localPV 1.0.0-RC1 operator
- add openebs operator 2.1.0-RC2
- add cstor operator 2.1.0-RC2 and dependents
- add zfs localPV 1.0.0-RC2 operator
- add openebs operator 2.1.0
- add cstor operator 2.1.0 and dependents
- add zfs localPV 1.0.0 operator
- add openebs lite operator
- add openebs operator for suse caas platform

Signed-off-by: Akhil Mohan <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants