Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/main' into logstash-fix-1500
Browse files Browse the repository at this point in the history
  • Loading branch information
jmlrt committed Mar 2, 2022
2 parents 17cac19 + 076176b commit 7d7845d
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 25 deletions.
10 changes: 5 additions & 5 deletions helpers/helm-tester/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ FROM python:3.7
ENV HELM_VERSION=3.8.0

RUN wget --no-verbose https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz && \
tar xfv helm-v${HELM_VERSION}-linux-amd64.tar.gz && \
mv linux-amd64/helm /usr/local/bin/ && \
mkdir --parents --mode=777 /.config/helm && \
HOME=/ helm repo add stable https://charts.helm.sh/stable && \
rm -rf helm-v${HELM_VERSION}-linux-amd64.tar.gz linux-amd64
tar xfv helm-v${HELM_VERSION}-linux-amd64.tar.gz && \
mv linux-amd64/helm /usr/local/bin/ && \
mkdir --parents --mode=777 /.config/helm && \
HOME=/ helm repo add prometheus-community https://prometheus-community.github.io/helm-charts && \
rm -rf helm-v${HELM_VERSION}-linux-amd64.tar.gz linux-amd64

COPY requirements.txt /usr/src/app/
RUN pip install --no-cache-dir -r /usr/src/app/requirements.txt
Expand Down
3 changes: 3 additions & 0 deletions logstash/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ spec:
{{- with .Values.service.loadBalancerSourceRanges }}
loadBalancerSourceRanges:
{{ toYaml . | indent 4 }}
{{- end }}
{{- if .Values.service.externalTrafficPolicy }}
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }}
{{- end }}
selector:
app: "{{ template "logstash.fullname" . }}"
Expand Down
11 changes: 11 additions & 0 deletions logstash/tests/logstash_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,17 @@ def test_adding_a_service():
assert "loadBalancerIP" not in s["spec"]


def test_adding_an_externalTrafficPolicy():
config = """
service:
externalTrafficPolicy: Local
"""

r = helm_template(config)

assert r["service"][name]["spec"]["externalTrafficPolicy"] == "Local"


