Skip to content

Commit

Permalink
fix: documentation enhancement, annotations for traps, secrets refined (
Browse files Browse the repository at this point in the history
#620)

* fix: annotations (#575)

* fix: add helm repo update (#553)

* chore(release): 1.7.4-beta.1

## [1.7.4-beta.1](v1.7.3...v1.7.4-beta.1) (2022-09-02)

### Bug Fixes

* add helm repo update ([#553](#553)) ([72d10c1](72d10c1))

* chore: update Chart.lock and delete repo update from CI (#555)

* feat: allow configuring many hosts at once (#537)

* fix: inventory container creating

* fix: update default values

* fix: add unit tests

* fix: delete print statement

* test: fix unit tests

* refactor: apply pre-commit

* test: add integration tests

* feat: add helm part of groups processing

* feat: update yaml structure of groups

* test: update integration tests

* fix: delete mongo locks that are unnecessary (#542)

* fix: delete mongo locks that are unnecessary

* test: update unit tests

* fix: poetry lock only opentelemetry

* chore(release): 1.7.2-beta.1

## [1.7.2-beta.1](v1.7.1...v1.7.2-beta.1) (2022-08-31)

### Bug Fixes

* delete mongo locks that are unnecessary ([#542](#542)) ([f2dfbeb](f2dfbeb))

* chore: bring back the previous version of poetry (#544)

* feat: fixed crashing test_prepare_trap

* feat: ignore single host if it has already been configured in group

* feat: pre-commit

* feat: first check only groups and then single hosts when loading data from inventory

* feat: deleted debugging logs

* feat: unittest for ignoring single host in the inventory previously configured in the group

* feat: add integration test

* feat: uncomment last line in local_run.sh


Co-authored-by: semantic-release-bot <[email protected]>
Co-authored-by: Wojciech Zyla <[email protected]>

* chore(release): 1.8.0-beta.1

# [1.8.0-beta.1](v1.7.4-beta.1...v1.8.0-beta.1) (2022-09-05)

### Features

* allow configuring many hosts at once ([#537](#537)) ([dd482e6](dd482e6)), closes [#542](#542) [#542](#542) [#544](#544)

* doc: configuring groups of hosts (#539)

* doc: Added documentation for configuring groups of hosts

* doc: fixed typo

* doc: change of the structure of the documentation

* doc: added pipe sign in the configuration example

* doc: Added information about fields which can be configured in the host configuration

* doc: Added information about simultaneous presence of a host and group including that host in the inventory

* refactor: docs and add step by step polling guide

* doc: add example Splunk metrics

* refactor: default value for port, multiple proiles configuration

* refactor: delete unnecessary print statements

Co-authored-by: omrozowicz-splunk <[email protected]>

* fix: run mandatory profiles while smart profiles are disabled (#557)

* fix: Run mandatory profiles while smart profiles are disabled

* test: add unit test for assign profiles 

* chore: apply pre-commit 

* fix: remove kwargs from walk definition in check restart

* doc: add more info about v3 polling

* test: remove deleted kwargs

* fix: add group to the InventoryObj

Co-authored-by: omrozowicz-splunk <[email protected]>

* chore(release): 1.8.0-beta.2

# [1.8.0-beta.2](v1.8.0-beta.1...v1.8.0-beta.2) (2022-09-08)

### Bug Fixes

* run mandatory profiles while smart profiles are disabled ([#557](#557)) ([4b735d8](4b735d8))

* fix: update all inventory records (#558)

* fix: update all inventory records

* fix: add appending group in process line function

* fix: update mibserver's version

* chore(release): 1.8.0-beta.3

# [1.8.0-beta.3](v1.8.0-beta.2...v1.8.0-beta.3) (2022-09-08)

### Bug Fixes

* update all inventory records ([#558](#558)) ([b53a167](b53a167))

* fix: traps service annotations

* fix: traps service annotations

* fix: too much }

* fix: too much }

* fix: add indent

* fix: add indent

* fix: add indent

* fix: security context, add annotations to sim

* fix: add commonAnnotations

* fix: add commonAnnotations

* doc: document annotations

* fix: move sim securityContext

* doc: fix formatting

* fix: bring back profiles frequency

Co-authored-by: semantic-release-bot <[email protected]>
Co-authored-by: Wojciech Zyla <[email protected]>
Co-authored-by: wojtekzyla <[email protected]>

* chore(release): 1.8.2-beta.1

## [1.8.2-beta.1](v1.8.1...v1.8.2-beta.1) (2022-09-21)

### Bug Fixes

* annotations ([#575](#575)) ([b4709d5](b4709d5)), closes [#553](#553) [#553](#553) [#555](#555) [#537](#537) [#542](#542) [#542](#542) [#544](#544) [#542](#542) [#542](#542) [#544](#544) [#539](#539) [#557](#557) [#557](#557) [#558](#558) [#558](#558)

* doc: missing dns and metallb (#605)

* fix: add another way of mounting sim secrets (#602)

* fix: add another way of mounting sim secrets

* doc: add documentation about sim's secrets

* doc: clarify editing the secrets from sim

* fix: add sim.enabled to the sim-secret

* fix: increase timeout for integration tests

* chore(release): 1.8.2-beta.2

## [1.8.2-beta.2](v1.8.2-beta.1...v1.8.2-beta.2) (2022-09-28)

### Bug Fixes

* add another way of mounting sim secrets ([#602](#602)) ([7f822bd](7f822bd))

* Add license for doc (#607)

* docs: Add license information for documenation

* docs: Add license information for documenation

* doc: update hostpath for offline installation, and README.md (#610)

* chore: update releasing process (#611)

* chore: update releasing process

* chore: add otel image to the offline installation

* chore: update otel image link

* chore: update docs

* chore: delete semantic release from pr release

* fix: test release versioning (#612)

* chore(release): 1.8.2-beta.3

## [1.8.2-beta.3](v1.8.2-beta.2...v1.8.2-beta.3) (2022-09-29)

### Bug Fixes

* test release versioning ([#612](#612)) ([0a43806](0a43806))

* fix: otel image link from dockerhub (#614)

* fix: otel image link from dockerhub

* fix: update release tags

* chore(release): 1.8.2-beta.4

## [1.8.2-beta.4](v1.8.2-beta.3...v1.8.2-beta.4) (2022-09-30)

### Bug Fixes

* otel image link from dockerhub ([#614](#614)) ([7921e80](7921e80))

* fix: update quay.io link (#615)

* chore(release): 1.8.2-beta.5

## [1.8.2-beta.5](v1.8.2-beta.4...v1.8.2-beta.5) (2022-09-30)

### Bug Fixes

* update quay.io link ([#615](#615)) ([d4caf93](d4caf93))

* fix: update mibserver (#616)

* chore(release): 1.8.2-beta.6

## [1.8.2-beta.6](v1.8.2-beta.5...v1.8.2-beta.6) (2022-09-30)

### Bug Fixes

* update mibserver ([#616](#616)) ([ce1fbec](ce1fbec))

* doc: update offline-installation (#617)

* doc:  fixes (#618)

* doc: update small-environment.md (#600)

* doc: update offline-sc4snmp.md (#599)

* doc: update sck-installation.md (#598)

* doc: update offline-microk8s.md (#597)

* doc: update bestpractices.md (#596)

* fix: update upgrade.md (#595)

* doc: update planning.md (#593)

* fix: update snmpv3-configuration.md (#591)

* doc: update redis-configuration.md (#590)

* doc: update mongo-configuration.md (#589)

* doc: update worker-configuration.md (#588)

* doc: update trap-configuration.md (#587)

* doc: update step-by-step-poll.md (#586)

* doc: update configuring-groups.md (#585)

* doc: update configuring-profiles.md (#584)

* doc: update poller-configuration.md (#582)

* doc: update ha.md (#581)

* doc: update sc4snmp-installation.md (#580)

* doc: update k8s-microk8s.md (#578)

* doc: update splunk-requirements.md (#577)

* doc: update index.md (#576)

* doc: update sck-installation.md (#592)

Co-authored-by: Olga Malita <[email protected]>

* doc: update sck-installation.md (#579)

Co-authored-by: Olga Malita <[email protected]>

* doc: rephrase offline-installation of mcirok8s

Co-authored-by: mmsplunker <[email protected]>

* fix: otel image tag gathered from appVersion (#621)

* chore(release): 1.8.2-beta.7

## [1.8.2-beta.7](v1.8.2-beta.6...v1.8.2-beta.7) (2022-10-04)

### Bug Fixes

* otel image tag gathered from appVersion ([#621](#621)) ([90c6ac9](90c6ac9))

Co-authored-by: semantic-release-bot <[email protected]>
Co-authored-by: Wojciech Zyla <[email protected]>
Co-authored-by: wojtekzyla <[email protected]>
Co-authored-by: Adam Ryznar <[email protected]>
Co-authored-by: mmsplunker <[email protected]>
  • Loading branch information
6 people authored Oct 4, 2022
1 parent de6b45a commit b7c4ece
Show file tree
Hide file tree
Showing 41 changed files with 590 additions and 328 deletions.
62 changes: 1 addition & 61 deletions .github/workflows/ci-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_INT_TESTS }}
working-directory: ./integration_tests/scripts
- name: Run integration tests
run: sleep 30 && timeout 50m ansible-playbook -v playbook.yml || true
run: sleep 30 && timeout 55m ansible-playbook -v playbook.yml || true
working-directory: ./integration_tests/scripts
- name: Download and analyze logs
run: |
Expand All @@ -178,64 +178,4 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_INT_TESTS }}
working-directory: ./integration_tests/scripts

release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: false
persist-credentials: false

#Build docker images
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Packages Docker Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v3
with:
images: ghcr.io/splunk/splunk-connect-for-snmp/container
tags: |
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}
type=semver,pattern=v{{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=semver,pattern={{version}}
type=ref,event=branch
type=ref,event=pr
type=sha
type=sha,format=long
- name: Build and push action
id: docker_action_build
uses: docker/build-push-action@v2
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
cache-to: type=inline
- uses: actions/setup-node@v2
with:
node-version: "14"
- name: Semantic Release
id: version
uses: cycjimmy/[email protected]
with:
semantic_version: 17
extra_plugins: |
@semantic-release/exec
@semantic-release/git
@google/semantic-release-replace-plugin
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_ADMIN }}

73 changes: 73 additions & 0 deletions .github/workflows/ci-release-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# ########################################################################
# Copyright 2021 Splunk Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ########################################################################

name: ci-release-pr
on:
pull_request:
branches:
- "main"
- "develop"
- "next"
tags-ignore:
- "v*"
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: false
persist-credentials: false

#Build docker images
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Packages Docker Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v3
with:
images: ghcr.io/splunk/splunk-connect-for-snmp/container
tags: |
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}
type=semver,pattern=v{{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=semver,pattern={{version}}
type=ref,event=branch
- name: Build and push action
id: docker_action_build
uses: docker/build-push-action@v2
with:
context: .
push: false
platforms: linux/amd64,linux/arm64
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
cache-to: type=inline
- uses: actions/setup-node@v2
with:
node-version: "14"

86 changes: 86 additions & 0 deletions .github/workflows/ci-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# ########################################################################
# Copyright 2021 Splunk Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ########################################################################

name: ci-release
on:
push:
branches:
- "main"
- "develop"
- "next"
tags-ignore:
- "v*"

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: false
persist-credentials: false

#Build docker images
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Packages Docker Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v3
with:
images: ghcr.io/splunk/splunk-connect-for-snmp/container
tags: |
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}
type=semver,pattern=v{{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=semver,pattern={{version}}
type=ref,event=branch
type=ref,event=pr
- name: Build and push action
id: docker_action_build
uses: docker/build-push-action@v2
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
cache-to: type=inline
- uses: actions/setup-node@v2
with:
node-version: "14"
- name: Semantic Release
id: version
uses: cycjimmy/[email protected]
with:
semantic_version: 17
extra_plugins: |
@semantic-release/exec
@semantic-release/git
@google/semantic-release-replace-plugin
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_ADMIN }}

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ Splunk Connect for SNMP Gets SNMP data in to Splunk Enterprise and Splunk Cloud
# Documentation

For deployment and user documentation [see](https://splunk.github.io/splunk-connect-for-snmp/)
There are plenty of versions you can browse:
1. `main` refers to the latest version
2. `develop` refers to the latest `beta` version
3. tagged versions, for ex. `1.7.1` refers to the specific release

# Contact
Feel free to contact us via [#splunk-connect-for-snmp](https://splunk-usergroups.slack.com/archives/C01K4V86WV7) slack channel.
Expand Down
6 changes: 3 additions & 3 deletions charts/splunk-connect-for-snmp/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ dependencies:
version: 16.8.10
- name: mibserver
repository: https://pysnmp.github.io/mibs/charts/
version: 1.14.8
digest: sha256:5a3ee28eee8cfe1a1dfc271151cefb16e7229600d5dcd5ebe12e52b1982fa5f5
generated: "2022-09-19T10:31:22.032368+02:00"
version: 1.14.9
digest: sha256:0547c9ace910e4d9a6632f714a37763d378372336b0106ec003028d023ce6b31
generated: "2022-09-30T13:31:07.322275+02:00"
4 changes: 2 additions & 2 deletions charts/splunk-connect-for-snmp/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ type: application
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)

version: 1.8.1
version: 1.8.2-beta.7
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.8.1"
appVersion: "1.8.2-beta.7"
#
dependencies:
- name: mongodb
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.sim.enabled }}
{{- if and .Values.sim.secret.create .Values.sim.enabled }}
apiVersion: v1
kind: Secret
metadata:
Expand Down
12 changes: 12 additions & 0 deletions charts/splunk-connect-for-snmp/templates/sim/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,15 @@ Create the name of the service account to use
{{- default "default" .Values.sim.serviceAccount.name }}
{{- end }}
{{- end }}

{{/*
Define name for the Splunk Secret
*/}}
{{- define "splunk-connect-for-snmp.sim.secret" -}}
{{- if .Values.sim.secret.name -}}
{{- printf "%s" .Values.sim.secret.name -}}
{{- else -}}
{{ include "splunk-connect-for-snmp.name" . }}-sim
{{- end -}}
{{- end -}}

9 changes: 4 additions & 5 deletions charts/splunk-connect-for-snmp/templates/sim/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ spec:
{{- include "splunk-connect-for-snmp.sim.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.sim.podAnnotations }}
annotations:
{{- with .Values.sim.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
checksum/config: {{ include (print $.Template.BasePath "/common/sim-secret.yaml") . | sha256sum }}
labels:
{{- include "splunk-connect-for-snmp.sim.selectorLabels" . | nindent 8 }}
spec:
Expand All @@ -35,18 +36,16 @@ spec:
image: {{ .Values.sim.image | default "quay.io/signalfx/splunk-otel-collector" }}:{{ .Values.sim.tag | default "0.41.0" }}
imagePullPolicy: {{ .Values.sim.pullPolicy | default "IfNotPresent" }}
args: ["--config=/config/otel-collector-config.yaml"]
securityContext:
allowPrivilegeEscalation: false
env:
- name: signalfxToken
valueFrom:
secretKeyRef:
name: {{ include "splunk-connect-for-snmp.name" . }}-sim
name: {{ include "splunk-connect-for-snmp.sim.secret" . }}
key: signalfxToken
- name: signalfxRealm
valueFrom:
secretKeyRef:
name: {{ include "splunk-connect-for-snmp.name" . }}-sim
name: {{ include "splunk-connect-for-snmp.sim.secret" . }}
key: signalfxRealm
ports:
- containerPort: 8882
Expand Down
6 changes: 6 additions & 0 deletions charts/splunk-connect-for-snmp/templates/sim/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ metadata:
{{- include "splunk-connect-for-snmp.sim.labels" . | nindent 4 }}
annotations:
metallb.universe.tf/allow-shared-ip: "true"
{{- if .Values.sim.service.annotations }}
{{ toYaml .Values.sim.service.annotations | indent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{ toYaml .Values.commonAnnotations| indent 4 }}
{{- end }}
spec:
type: ClusterIP
ports:
Expand Down
6 changes: 6 additions & 0 deletions charts/splunk-connect-for-snmp/templates/traps/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ metadata:
{{- if .Values.traps.service.usemetallb }}
metallb.universe.tf/allow-shared-ip: {{ .Values.traps.service.metallbsharingkey | default "splunk-connect" | quote }}
{{- end }}
{{- if .Values.traps.service.annotations }}
{{ toYaml .Values.traps.service.annotations | indent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{ toYaml .Values.commonAnnotations| indent 4 }}
{{- end }}

spec:
type: {{ .Values.traps.service.type }}
Expand Down
16 changes: 15 additions & 1 deletion charts/splunk-connect-for-snmp/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ sim:
ingress:
enabled: false
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
Expand Down Expand Up @@ -231,6 +232,17 @@ sim:
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""

service:
annotations: {}

secret:
# Option for creating a new secret or using an existing one.
# When secret.create=true, a new kubernetes secret will be created by the helm chart that will contain the
# values from sim.signalfxToken and sim.signalfxRealm.
# When secret.create=false, the user must set secret.name to a name of a k8s secret the user created.
create: true
name: ""
traps:
replicaCount: 2
usernameSecrets: []
Expand Down Expand Up @@ -265,6 +277,7 @@ traps:
runAsGroup: 10001

service:
annotations: {}
usemetallb: true
metallbsharingkey: "splunk-connect"
type: LoadBalancer
Expand Down Expand Up @@ -372,4 +385,5 @@ mongodb:
redis:
architecture: standalone
auth:
enabled: false
enabled: false
commonAnnotations: {}
Loading

0 comments on commit b7c4ece

Please sign in to comment.