-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #180 from mesosphere/joe/1.3.0
Release 1.3.0
- Loading branch information
Showing
11 changed files
with
309 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!starlark | ||
|
||
gitResource("src-git", url = "$(context.git.url)", revision = "$(context.git.commit)") | ||
|
||
def secretVar(name, key): | ||
return k8s.corev1.EnvVarSource(secretKeyRef = k8s.corev1.SecretKeySelector( | ||
localObjectReference = k8s.corev1.LocalObjectReference(name=name), | ||
key = key)) | ||
|
||
dindTask("dispatch-integration-test", | ||
inputs = ["src-git"], | ||
steps = [ | ||
v1.Container( | ||
name="fetch-master", | ||
image = "mesosphere/dispatch-dind:v0.5.2", | ||
workingDir="/workspace/src-git", | ||
args=["git", "fetch", "origin", "master"]), | ||
v1.Container( | ||
name = "dispatch-integration-test", | ||
image = "mesosphere/kubeaddons-ci:dispatch", | ||
command = ["make","test"], | ||
workingDir = "/workspace/src-git", | ||
env = [k8s.corev1.EnvVar(name = "DISPATCH_CI", value = "true"), | ||
k8s.corev1.EnvVar(name = "SSH_KEY_BASE64", | ||
valueFrom = secretVar("d2iq-dispatch-git-ssh-base64", | ||
"ssh-privatekey-base64"))])]) | ||
|
||
action(tasks = ["dispatch-integration-test"], on = pullRequest()) | ||
action(tasks = ["dispatch-integration-test"], on = pullRequest(chatops = ["test"])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
SHELL := /bin/bash -euo pipefail | ||
|
||
export GO111MODULE := on | ||
export ADDON_TESTS_PER_ADDON_WAIT_DURATION := 10m | ||
export GIT_TERMINAL_PROMPT := 1 | ||
export ADDON_TESTS_SETUP_WAIT_DURATION := 30m | ||
export GOPRIVATE := github.com/mesosphere/kubeaddons | ||
|
||
|
||
.DEFAULT_GOAL := test | ||
|
||
.PHONY: set-git-ssh | ||
set-git-ssh: | ||
ifdef DISPATCH_CI | ||
./scripts/ci/setup_ssh.sh | ||
endif | ||
|
||
.PHONY: test | ||
test: set-git-ssh | ||
cd test && git fetch; \ | ||
for g in $(shell cd test && go run scripts/test-wrapper.go); do \ | ||
go test -timeout 30m -race -v -run $$g; \ | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
--- | ||
apiVersion: kubeaddons.mesosphere.io/v1beta1 | ||
kind: Addon | ||
metadata: | ||
name: elasticsearch | ||
namespace: kubeaddons | ||
labels: | ||
kubeaddons.mesosphere.io/name: elasticsearch | ||
# TODO: we're temporarily supporting dependency on an existing default storage class | ||
# on the cluster, this hack will trigger re-queue on Addons until one exists. | ||
kubeaddons.mesosphere.io/hack-requires-defaultstorageclass: "true" | ||
annotations: | ||
catalog.kubeaddons.mesosphere.io/addon-revision: "6.8.2-2" | ||
appversion.kubeaddons.mesosphere.io/elasticsearch: "6.8.2" | ||
values.chart.helm.kubeaddons.mesosphere.io/elasticsearch: "https://raw.githubusercontent.com/helm/charts/6bfbc8018cd4440637b07c7559d5812e4d9db34d/stable/elasticsearch/values.yaml" | ||
spec: | ||
kubernetes: | ||
minSupportedVersion: v1.15.0 | ||
cloudProvider: | ||
- name: aws | ||
enabled: true | ||
- name: azure | ||
enabled: true | ||
- name: gcp | ||
enabled: true | ||
- name: docker | ||
enabled: false | ||
- name: none | ||
enabled: true | ||
chartReference: | ||
chart: stable/elasticsearch | ||
version: 1.32.0 | ||
values: | | ||
--- | ||
client: | ||
heapSize: 1024m | ||
resources: | ||
limits: | ||
cpu: 500m | ||
memory: 2048Mi | ||
requests: | ||
cpu: 100m | ||
memory: 1536Mi | ||
master: | ||
updateStrategy: | ||
type: RollingUpdate | ||
heapSize: 1024m | ||
resources: | ||
# need more cpu upon initialization, therefore burstable class | ||
limits: | ||
cpu: 1000m | ||
memory: 2048Mi | ||
requests: | ||
cpu: 500m | ||
memory: 1536Mi | ||
data: | ||
updateStrategy: | ||
type: RollingUpdate | ||
hooks: | ||
drain: | ||
enabled: false | ||
# Because the drain is set to false, we can take advantage here and create resources we need | ||
postStart: |- | ||
#!/bin/bash | ||
# Creating the index template: 'kubernetes_cluster' | ||
# Reduces the number of fields produced due to the indexing of the audit logs | ||
# if template doesnt return 200, try to create it | ||
if ! curl -I -XGET '{{ template "elasticsearch.client.fullname" . }}:9200/_template/kubernetes_cluster' | grep "200" > /dev/null | ||
then | ||
echo "Creating the index template: 'kubernetes_cluster'" | ||
curl -H 'Content-Type: application/json' -XPUT '{{ template "elasticsearch.client.fullname" . }}:9200/_template/kubernetes_cluster' -d '{"index_patterns":["kubernetes_cluster*"],"mappings":{"flb_type":{"properties":{"@ts":{"type":"date"},"requestObject":{"dynamic":false,"properties":{"apiVersion":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"kind":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"metadata":{"properties":{"creationTimestamp":{"type":"date"},"labels":{"properties":{"app":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"app_kubernetes_io/instance":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"app_kubernetes_io/managed-by":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"app_kubernetes_io/name":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"app_kubernetes_io/version":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"helm_sh/chart":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"name":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"name":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"namespace":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"ownerReferences":{"properties":{"apiVersion":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"kind":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"name":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"uid":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"uid":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"status":{"properties":{"allowed":{"type":"boolean"},"conditions":{"properties":{"lastHeartbeatTime":{"type":"date"},"lastTransitionTime":{"type":"date"},"lastUpdateTime":{"type":"date"},"message":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"reason":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"status":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"type":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"containerStatuses":{"properties":{"containerID":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"image":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"imageID":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"lastState":{"properties":{"terminated":{"properties":{"containerID":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"exitCode":{"type":"long"},"finishedAt":{"type":"date"},"reason":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"startedAt":{"type":"date"}}}}},"name":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"ready":{"type":"boolean"},"restartCount":{"type":"long"},"started":{"type":"boolean"},"state":{"properties":{"running":{"properties":{"startedAt":{"type":"date"}}},"waiting":{"properties":{"reason":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}}}}}},"hostIP":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"loadBalancer":{"properties":{"ingress":{"properties":{"hostname":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}}}},"podIP":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"spec":{"properties":{"user":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"template":{"properties":{"spec":{"properties":{"containers":{"properties":{"args":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"command":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"env":{"properties":{"name":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"value":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"valueFrom":{"properties":{"fieldRef":{"properties":{"apiVersion":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"fieldPath":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}}}}}},"image":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"imagePullPolicy":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"livenessProbe":{"properties":{"failureThreshold":{"type":"long"},"httpGet":{"properties":{"path":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"port":{"type":"long"},"scheme":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"initialDelaySeconds":{"type":"long"},"periodSeconds":{"type":"long"},"successThreshold":{"type":"long"},"timeoutSeconds":{"type":"long"}}},"name":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"ports":{"properties":{"containerPort":{"type":"long"},"name":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"protocol":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"readinessProbe":{"properties":{"failureThreshold":{"type":"long"},"httpGet":{"properties":{"path":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"port":{"type":"long"},"scheme":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"initialDelaySeconds":{"type":"long"},"periodSeconds":{"type":"long"},"successThreshold":{"type":"long"},"timeoutSeconds":{"type":"long"}}},"resources":{"properties":{"limits":{"properties":{"cpu":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"memory":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"requests":{"properties":{"cpu":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"memory":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}}}},"terminationMessagePath":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"terminationMessagePolicy":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"volumeMounts":{"properties":{"mountPath":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"name":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"readOnly":{"type":"boolean"}}}}},"serviceAccount":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"serviceAccountName":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}}}}}},"webhooks":{"properties":{"name":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"namespaceSelector":{"properties":{"matchExpressions":{"properties":{"key":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"operator":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"values":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}}}},"objectSelector":{"properties":{"matchExpressions":{"properties":{"key":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"operator":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"values":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}}}}}}}},"responseObject":{"dynamic":false,"properties":{"apiVersion":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"kind":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"metadata":{"properties":{"creationTimestamp":{"type":"date"},"labels":{"properties":{"app":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"app_kubernetes_io/instance":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"app_kubernetes_io/managed-by":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"app_kubernetes_io/name":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"app_kubernetes_io/version":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"chart":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"helm_sh/chart":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"name":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"name":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"namespace":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"ownerReferences":{"properties":{"apiVersion":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"kind":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"name":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"uid":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"uid":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"status":{"properties":{"allowed":{"type":"boolean"},"conditions":{"properties":{"lastTransitionTime":{"type":"date"},"lastUpdateTime":{"type":"date"},"message":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"reason":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"status":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"type":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"reason":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"spec":{"properties":{"template":{"properties":{"spec":{"properties":{"containers":{"properties":{"command":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"image":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"imagePullPolicy":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"ports":{"properties":{"containerPort":{"type":"long"},"name":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"protocol":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"volumeMounts":{"properties":{"mountPath":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"name":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"readOnly":{"type":"boolean"}}}}},"serviceAccount":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"serviceAccountName":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}}}},"user":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}},"webhooks":{"properties":{"name":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"namespaceSelector":{"properties":{"matchExpressions":{"properties":{"key":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"operator":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"values":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}}}}}}}},"responseStatus":{"dynamic":false,"properties":{"code":{"type":"long"},"message":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"metadata":{"type":"object"},"reason":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}},"status":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}}}}}}}' | ||
fi | ||
heapSize: 3072m | ||
resources: | ||
# need more cpu upon initialization, therefore burstable class | ||
limits: | ||
cpu: 2000m | ||
memory: 8192Mi | ||
requests: | ||
cpu: 1000m | ||
memory: 4608Mi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
--- | ||
apiVersion: kubeaddons.mesosphere.io/v1beta1 | ||
kind: Addon | ||
metadata: | ||
name: fluentbit | ||
namespace: kubeaddons | ||
labels: | ||
kubeaddons.mesosphere.io/name: fluentbit | ||
annotations: | ||
catalog.kubeaddons.mesosphere.io/addon-revision: "1.3.2-3" | ||
appversion.kubeaddons.mesosphere.io/fluentbit: "1.3.2" | ||
values.chart.helm.kubeaddons.mesosphere.io/fluentbit: "https://raw.githubusercontent.com/helm/charts/f9efc8de7dcd6f93ebacc4b321d01a5aa819cdaa/stable/fluent-bit/values.yaml" | ||
spec: | ||
kubernetes: | ||
minSupportedVersion: v1.15.6 | ||
requires: | ||
# This allows us to have fluentbit wait until ES is deployed and has the right configurations up, in particular | ||
# setting up index templates | ||
- matchLabels: | ||
kubeaddons.mesosphere.io/name: elasticsearch | ||
cloudProvider: | ||
- name: aws | ||
enabled: true | ||
- name: azure | ||
enabled: true | ||
- name: gcp | ||
enabled: true | ||
- name: docker | ||
enabled: false | ||
- name: none | ||
enabled: true | ||
chartReference: | ||
chart: stable/fluent-bit | ||
version: 2.8.4 | ||
values: | | ||
--- | ||
audit: | ||
enable: true | ||
input: | ||
memBufLimit: 35MB | ||
parser: kubernetes-audit | ||
path: /var/log/kubernetes/audit/*.log | ||
bufferChunkSize: 5MB | ||
bufferMaxSize: 20MB | ||
skipLongLines: off | ||
key: kubernetes-audit | ||
backend: | ||
es: | ||
host: elasticsearch-kubeaddons-client | ||
time_key: '@ts' | ||
type: es | ||
filter: | ||
mergeJSONLog: false | ||
input: | ||
tail: | ||
parser: cri | ||
systemd: | ||
enabled: true | ||
filters: | ||
systemdUnit: [] | ||
metrics: | ||
enabled: true | ||
service: | ||
labels: | ||
servicemonitor.kubeaddons.mesosphere.io/path: "api__v1__metrics__prometheus" | ||
tolerations: | ||
- effect: NoSchedule | ||
operator: Exists | ||
extraEntries: | ||
input: |- | ||
Strip_Underscores true | ||
resources: | ||
limits: | ||
memory: 750Mi | ||
requests: | ||
# values extracted from a 1 output/1 input setup here: | ||
# https://github.com/fluent/fluent-bit-kubernetes-logging/blob/master/fluent-bit-daemonset-kafka-rest.yml | ||
# we double it for 1 output (es)/2 input (tail, systemd) as an approximation | ||
cpu: 200m | ||
memory: 200Mi | ||
parsers: | ||
enabled: true | ||
json: | ||
- name: kubernetes-audit | ||
timeKey: requestReceivedTimestamp | ||
timeKeep: On | ||
timeFormat: "%Y-%m-%dT%H:%M:%S.%L" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.