def test_setting_fullnameOverride():
config = """
fullnameOverride: 'logstash-custom'
Expand Down
18 changes: 12 additions & 6 deletions logstash/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,21 +128,25 @@ persistence:
enabled: false
annotations: {}

extraVolumes: []
extraVolumes:
[]
# - name: extras
# emptyDir: {}

extraVolumeMounts: []
extraVolumeMounts:
[]
# - name: extras
# mountPath: /usr/share/extras
# readOnly: true

extraContainers: []
extraContainers:
[]
# - name: do-something
# image: busybox
# command: ['do', 'something']

extraInitContainers: []
extraInitContainers:
[]
# - name: do-something
# image: busybox
# command: ['do', 'something']
Expand Down Expand Up @@ -256,7 +260,8 @@ lifecycle:
# exec:
# command: ["/bin/sh", "-c", "echo Hello from the postStart handler > /usr/share/message"]

service: {}
service:
{}
# annotations: {}
# type: ClusterIP
# loadBalancerIP: ""
Expand All @@ -272,7 +277,8 @@ service: {}

ingress:
enabled: false
annotations: {}
annotations:
{}
# kubernetes.io/tls-acme: "true"
className: "nginx"
pathtype: ImplementationSpecific
Expand Down
6 changes: 3 additions & 3 deletions metricbeat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ See [supported configurations][] for more details.
`helm repo add elastic https://helm.elastic.co`

* Install it:
- Add the Elastic Helm charts repo (required for kube-state-metrics chart dependency): `helm repo add stable https://charts.helm.sh/stable`
- Add the Prometheus community Helm charts repo (required for kube-state-metrics chart dependency): `helm repo add prometheus-community https://prometheus-community.github.io/helm-charts`
- with Helm 3: `helm install metricbeat elastic/metricbeat`
- with Helm 2 (deprecated): `helm install --name metricbeat elastic/metricbeat`

Expand Down Expand Up @@ -133,7 +133,7 @@ as a reference. They are also used in the automated testing of this chart.
| `imagePullSecrets` | Configuration for [imagePullSecrets][] so that you can use a private registry for your image | `[]` |
| `imageTag` | The Metricbeat Docker image tag | `8.0.0-SNAPSHOT` |
| `image` | The Metricbeat Docker image | `docker.elastic.co/beats/metricbeat` |
| `kube_state_metrics.enabled` | Install [kube-state-metrics](https://github.com/helm/charts/tree/main/stable/kube-state-metrics) as a dependency | `true` |
| `kube_state_metrics.enabled` | Install [kube-state-metrics][] chart as a dependency | `true` |
| `kube_state_metrics.host` | Define kube-state-metrics endpoint for an existing deployment. Works only if `kube_state_metrics.enabled: false` | `""` |
| `livenessProbe` | Parameters to pass to liveness [probe][] checks for values such as timeouts and thresholds | see [values.yaml][] |
| `managedServiceAccount` | Whether the `serviceAccount` should be managed by this helm chart. Set this to `false` in order to manage your own service account and related roles | `true` |
Expand Down Expand Up @@ -244,7 +244,7 @@ about our development and testing process.
[hostNetwork]: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#host-namespaces
[imagePullPolicy]: https://kubernetes.io/docs/concepts/containers/images/#updating-images
[imagePullSecrets]: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret
[kube-state-metrics]: https://github.com/helm/charts/tree/main/stable/kube-state-metrics
[kube-state-metrics]: https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-state-metrics
[kubernetes secrets]: https://kubernetes.io/docs/concepts/configuration/secret/
[labels]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
[metricbeat docker image]: https://www.elastic.co/guide/en/beats/metricbeat/current/running-on-docker.html
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/examples/default/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RELEASE = helm-metricbeat-default
GOSS_SELECTOR = release=$(RELEASE),app=helm-metricbeat-default-metricbeat

install:
helm repo add stable https://charts.helm.sh/stable
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm dependency update ../../
helm upgrade --wait --timeout=$(TIMEOUT) --install $(RELEASE) ../../

Expand Down
2 changes: 1 addition & 1 deletion metricbeat/examples/oss/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RELEASE := helm-metricbeat-oss
GOSS_SELECTOR = release=$(RELEASE),app=helm-metricbeat-oss-metricbeat

install:
helm repo add stable https://charts.helm.sh/stable
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm dependency update ../../
helm upgrade --wait --timeout=$(TIMEOUT) --install --values values.yaml $(RELEASE) ../../

Expand Down
2 changes: 1 addition & 1 deletion metricbeat/examples/security/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RELEASE := helm-metricbeat-security
GOSS_SELECTOR = release=$(RELEASE),app=helm-metricbeat-security-metricbeat

install:
helm repo add stable https://charts.helm.sh/stable
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm dependency update ../../
helm upgrade --wait --timeout=$(TIMEOUT) --install --values values.yaml $(RELEASE) ../../

Expand Down
2 changes: 1 addition & 1 deletion metricbeat/examples/upgrade/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM := 7.10.0 # upgrade from version < 7.10.0 is failing due to selector
# breaking change in https://github.com/elastic/helm-charts/pull/516

install:
helm repo add stable https://charts.helm.sh/stable
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm dependency update ../../
../../../helpers/upgrade.sh --chart $(CHART) --release $(RELEASE) --from $(FROM)
kubectl rollout status daemonset $(RELEASE)-metricbeat
Expand Down
8 changes: 4 additions & 4 deletions metricbeat/requirements.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: kube-state-metrics
repository: https://charts.helm.sh/stable
version: 2.4.1
digest: sha256:948dca129bc7c16b138ed8bcbdf666c324d812e43af59d475b8bb74a53e99778
generated: "2020-10-30T18:58:57.381827+01:00"
repository: https://prometheus-community.github.io/helm-charts
version: 4.7.0
digest: sha256:60ae66494279193461b5b392e040520aa2d9b048eca98a4d9208a38d0e252b3d
generated: "2022-03-01T10:35:09.802732087Z"
6 changes: 3 additions & 3 deletions metricbeat/requirements.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dependencies:
- name: 'kube-state-metrics'
version: '2.4.1'
repository: '@stable'
- name: "kube-state-metrics"
version: "4.7.0"
repository: "https://prometheus-community.github.io/helm-charts"
condition: kube_state_metrics.enabled

0 comments on commit 7d7845d

Please sign in to comment.