Skip to content

Commit

Permalink
patch
Browse files Browse the repository at this point in the history
  • Loading branch information
jvoravong committed Sep 15, 2023
1 parent e804f3e commit 0062a23
Show file tree
Hide file tree
Showing 15 changed files with 417 additions and 124 deletions.
4 changes: 0 additions & 4 deletions .chloggen/TEMPLATE.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type:

# The name of the component, or a single word describing the area of concern, (e.g. agent, cluster reciever, gateway, network explorer, operator, chart, other)
component:

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note:

# One or more tracking issues related to the change
issues: []

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
Expand Down
16 changes: 0 additions & 16 deletions .chloggen/add-chloggen.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions .chloggen/add-chloggen2.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions .chloggen/add-chloggen3.yaml

This file was deleted.

48 changes: 35 additions & 13 deletions .github/workflows/update_chart_dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Check for new chart dependency updates

on:
schedule:
# Run every Monday at noon.
- cron: "0 12 * * 1"
# Run every 12 hrs on the 11th hour at 30 minutes past.
- cron: '30 11 */12 * *'
workflow_dispatch:

env:
Expand All @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
# Currently this worfklow will update the listed dependencies in the Chart.yaml
# Currently, this workflow will update the listed dependencies in the Chart.yaml
repo: ['cert-manager', 'opentelemetry-operator'] # Add other repos here
steps:
- uses: actions/checkout@v4
Expand All @@ -25,13 +25,14 @@ jobs:
make repo-update
# Fetch the latest version using helm search repo
LATEST_VER=$(helm search repo ${{ matrix.repo }} --versions | awk 'NR==2{print $2}')
echo "LATEST_VER=$LATEST_VER" >> $GITHUB_OUTPUT
LATEST_VERSION=$(helm search repo ${{ matrix.repo }} --versions | awk 'NR==2{print $2}')
echo "LATEST_VERSION=$LATEST_VERSION" >> GITHUB_OUTPUT
# Retrieve the current version from chart.yaml
DEP_PATH=$(yq eval ".dependencies[] | select(.name == \"${{ matrix.repo }}\") | .version" $CHART_YAML)
CURRENT_VERSION=$(yq eval ".dependencies[] | select(.name == \"${{ matrix.repo }}\") | .version" ${{ env.CHART_YAML }})
echo "CURRENT_VERSION=$CURRENT_VERSION" >> GITHUB_OUTPUT
echo "Current version of ${{ matrix.repo }} is $DEP_PATH, latest is $LATEST_VER"
echo "Current version of ${{ matrix.repo }} is $CURRENT_VERSION, latest is $LATEST_VERSION"
if [ "$LATEST_VER" == "$DEP_PATH" ]; then
echo We are already up to date. Nothing else to do.
Expand All @@ -49,15 +50,36 @@ jobs:
echo "Current git diff:"
git --no-pager diff
fi
- name: PR the new version
- name:
id: create_pr
if: ${{ steps.update_chart.outputs.NEED_UPDATE == 1 }}
uses: peter-evans/create-pull-request@v5
with:
commit-message: Update ${{ matrix.repo }} chart version
title: Update ${{ matrix.repo }} chart version to ${{ steps.update_chart.outputs.LATEST_VER }}
body: Use the new version of the ${{ matrix.repo }} chart
branch: "update-${{ matrix.repo }}-${{ steps.update_chart.outputs.LATEST_VER }}"
commit-message: "Bump ${{ matrix.repo }} chart dependency from ${{ steps.update_chart.outputs.CURRENT_VERSION }} to ${{ steps.update_chart.outputs.LATEST_VERSION }}"
title: "Bump ${{ matrix.repo }} chart dependency from ${{ steps.update_chart.outputs.CURRENT_VERSION }} to ${{ steps.update_chart.outputs.LATEST_VERSION }}"
body: "Update to the new version of the ${{ matrix.repo }} chart dependency."
branch: "update-${{ matrix.repo }}"
base: main
delete-branch: true
modify-outputs: false
- name: Create changelog entry
if: ${{ steps.update_chart.outputs.NEED_UPDATE == 1 }}
run: |
# If a previous unreleased changelog entry already exist it is updated.
make chlog-new \
CHANGE_TYPE=enhancement \
COMPONENT=${{ matrix.repo }} \
NOTE="Update ${{ matrix.repo }} chart dependency version from $CURRENT_VERSION to $LATEST_VERSION" \
ISSUES="[${{ steps.create_pr.outputs.pull-request-number }}]" \
FILENAME="update-${{ matrix.repo }}-chart"
- name: Update PR with CHANGELOG
if: ${{ steps.update_chart.outputs.NEED_UPDATE == 1 }}
uses: peter-evans/create-pull-request@v5
with:
commit-message: "Add or update .chloggen/update-${{ matrix.repo }}-chart.yaml"
title: "Bump ${{ matrix.repo }} chart dependency from ${{ steps.update_chart.outputs.CURRENT_VERSION }} to ${{ steps.update_chart.outputs.LATEST_VERSION }}"
body: "Update to the new version of the ${{ matrix.repo }} chart dependency."
branch: "update-${{ matrix.repo }}"
base: main
delete-branch: true
modify-outputs: false
60 changes: 41 additions & 19 deletions .github/workflows/update_instrumentation_dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,46 +20,68 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: swizzle version
id: swizzle_version
id: update_instrumentation
run: |
git config --global user.name 'GitHub Action'
git config --global user.email 'action@github.com'
REPO=ghcr.io/signalfx/splunk-otel-${{ matrix.language }}/splunk-otel-${{ matrix.language }}
LOCAL_VER=$(grep $REPO $VALUES_YAML | awk -F: '{print $2}' | tr -d ' "')
LATEST_VER=$(curl -qs -H "Accept: application/vnd.github+json" $(echo $LATEST_API | sed "s/{lang}/${{ matrix.language }}/g") | jq -r .tag_name)
echo "LATEST_VER=$LATEST_VER" >> $GITHUB_OUTPUT
echo "Current version of ${{ matrix.language }} is $LOCAL_VER, latest is $LATEST_VER"
CURRENT_VERSION=$(grep $REPO $VALUES_YAML | awk -F: '{print $2}' | tr -d ' "')
LATEST_VERSION=$(curl -qs -H "Accept: application/vnd.github+json" $(echo $LATEST_API | sed "s/{lang}/${{ matrix.language }}/g") | jq -r .tag_name)
echo "Current version of ${{ matrix.language }} is $CURRENT_VERSION, latest is $LATEST_VERSION"
if [ "$LATEST_VER" == "$LOCAL_VER" ]; then
if [ "$CURRENT_VERSION" == "$LATEST_VERSION"]; then
echo We are already up to date. Nothing else to do.
else
echo "CURRENT_VERSION=$CURRENT_VERSION" >> $GITHUB_OUTPUT
echo "LATEST_VERSION=$LATEST_VERSION" >> $GITHUB_OUTPUT
echo "NEED_UPDATE=1" >> $GITHUB_OUTPUT
echo 'Verifying that the image is pullable...'
echo '(If this fails, the image version is out of sync with ghcr version)'
docker pull $REPO:$LATEST_VER
docker pull $REPO:$LATEST_VERSION
echo 'Looks like we are good to update...'
echo Updating to new version in values.yaml
echo "NEED_UPDATE=1" >> $GITHUB_OUTPUT
VLINE=$(grep -n "${REPO}" $VALUES_YAML | cut -f1 -d:)
echo "Line number for ${REPO} in ${VALUES_YAML} is: ${VLINE}"
OLD_VER=$(sed -n "${VLINE}p" $VALUES_YAML | grep -oP 'v\K[0-9.]+')
echo "Old version number is: ${OLD_VER}"
NEW_VER=${LATEST_VER#v} # removes 'v' from the start of the string
echo "New version number is: ${NEW_VER}"
echo "sed: ${VLINE}s/${OLD_VER}/${NEW_VER}/"
sed -i "${VLINE}s/${OLD_VER}/${NEW_VER}/" $VALUES_YAML
NEW_VERSION=${LATEST_VERSION#v} # removes 'v' from the start of the string
echo "New version number is: ${NEW_VERSION}"
echo "sed: ${VLINE}s/${OLD_VER}/${NEW_VERSION}/"
sed -i "${VLINE}s/${OLD_VER}/${NEW_VERSION}/" $VALUES_YAML
echo Render chart template
echo Updating rendered examples
make render
echo "Current git diff:"
git --no-pager diff
fi
- name: PR the new version
if: ${{ steps.swizzle_version.outputs.NEED_UPDATE == 1 }}
- name:
id: create_pr
if: ${{ steps.update_instrumentation.outputs.NEED_UPDATE == 1 }}
uses: peter-evans/create-pull-request@v5
with:
commit-message: Update ${{ matrix.language }} instrumentation version
title: Update ${{ matrix.language }} instrumentation version to ${{ steps.swizzle_version.outputs.LATEST_VER }}
body: Use the new version of the ${{ matrix.language }} instrumentation
branch: "update-${{ matrix.language }}-${{ steps.swizzle_version.outputs.LATEST_VER }}"
commit-message: "Bump ${{ matrix.language }} instrumentation dependency from ${{ steps.update_instrumentation.outputs.CURRENT_VERSION }} to ${{ steps.update_instrumentation.outputs.LATEST_VERSION }}"
title: "Bump ${{ matrix.language }} instrumentation dependency from ${{ steps.update_instrumentation.outputs.CURRENT_VERSION }} to ${{ steps.update_instrumentation.outputs.LATEST_VERSION }}"
body: "Update to the new version of the ${{ matrix.language }} instrumentation dependency."
branch: "update-${{ matrix.language }}"
base: main
delete-branch: true
modify-outputs: false
- name: Create changelog entry
if: ${{ steps.update_instrumentation.outputs.NEED_UPDATE == 1 }}
run: |
git fetch origin "update-${{ matrix.language }}"
git checkout "update-${{ matrix.language }}"
make chlog-new \
CHANGE_TYPE=enhancement \
COMPONENT=operator \
NOTE="Update ${{ matrix.language }} instrumentation version from ${{ steps.update_instrumentation.outputs.CURRENT_VERSION == 1 }} to ${{ steps.update_instrumentation.outputs.LATEST_VERSION == 1 }}" \
ISSUES="[${{ steps.create_pr.outputs.pull-request-number }}]" \
FILENAME="update-${{ matrix.language }}-instrumentation"
git add .
git commit -m "Add changelog for updating ${{ matrix.language }} instrumentation"
git push origin "update-${{ matrix.language }}"
22 changes: 16 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
<!-- For unreleased changes, see entries in .chloggen -->
<!-- next version -->

## [0.86.0]

This Splunk OpenTelemetry Collector for Kubernetes release adopts the [Splunk OpenTelemetry Collector v0.84.0](https://github.com/signalfx/splunk-otel-collector/releases/tag/v0.84.0).

### πŸ’‘ Enhancements πŸ’‘

- `chart`: Add support for OpenTelemetry CHANGELOG.md generator tool, see [chloggen](https://github.com/open-telemetry/opentelemetry-operator/tree/main/.chloggen) ([#923](https://github.com/signalfx/splunk-otel-collector-chart/pull/923))
- `chart`: Add support for OpenTelemetry CHANGELOG.md generator tool, see [chloggen](https://github.com/open-telemetry/opentelemetry-operator/tree/main/.chloggen) ([#923](https://github.com/signalfx/splunk-otel-collector-chart/pull/923),[#924](https://github.com/signalfx/splunk-otel-collector-chart/pull/#924))
- `chart`: Add support for OpenTelemetry CHANGELOG.md generator tool, see [chloggen](https://github.com/open-telemetry/opentelemetry-operator/tree/main/.chloggen) ([#923](https://github.com/signalfx/splunk-otel-collector-chart/pull/923),[#924](https://github.com/signalfx/splunk-otel-collector-chart/pull/#924),[#925](https://github.com/signalfx/splunk-otel-collector-chart/pull/#925))

## [0.84.0] - 2023-09-11

### πŸ’‘ Enhancements πŸ’‘
Expand Down Expand Up @@ -281,7 +291,7 @@ This Splunk OpenTelemetry Collector for Kubernetes release adopts the [Splunk Op

### πŸš€ New components πŸš€

- A way to provide a custom image for init container patching host log directories (#534, #535)
- A way to provide a custom image for init container patching host log directories ([#534](https://github.com/signalfx/splunk-otel-collector-chart/pull/534),[#535](https://github.com/signalfx/splunk-otel-collector-chart/pull/#535))

### πŸ’‘ Enhancements πŸ’‘

Expand Down Expand Up @@ -421,7 +431,7 @@ This Splunk OpenTelemetry Collector for Kubernetes release adopts the [Splunk Op

### πŸ’‘ Enhancements πŸ’‘

- Migrate filelog operators to follow opentelemetry-log-collection v0.29.0 changes (#436, #441)
- Migrate filelog operators to follow opentelemetry-log-collection v0.29.0 changes ([#436](https://github.com/signalfx/splunk-otel-collector-chart/pull/436),[#441](https://github.com/signalfx/splunk-otel-collector-chart/pull/#441))
- [BREAKING CHANGE] Several breaking changes were made that affect the
filelog, syslog, tcplog, and journald receivers. Any use of the
extraFileLogs config, logsCollection.containers.extraOperators config,
Expand Down Expand Up @@ -481,7 +491,7 @@ This Splunk OpenTelemetry Collector for Kubernetes release adopts the [Splunk Op

### 🧰 Bug fixes 🧰

- Bug where Prometheus errors out using default configuration on EKS and GKE (#401, #405)
- Bug where Prometheus errors out using default configuration on EKS and GKE ([#401](https://github.com/signalfx/splunk-otel-collector-chart/pull/401),[#405](https://github.com/signalfx/splunk-otel-collector-chart/pull/#405))

## [0.44.1] - 2022-03-08

Expand Down Expand Up @@ -678,7 +688,7 @@ guidelines](https://github.com/signalfx/splunk-otel-collector-chart/blob/main/UP
collection gets `container.id` attribute that allows container level
correlation in Splunk Observability Cloud closing a feature parity gap with
fluentd ([#238](https://github.com/signalfx/splunk-otel-collector-chart/pull/238))
- Add strict values.yaml schema validation (#227, #234, #239)
- Add strict values.yaml schema validation ([#227](https://github.com/signalfx/splunk-otel-collector-chart/pull/227),[#234](https://github.com/signalfx/splunk-otel-collector-chart/pull/#234),[#239](https://github.com/signalfx/splunk-otel-collector-chart/pull/#239))

### πŸ’‘ Enhancements πŸ’‘

Expand All @@ -690,8 +700,8 @@ guidelines](https://github.com/signalfx/splunk-otel-collector-chart/blob/main/UP
- Change `run_id` log resource attribute to `k8s.container.restart_count` ([#226](https://github.com/signalfx/splunk-otel-collector-chart/pull/226))
- Use only `splunkPlatform.endpoint` and `splunkObservability.realm` parameters
to identify which destination is enabled, remove default value for
`splunkObservability.realm` (#230, #233)
- Upgrade splunk-otel-collector image to 0.37.1 (#237, #249)
`splunkObservability.realm` ([#230](https://github.com/signalfx/splunk-otel-collector-chart/pull/230),[#233](https://github.com/signalfx/splunk-otel-collector-chart/pull/#233))
- Upgrade splunk-otel-collector image to 0.37.1 ([#237](https://github.com/signalfx/splunk-otel-collector-chart/pull/237),[#249](https://github.com/signalfx/splunk-otel-collector-chart/pull/#249))
- Simplify configuration for switching to native OTel logs collection ([#246](https://github.com/signalfx/splunk-otel-collector-chart/pull/246))

### 🧰 Bug fixes 🧰
Expand Down
Loading

0 comments on commit 0062a23

Please sign in to comment.