-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into reduce-fp-java-inspection
- Loading branch information
Showing
375 changed files
with
8,148 additions
and
13,205 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
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,93 @@ | ||
name: Publish Images to Artifact Registry | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
|
||
publish-docker-images: | ||
strategy: | ||
matrix: | ||
dockerfile: ['Dockerfile', 'Dockerfile.rhel'] | ||
service: ['autoscaler', 'scheduler', 'instrumentor', 'collector', 'odiglet', 'ui'] | ||
include: | ||
- service: autoscaler | ||
runner: ubuntu-latest | ||
summary: "Autoscaler for Odigos" | ||
description: "Autoscaler manages the installation of Odigos components." | ||
- service: scheduler | ||
runner: ubuntu-latest | ||
summary: "Scheduler for Odigos" | ||
description: "Scheduler manages the installation of OpenTelemetry Collectors with Odigos." | ||
- service: instrumentor | ||
runner: ubuntu-latest | ||
summary: "Instrumentor for Odigos" | ||
description: "Instrumentor manages auto-instrumentation for workloads with Odigos." | ||
- service: collector | ||
runner: large-runner | ||
summary: "Odigos Collector" | ||
description: "The Odigos build of the OpenTelemetry Collector." | ||
- service: odiglet | ||
runner: ubuntu-latest | ||
summary: "Odiglet for Odigos" | ||
description: "Odiglet is the core component of Odigos managing auto-instrumentation. This image requires a root user to load and manage eBPF programs." | ||
- service: ui | ||
runner: ubuntu-latest | ||
summary: "UI for Odigos" | ||
description: "UI provides the frontend webapp for managing an Odigos installation." | ||
runs-on: ${{ matrix.runner }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Extract Tag | ||
id: extract_tag | ||
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- id: gcp-auth | ||
name: Authenticate with Google Cloud | ||
uses: google-github-actions/auth@v0 | ||
with: | ||
token_format: access_token | ||
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }} | ||
service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }} | ||
access_token_lifetime: 1200s | ||
|
||
- name: Login to Artifact Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: us-central1-docker.pkg.dev | ||
username: oauth2accesstoken | ||
password: ${{ steps.gcp-auth.outputs.access_token }} | ||
|
||
- name: Build and Push Docker Image for ${{ matrix.service }} | ||
uses: docker/build-push-action@v6 | ||
with: | ||
push: true | ||
tags: us-central1-docker.pkg.dev/odigos-cloud/components/odigos-${{ matrix.service }}${{ matrix.dockerfile == 'Dockerfile.rhel' && '-ubi9' || '' }}:${{ steps.extract_tag.outputs.tag }} | ||
build-args: | | ||
SERVICE_NAME=${{ matrix.service }} | ||
ODIGOS_VERSION=${{ steps.extract_tag.outputs.tag }} | ||
RELEASE=${{ steps.extract_tag.outputs.tag }} | ||
VERSION=${{ steps.extract_tag.outputs.tag }} | ||
SUMMARY=${{ matrix.summary }} | ||
DESCRIPTION=${{ matrix.description }} | ||
platforms: linux/amd64,linux/arm64 | ||
file: >- | ||
${{ matrix.service == 'odiglet' && format('odiglet/{0}', matrix.dockerfile) || | ||
matrix.service == 'collector' && format('collector/{0}', matrix.dockerfile) || | ||
matrix.service == 'ui' && format('frontend/{0}', matrix.dockerfile) || | ||
matrix.dockerfile }} | ||
context: >- | ||
${{ | ||
(matrix.service == 'collector' && 'collector') || | ||
'.' | ||
}} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
/* | ||
Copyright 2022. | ||
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. | ||
*/ | ||
|
||
package v1alpha1 | ||
|
||
import ( | ||
"github.com/odigos-io/odigos/common" | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
type K8sLabelAttribute struct { | ||
// The label name to be extracted from the pod. | ||
// e.g. "app.kubernetes.io/name" | ||
// +kubebuilder:validation:Required | ||
LabelKey string `json:"labelKey"` | ||
// The attribute key to be used for the resource attribute created from the label. | ||
// e.g. "app.kubernetes.name" | ||
// +kubebuilder:validation:Required | ||
AttributeKey string `json:"attributeKey"` | ||
} | ||
|
||
type K8sAnnotationAttribute struct { | ||
// The label name to be extracted from the pod. | ||
// e.g. "kubectl.kubernetes.io/restartedAt" | ||
// +kubebuilder:validation:Required | ||
AnnotationKey string `json:"annotationKey"` | ||
// The attribute key to be used for the resource attribute created from the label. | ||
// e.g. "kubectl.kubernetes.restartedAte" | ||
// +kubebuilder:validation:Required | ||
AttributeKey string `json:"attributeKey"` | ||
} | ||
|
||
type K8sAttributesSpec struct { | ||
ActionName string `json:"actionName,omitempty"` | ||
Notes string `json:"notes,omitempty"` | ||
Disabled bool `json:"disabled,omitempty"` | ||
Signals []common.ObservabilitySignal `json:"signals"` | ||
|
||
// Collect the following container related attributes: | ||
// k8s.container.name | ||
// container.id | ||
// container.image.name | ||
// container.image.tag | ||
CollectContainerAttributes bool `json:"collectContainerAttributes,omitempty"` | ||
|
||
// Collect the following workload UID attributes: | ||
// k8s.deployment.uid | ||
// k8s.daemonset.uid | ||
// k8s.statefulset.uid | ||
CollectWorkloadUID bool `json:"collectWorkloadUID,omitempty"` | ||
|
||
// Collect the k8s.cluster.uid attribute, which is set to the uid of the namespace "kube-system" | ||
CollectClusterUID bool `json:"collectClusterUID,omitempty"` | ||
|
||
// list of labels to be extracted from the pod, and the attribute key to be used for the resource attribute created from each label. | ||
// +optional | ||
LabelsAttributes []K8sLabelAttribute `json:"labelsAttributes,omitempty"` | ||
|
||
// list of annotations to be extracted from the pod, and the attribute key to be used for the resource attribute created from each annotation. | ||
// +optional | ||
AnnotationsAttributes []K8sAnnotationAttribute `json:"annotationsAttributes,omitempty"` | ||
} | ||
|
||
// K8sAttributesStatus defines the observed state of K8sAttributes action | ||
type K8sAttributesStatus struct { | ||
// Represents the observations of a k8sattributes' current state. | ||
// Known .status.conditions.type are: "Available", "Progressing" | ||
// +patchMergeKey=type | ||
// +patchStrategy=merge | ||
// +listType=map | ||
// +listMapKey=type | ||
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` | ||
} | ||
|
||
//+genclient | ||
//+kubebuilder:object:root=true | ||
//+kubebuilder:subresource:status | ||
//+kubebuilder:resource:path=k8sattributesresolvers,scope=Namespaced | ||
//+kubebuilder:metadata:labels=metadata.labels.odigos.io/config=1 | ||
//+kubebuilder:metadata:labels=metadata.labels.odigos.io/system-object=true | ||
|
||
// K8sAttributesResolver allows adding an action to collect k8s attributes. | ||
type K8sAttributesResolver struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
Spec K8sAttributesSpec `json:"spec,omitempty"` | ||
Status K8sAttributesStatus `json:"status,omitempty"` | ||
} | ||
|
||
//+kubebuilder:object:root=true | ||
|
||
// K8sAttributesResolverList contains a list of K8sAttributes | ||
type K8sAttributesResolverList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
Items []K8sAttributesResolver `json:"items"` | ||
} | ||
|
||
func init() { | ||
SchemeBuilder.Register(&K8sAttributesResolver{}, &K8sAttributesResolverList{}) | ||
} |
Oops, something went wrong.