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

Commit

Permalink
Merge branch 'master' into gocd-server-enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
MPV committed Aug 28, 2018
2 parents 7da0d47 + 979a113 commit 26ad40c
Show file tree
Hide file tree
Showing 119 changed files with 776 additions and 182 deletions.
83 changes: 70 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,81 @@

The Kubernetes Charts project accepts contributions via GitHub pull requests. This document outlines the process to help get your contribution accepted.

### Contributor License Agreements
## Sign Your Work

We'd love to accept your patches! Before we can take them, we have to jump a couple of legal hurdles.
The sign-off is a simple line at the end of the explanation for a commit. All
commits needs to be signed. Your signature certifies that you wrote the patch or
otherwise have the right to contribute the material. The rules are pretty simple,
if you can certify the below (from [developercertificate.org](http://developercertificate.org/)):

The Cloud Native Computing Foundation (CNCF) CLA [must be signed](https://github.com/kubernetes/community/blob/master/CLA.md) by all contributors.
Please fill out either the individual or corporate Contributor License
Agreement (CLA).
```
Developer Certificate of Origin
Version 1.1
Once you are CLA'ed, we'll be able to accept your pull requests. For any issues that you face during this process,
please add a comment [here](https://github.com/kubernetes/kubernetes/issues/27796) explaining the issue and we will help get it sorted out.
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129
***NOTE***: Only original source code from you and other people that have signed the CLA can be accepted into the main repository.
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
```

Then you just add a line to every git commit message:

Signed-off-by: Joe Smith <joe.smith@example.com>

Use your real name (sorry, no pseudonyms or anonymous contributions.)

If you set your `user.name` and `user.email` git configs, you can sign your
commit automatically with `git commit -s`.

Note: If your git config information is set properly then viewing the
`git log` information for your commit will look something like this:

```
Author: Joe Smith <joe.smith@example.com>
Date: Thu Feb 2 11:41:15 2018 -0800
Update README
Signed-off-by: Joe Smith <joe.smith@example.com>
```

Notice the `Author` and `Signed-off-by` lines match. If they don't
your PR will be rejected by the automated DCO check.

### Reporting a Bug in Helm

This repository is used by Chart developers for maintaining the official charts for Kubernetes Helm. If your issue is in the Helm tool itself, please use the issue tracker in the [helm/helm](https://github.com/helm/helm) repository.

### How to Contribute a Chart
## How to Contribute a Chart

1. If you haven't already done so, sign a Contributor License Agreement (see details above).
1. Fork this repository, develop and test your Chart.
Expand All @@ -29,7 +86,7 @@ This repository is used by Chart developers for maintaining the official charts

***NOTE***: In order to make testing and merging of PRs easier, please submit changes to multiple charts in separate PRs.

#### Technical requirements
### Technical requirements

* All Chart dependencies should also be submitted independently
* Must pass the linter (`helm lint`)
Expand All @@ -53,7 +110,7 @@ This repository is used by Chart developers for maintaining the official charts
(especially for [labels](https://github.com/helm/helm/blob/master/docs/chart_best_practices/labels.md)
and [values](https://github.com/helm/helm/blob/master/docs/chart_best_practices/values.md))

#### Documentation requirements
### Documentation requirements

* Must include an in-depth `README.md`, including:
* Short description of the Chart
Expand All @@ -63,13 +120,13 @@ This repository is used by Chart developers for maintaining the official charts
* Any relevant post-installation information for the Chart
* Instructions on how to access the application or service provided by the Chart

#### Merge approval and release process
### Merge approval and release process

A Kubernetes Charts maintainer will review the Chart submission, and start a validation job in the CI to verify the technical requirements of the Chart. A maintainer may add "LGTM" (Looks Good To Me) or an equivalent comment to indicate that a PR is acceptable. Any change requires at least one LGTM. No pull requests can be merged until at least one maintainer signs off with an LGTM.

Once the Chart has been merged, the release job will automatically run in the CI to package and release the Chart in the [`gs://kubernetes-charts` Google Storage bucket](https://console.cloud.google.com/storage/browser/kubernetes-charts/).

### Support Channels
## Support Channels

Whether you are a user or contributor, official support channels include:

Expand Down
118 changes: 118 additions & 0 deletions brigade.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
const { events, Job } = require("brigadier");

// The push event only contains the new commits being pushed. Instead we are
// looking at the pull_request changes, which might be overkill, but provides
// the ability to query all the commits on the PR.
events.on("pull_request", async function(e, project) {

// The payload is a string we need to parse into JSON to access
const ghData = JSON.parse(e.payload);

// Notify GH that
var ghn = new Notification("dco-labeler", e, project);
ghn.text = "Checking for DCO";
await ghn.run();

// Get the commits to iterate over
var cj = new Job(`github-pr-commits`, "mattfarina/github-pr-commits:0.1.0");
cj.env = {
GITHUB_REPO: project.repo.name,
GITHUB_TOKEN: project.secrets.ghToken,
GITHUB_PR_NUMBER: ghData.number.toString(),
}
res = await cj.run();
var tempJson = JSON.stringify(res.toString());
tempJson = tempJson.replace(/\\n/g, "\\n")
.replace(/\\'/g, "\\'")
.replace(/\\"/g, '\\"')
.replace(/\\&/g, "\\&")
.replace(/\\r/g, "\\r")
.replace(/\\t/g, "\\t")
.replace(/\\b/g, "\\b")
.replace(/\\f/g, "\\f");
const commits = JSON.parse(tempJson);
const re = /^Signed-off-by: (.*) <(.*)>$/im

var count = 0, missed = 0;

for (const {commit, parents} of commits) {
// Skipping old commits that might be merged in but are not part of this PR.
const isMerge = parents && parents.length > 1;
if (isMerge) {
continue;
}

var signedOff = re.exec(commit.message);

if (signedOff === null){
missed++;
}
count++
}

// A notification that some were missed
if (missed > 0) {
// This is paired with org wide probot DCO checking that will list
// the commits missing a DCO signoff. We are interested in the label and
// if this bot is seeing an issue for debugging.
ghn.text = missed + " out of " + count + " commits are missing signoff";
ghn.state = "failure";

// Remove the label if already present
var j = new Job(`github-label-remover`, "mattfarina/github-label-remover:0.1.1");
j.env = {
GITHUB_REPO: project.repo.name,
GITHUB_ISSUE_LABEL: "Contribution%20Allowed",
GITHUB_TOKEN: project.secrets.ghToken,
GITHUB_ISSUE_NUMBER: ghData.number.toString(),
}
j.run();
} else {
ghn.text = "All commits have signoff";
ghn.state = "success";

// Add the label so the bot knows it can merge
var j = new Job(`github-label-adder`, "mattfarina/github-label-adder:0.1.0");
j.env = {
GITHUB_REPO: project.repo.name,
GITHUB_ISSUE_LABEL: "Contribution Allowed",
GITHUB_TOKEN: project.secrets.ghToken,
GITHUB_ISSUE_NUMBER: ghData.number.toString(),
}
j.run();
}
ghn.run();
})

class Notification {
constructor(name, e, p) {
this.proj = p;
this.e = e;
this.payload = e.payload;
this.text = "";

this.context = name;

// count allows us to send the notification multiple times, with a distinct pod name
// each time.
this.count = 0;

// One of: "success", "failure", "neutral", "cancelled", or "timed_out".
this.state = "pending";
}

// Send a new notification, and return a Promise<result>.
run() {
this.count++
var j = new Job(`${ this.context }-${ this.count }`, "technosophos/github-notify:1.0.0");
j.env = {
GH_REPO: this.proj.repo.name,
GH_STATE: this.state,
GH_TOKEN: this.proj.secrets.ghToken,
GH_COMMIT: this.e.revision.commit,
GH_DESCRIPTION: this.text,
GH_CONTEXT: this.context,
}
return j.run();
}
}
4 changes: 2 additions & 2 deletions incubator/elasticsearch/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: elasticsearch
home: https://www.elastic.co/products/elasticsearch
version: 1.4.3
appVersion: 6.3.2
version: 1.5.0
appVersion: 6.4.0
description: Flexible and powerful open source, distributed real-time search and analytics
engine.
icon: https://static-www.elastic.co/assets/blteb1c97719574938d/logo-elastic-elasticsearch-lt.svg
Expand Down
4 changes: 2 additions & 2 deletions incubator/elasticsearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ The following table lists the configurable parameters of the elasticsearch chart

| Parameter | Description | Default |
| ------------------------------------ | ------------------------------------------------------------------- | ------------------------------------ |
| `appVersion` | Application Version (Elasticsearch) | `6.3.2` |
| `appVersion` | Application Version (Elasticsearch) | `6.4.0` |
| `image.repository` | Container image name | `docker.elastic.co/elasticsearch/elasticsearch-oss` |
| `image.tag` | Container image tag | `6.3.2` |
| `image.tag` | Container image tag | `6.4.0` |
| `image.pullPolicy` | Container pull policy | `Always` |
| `cluster.name` | Cluster name | `elasticsearch` |
| `cluster.kubernetesDomain` | Kubernetes cluster domain name | `cluster.local` |
Expand Down
6 changes: 6 additions & 0 deletions incubator/elasticsearch/templates/client-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ spec:
- mountPath: /usr/share/elasticsearch/config/log4j2.properties
name: config
subPath: log4j2.properties
{{- end }}
{{- if .Values.image.pullSecrets }}
imagePullSecrets:
{{- range $pullSecret := .Values.image.pullSecrets }}
- name: {{ $pullSecret }}
{{- end }}
{{- end }}
volumes:
- name: config
Expand Down
6 changes: 6 additions & 0 deletions incubator/elasticsearch/templates/data-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@ spec:
exec:
command: ["/bin/bash","/post-start-hook.sh"]
terminationGracePeriodSeconds: {{ .Values.data.terminationGracePeriodSeconds }}
{{- if .Values.image.pullSecrets }}
imagePullSecrets:
{{- range $pullSecret := .Values.image.pullSecrets }}
- name: {{ $pullSecret }}
{{- end }}
{{- end }}
volumes:
- name: config
configMap:
Expand Down
6 changes: 6 additions & 0 deletions incubator/elasticsearch/templates/master-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@ spec:
- mountPath: /usr/share/elasticsearch/config/log4j2.properties
name: config
subPath: log4j2.properties
{{- end }}
{{- if .Values.image.pullSecrets }}
imagePullSecrets:
{{- range $pullSecret := .Values.image.pullSecrets }}
- name: {{ $pullSecret }}
{{- end }}
{{- end }}
volumes:
- name: config
Expand Down
7 changes: 5 additions & 2 deletions incubator/elasticsearch/values.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# Default values for elasticsearch.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
appVersion: "6.3.2"
appVersion: "6.4.0"

image:
repository: "docker.elastic.co/elasticsearch/elasticsearch-oss"
tag: "6.3.2"
tag: "6.4.0"
pullPolicy: "IfNotPresent"
# If specified, use these secrets to access the image
# pullSecrets:
# - registry-secret

cluster:
name: "elasticsearch"
Expand Down
4 changes: 2 additions & 2 deletions incubator/fluentd-cloudwatch/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: fluentd-cloudwatch
version: 0.5.0
appVersion: v0.12.33-cloudwatch
version: 0.5.1
appVersion: v0.12.43-cloudwatch
description: A Fluentd CloudWatch Helm chart for Kubernetes.
home: https://www.fluentd.org/
icon: https://raw.githubusercontent.com/fluent/fluentd-docs/master/public/logo/Fluentd_square.png
Expand Down
8 changes: 7 additions & 1 deletion incubator/fluentd-cloudwatch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The following table lists the configurable parameters of the Fluentd Cloudwatch
| Parameter | Description | Default |
| ------------------------------- | ------------------------------------------------------------------------- | --------------------------------------|
| `image.repository` | Image repository | `fluent/fluentd-kubernetes-daemonset` |
| `image.tag` | Image tag | `v0.12.33-cloudwatch` |
| `image.tag` | Image tag | `v0.12.43-cloudwatch` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `resources.limits.cpu` | CPU limit | `100m` |
| `resources.limits.memory` | Memory limit | `200Mi` |
Expand All @@ -64,6 +64,12 @@ The following table lists the configurable parameters of the Fluentd Cloudwatch
| `tolerations` | Add tolerations | `[]` |
| `extraVars` | Add pod environment variables (must be specified as a single line object) | `[]` |

Starting with fluentd-kubernetes-daemonset v0.12.43-cloudwatch, the container runs as user fluentd. To be able to write pos files to the host system, you'll need to run fluentd as root. Add the following extraVars value to run as root.

```code
"{ name: FLUENT_UID, value: '0' }"
```

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

```console
Expand Down
2 changes: 1 addition & 1 deletion incubator/fluentd-cloudwatch/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
image:
repository: fluent/fluentd-kubernetes-daemonset
tag: v0.12.33-cloudwatch
tag: v0.12.43-cloudwatch
## Specify an imagePullPolicy (Required)
## It's recommended to change this to 'Always' if the image tag is 'latest'
## ref: http://kubernetes.io/docs/user-guide/images/#updating-images
Expand Down
2 changes: 1 addition & 1 deletion incubator/fluentd/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
description: A Fluentd Elasticsearch Helm chart for Kubernetes.
icon: https://raw.githubusercontent.com/fluent/fluentd-docs/master/public/logo/Fluentd_square.png
name: fluentd
version: 0.1.4
version: 0.1.5
appVersion: 0.12
home: https://www.fluentd.org/
sources:
Expand Down
Loading

0 comments on commit 26ad40c

Please sign in to comment.