-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add work around step to the functional test setup function to use a n…
…ew client to load newly deployed CRDs Add work around step to the functional test setup function to use a new client to load newly deployed CRDs
- Loading branch information
Showing
8 changed files
with
227 additions
and
17 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,12 @@ | ||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' | ||
change_type: bug_fix | ||
# The name of the component, or a single word describing the area of concern, (e.g. agent, clusterReceiver, gateway, operator, chart, other) | ||
component: operator | ||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: Additional fixes for issues where sometimes certificates and Instrumentation opentelemetry.io/v1alpha1 are installed too early | ||
# One or more tracking issues related to the change | ||
issues: [1586] | ||
# (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. | ||
subtext: |
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
73 changes: 73 additions & 0 deletions
73
...le-operator-and-auto-instrumentation/rendered_manifests/operator/job-startupapicheck.yaml
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,73 @@ | ||
--- | ||
# Source: splunk-otel-collector/templates/operator/job-startupapicheck.yaml | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: default-splunk-otel-collector-operator-startupapicheck | ||
namespace: default | ||
labels: | ||
app.kubernetes.io/name: splunk-otel-collector | ||
helm.sh/chart: splunk-otel-collector-0.113.0 | ||
app.kubernetes.io/managed-by: Helm | ||
app.kubernetes.io/instance: default | ||
app.kubernetes.io/version: "0.113.0" | ||
app: splunk-otel-collector | ||
component: otel-operator | ||
chart: splunk-otel-collector-0.113.0 | ||
release: default | ||
heritage: Helm | ||
app.kubernetes.io/component: otel-operator | ||
annotations: | ||
"helm.sh/hook": post-install,post-upgrade | ||
"helm.sh/hook-weight": "4" | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: startupapicheck | ||
image: registry.access.redhat.com/ubi9/ubi:latest | ||
env: | ||
- name: MANAGER_METRICS_SERVICE_CLUSTERIP | ||
value: "default-splunk-otel-collector-operator" | ||
- name: MANAGER_METRICS_SERVICE_PORT | ||
value: "8443" | ||
- name: WEBHOOK_SERVICE_CLUSTERIP | ||
value: "default-splunk-otel-collector-operator-webhook" | ||
- name: WEBHOOK_SERVICE_PORT | ||
value: "443" | ||
command: | ||
- sh | ||
- -c | ||
- | | ||
operator_service_checked=false | ||
operator_webhook_service_checked=false | ||
for i in $(seq 1 300); do | ||
# Checks for the Operator and Operator Webhook service availability using curl | ||
# The services are ready when curl receives an HTTP 400 error response. | ||
if [ "$operator_service_checked" = false ]; then | ||
curl_output_operator=$(curl -s -o /dev/null -w "%{http_code}" "$MANAGER_METRICS_SERVICE_CLUSTERIP:$MANAGER_METRICS_SERVICE_PORT") | ||
if [ "$curl_output_operator" = "400" ]; then | ||
operator_service_checked=true | ||
fi | ||
fi | ||
if [ "$operator_webhook_service_checked" = false ]; then | ||
curl_output_webhook=$(curl -s -o /dev/null -w "%{http_code}" "$WEBHOOK_SERVICE_CLUSTERIP:$WEBHOOK_SERVICE_PORT") | ||
if [ "$curl_output_webhook" = "400" ]; then | ||
operator_webhook_service_checked=true | ||
fi | ||
fi | ||
echo "Attempt $i: Operator Service=${operator_service_checked}, Operator Webhook Service=${operator_webhook_service_checked}" | ||
sleep 1 | ||
if [ "$operator_service_checked" = true ] && [ "$operator_webhook_service_checked" = true ]; then | ||
echo "All checks passed." | ||
exit 0 | ||
fi | ||
done | ||
echo "Timeout reached. Not all checks completed successfully." | ||
exit 1 | ||
restartPolicy: Never |
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
5 changes: 5 additions & 0 deletions
5
helm-charts/splunk-otel-collector/templates/operator/_helpers.tpl
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
69 changes: 69 additions & 0 deletions
69
helm-charts/splunk-otel-collector/templates/operator/job-startupapicheck.yaml
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,69 @@ | ||
{{- if and .Values.operator.enabled .Values.instrumentation.jobs.startupapicheck.enabled }} | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: {{ template "splunk-otel-collector.fullname" . }}-operator-startupapicheck | ||
namespace: {{ template "splunk-otel-collector.namespace" . }} | ||
labels: | ||
{{- include "splunk-otel-collector.commonLabels" . | nindent 4 }} | ||
app: {{ template "splunk-otel-collector.name" . }} | ||
component: otel-operator | ||
chart: {{ template "splunk-otel-collector.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
app.kubernetes.io/component: otel-operator | ||
annotations: | ||
"helm.sh/hook": post-install,post-upgrade | ||
"helm.sh/hook-weight": "4" | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: startupapicheck | ||
image: {{ template "splunk-otel-collector.operator.instrumentation-job.image" . }} | ||
env: | ||
- name: MANAGER_METRICS_SERVICE_CLUSTERIP | ||
value: "{{ template "splunk-otel-collector.fullname" . }}-operator" | ||
- name: MANAGER_METRICS_SERVICE_PORT | ||
value: "8443" | ||
- name: WEBHOOK_SERVICE_CLUSTERIP | ||
value: "{{ template "splunk-otel-collector.fullname" . }}-operator-webhook" | ||
- name: WEBHOOK_SERVICE_PORT | ||
value: "443" | ||
command: | ||
- sh | ||
- -c | ||
- | | ||
operator_service_checked=false | ||
operator_webhook_service_checked=false | ||
for i in $(seq 1 300); do | ||
# Checks for the Operator and Operator Webhook service availability using curl | ||
# The services are ready when curl receives an HTTP 400 error response. | ||
if [ "$operator_service_checked" = false ]; then | ||
curl_output_operator=$(curl -s -o /dev/null -w "%{http_code}" "$MANAGER_METRICS_SERVICE_CLUSTERIP:$MANAGER_METRICS_SERVICE_PORT") | ||
if [ "$curl_output_operator" = "400" ]; then | ||
operator_service_checked=true | ||
fi | ||
fi | ||
if [ "$operator_webhook_service_checked" = false ]; then | ||
curl_output_webhook=$(curl -s -o /dev/null -w "%{http_code}" "$WEBHOOK_SERVICE_CLUSTERIP:$WEBHOOK_SERVICE_PORT") | ||
if [ "$curl_output_webhook" = "400" ]; then | ||
operator_webhook_service_checked=true | ||
fi | ||
fi | ||
echo "Attempt $i: Operator Service=${operator_service_checked}, Operator Webhook Service=${operator_webhook_service_checked}" | ||
sleep 1 | ||
if [ "$operator_service_checked" = true ] && [ "$operator_webhook_service_checked" = true ]; then | ||
echo "All checks passed." | ||
exit 0 | ||
fi | ||
done | ||
echo "Timeout reached. Not all checks completed successfully." | ||
exit 1 | ||
restartPolicy: Never | ||
{{ end }} |
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