Skip to content

Commit

Permalink
🏷️ Upgrade version of OTelcol Operator and Install Krew
Browse files Browse the repository at this point in the history
  • Loading branch information
nzuguem committed Dec 27, 2024
1 parent b5e60f7 commit 0d46e71
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 7 deletions.
4 changes: 3 additions & 1 deletion .github/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
"ghcr.io/devcontainers-contrib/features/vault-asdf:2": {},
"ghcr.io/devcontainers/features/go:1": {},
"./features/grpcurl": {},
"./features/krew": {},
"ghcr.io/devcontainers-contrib/features/temporal-cli:1": {},
"ghcr.io/guiyomh/features/vim": {}
"ghcr.io/guiyomh/features/vim": {},
"ghcr.io/dhoeric/features/stern:1": {}
}
}
16 changes: 16 additions & 0 deletions .github/.devcontainer/features/krew/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "krew",
"name": "krew",
"description": "Install krew - the plugin manager for kubectl command-line tool..",
"documentationURL": "https://krew.sigs.k8s.io/",
"options": {
"version": {
"type": "string",
"proposals": [
"latest"
],
"default": "latest",
"description": "Select or enter a version."
}
}
}
18 changes: 18 additions & 0 deletions .github/.devcontainer/features/krew/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

set -eux

KREW_VERSION="${VERSION:-"latest"}"

set -x; cd "$(mktemp -d)"
OS="$(uname | tr '[:upper:]' '[:lower:]')"
ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')"
KREW="krew-${OS}_${ARCH}"
curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/$KREW_VERSION/download/${KREW}.tar.gz"
tar zxvf "${KREW}.tar.gz"
./"${KREW}" install krew

cat <<EOF >> $HOME/.bashrc
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
EOF
source $HOME/.bashrc
8 changes: 5 additions & 3 deletions observability/otel/otelcol.daemonset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ spec:
hostPath:
path: /var/log/pods
- name: varlibdockercontainers
hostPath:
path: /var/lib/docker/containers
hostPath:
path: /var/lib/docker/containers
volumeMounts:
- name: varlogpods
mountPath: /var/log/pods
Expand All @@ -32,7 +32,9 @@ spec:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
processors:
memory_limiter:
check_interval: 1s
Expand All @@ -51,4 +53,4 @@ spec:
logs:
receivers: [filelog]
processors: []
exporters: [debug]
exporters: [debug]
4 changes: 3 additions & 1 deletion observability/otel/otelcol.deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ spec:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
processors:
memory_limiter:
check_interval: 1s
Expand All @@ -30,4 +32,4 @@ spec:
traces:
receivers: [otlp]
processors: [batch]
exporters: [debug]
exporters: [debug]
5 changes: 4 additions & 1 deletion observability/otel/otelcol.sidecar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ spec:
jaeger:
protocols:
thrift_compact:
endpoint: 0.0.0.0:6831
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
processors:
memory_limiter:
check_interval: 1s
Expand All @@ -33,4 +36,4 @@ spec:
traces:
receivers: [otlp, jaeger]
processors: [batch]
exporters: [debug]
exporters: [debug]
2 changes: 1 addition & 1 deletion observability/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tasks:
cmds:
- helm repo add otel https://open-telemetry.github.io/opentelemetry-helm-charts
- helm repo update otel
- helm upgrade --install --version 0.60.0
- helm upgrade --install --version 0.75.1
--create-namespace
--namespace otel-system otel otel/opentelemetry-operator
--set admissionWebhooks.certManager.enabled=false
Expand Down

0 comments on commit 0d46e71

Please sign in to comment.