diff --git a/charts/odigos/Chart.yaml b/charts/odigos/Chart.yaml index 71b2266..8f2bd3a 100644 --- a/charts/odigos/Chart.yaml +++ b/charts/odigos/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.0.1 +version: 0.1.0 # 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 diff --git a/charts/odigos/templates/crd/configuration.yaml b/charts/odigos/templates/crd/configuration.yaml new file mode 100644 index 0000000..1d7f9f3 --- /dev/null +++ b/charts/odigos/templates/crd/configuration.yaml @@ -0,0 +1,53 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.8.0 + creationTimestamp: null + name: odigosconfigurations.odigos.io +spec: + group: odigos.io + names: + kind: OdigosConfiguration + listKind: OdigosConfigurationList + plural: odigosconfigurations + singular: odigosconfiguration + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: OdigosConfiguration is the Schema for the odigos configuration + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: OdigosConfigurationSpec defines the desired state of OdigosConfiguration + properties: + instrumentationMode: + enum: + - OPT_IN + - OPT_OUT + type: string + required: + - instrumentationMode + type: object + type: object + served: true + storage: true +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/charts/odigos/templates/crd/destinations.yaml b/charts/odigos/templates/crd/destinations.yaml index 89aa400..5af6e8b 100644 --- a/charts/odigos/templates/crd/destinations.yaml +++ b/charts/odigos/templates/crd/destinations.yaml @@ -38,35 +38,30 @@ spec: properties: datadog: properties: - apiKey: - type: string site: type: string required: - - apiKey - site type: object grafana: properties: - apiKey: - type: string url: type: string - user: - type: string required: - - apiKey - url - - user type: object honeycomb: - properties: - apiKey: - type: string - required: - - apiKey type: object type: object + secretRef: + description: LocalObjectReference contains enough information to let + you locate the referenced object inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + type: object type: enum: - grafana @@ -75,6 +70,7 @@ spec: type: string required: - data + - secretRef - type type: object status: diff --git a/charts/odigos/templates/crd/instrumentedapplications.yaml b/charts/odigos/templates/crd/instrumentedapplications.yaml index d6d67c5..079ac86 100644 --- a/charts/odigos/templates/crd/instrumentedapplications.yaml +++ b/charts/odigos/templates/crd/instrumentedapplications.yaml @@ -14,75 +14,77 @@ spec: singular: instrumentedapplication scope: Namespaced versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: InstrumentedApplication is the Schema for the instrumentedapplications - API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation + - name: v1alpha1 + schema: + openAPIV3Schema: + description: InstrumentedApplication is the Schema for the instrumentedapplications + API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this + type: string + kind: + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: InstrumentedApplicationSpec defines the desired state of - InstrumentedApplication - properties: - collectorAddr: - type: string - languages: - items: + type: string + metadata: + type: object + spec: + description: InstrumentedApplicationSpec defines the desired state of + InstrumentedApplication + properties: + collectorAddr: + type: string + enabled: + type: boolean + languages: + items: + properties: + containerName: + type: string + language: + enum: + - java + - python + - go + - dotnet + - javascript + type: string + processName: + type: string + required: + - containerName + - language + type: object + type: array + type: object + status: + description: InstrumentedApplicationStatus defines the observed state + of InstrumentedApplication + properties: + instrumented: + type: boolean + langDetection: properties: - containerName: - type: string - language: + phase: enum: - - java - - python - - go - - dotnet - - javascript - type: string - processName: + - Pending + - Running + - Completed + - Error type: string - required: - - containerName - - language type: object - type: array - type: object - status: - description: InstrumentedApplicationStatus defines the observed state - of InstrumentedApplication - properties: - instrumented: - type: boolean - langDetection: - properties: - phase: - enum: - - Pending - - Running - - Completed - - Error - type: string - type: object - required: - - instrumented - type: object - type: object - served: true - storage: true - subresources: - status: {} + required: + - instrumented + type: object + type: object + served: true + storage: true + subresources: + status: {} status: acceptedNames: kind: "" diff --git a/charts/odigos/templates/ui/clusterrole.yaml b/charts/odigos/templates/ui/clusterrole.yaml index fea7b3c..8bf1836 100644 --- a/charts/odigos/templates/ui/clusterrole.yaml +++ b/charts/odigos/templates/ui/clusterrole.yaml @@ -3,58 +3,6 @@ kind: ClusterRole metadata: name: odigos-ui rules: -- apiGroups: - - odigos.io - resources: - - collectors - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - odigos.io - resources: - - collectors/finalizers - verbs: - - update -- apiGroups: - - odigos.io - resources: - - collectors/status - verbs: - - get - - patch - - update -- apiGroups: - - odigos.io - resources: - - destinations - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - odigos.io - resources: - - destinations/finalizers - verbs: - - update -- apiGroups: - - odigos.io - resources: - - destinations/status - verbs: - - get - - patch - - update - apiGroups: - odigos.io resources: diff --git a/charts/odigos/templates/ui/role.yaml b/charts/odigos/templates/ui/role.yaml new file mode 100644 index 0000000..1a95548 --- /dev/null +++ b/charts/odigos/templates/ui/role.yaml @@ -0,0 +1,88 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: odigos-ui + namespace: {{ .Release.Namespace }} +rules: +- apiGroups: + - "" + resources: + - secrets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - odigos.io + resources: + - collectors + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - odigos.io + resources: + - collectors/finalizers + verbs: + - update +- apiGroups: + - odigos.io + resources: + - collectors/status + verbs: + - get + - patch + - update +- apiGroups: + - odigos.io + resources: + - destinations + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - odigos.io + resources: + - destinations/finalizers + verbs: + - update +- apiGroups: + - odigos.io + resources: + - destinations/status + verbs: + - get + - patch + - update +- apiGroups: + - odigos.io + resources: + - odigosconfigurations + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - odigos.io + resources: + - odigosconfigurations/finalizers + verbs: + - update \ No newline at end of file diff --git a/charts/odigos/templates/ui/rolebinding.yaml b/charts/odigos/templates/ui/rolebinding.yaml new file mode 100644 index 0000000..f5effdc --- /dev/null +++ b/charts/odigos/templates/ui/rolebinding.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: odigos-ui + namespace: {{ .Release.Namespace }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: odigos-ui +subjects: +- kind: ServiceAccount + name: odigos-ui