-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add network-observability-operator #957
Open
zreigz
wants to merge
9
commits into
master
Choose a base branch
from
network-observability-operator
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
43ea385
add network-observability-operator
zreigz 7367f46
add flowcollector
zreigz 8793b12
add flowcollector
zreigz d134a36
add flowcollector
zreigz 59e697b
delete loki
zreigz 32e85ad
extend configuration
zreigz 5deddf0
fix deployment chart
zreigz 35dc26c
set limits
zreigz 2fd968a
fix image tag
zreigz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
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,6 @@ | ||
apiVersion: v2 | ||
name: network-observability-operator | ||
description: A Helm chart for Kubernetes | ||
appVersion: 1.0.5 | ||
type: application | ||
version: 0.1.0 |
8,232 changes: 8,232 additions & 0 deletions
8,232
charts/network-observability-operator/crds/flowcollectors.flows.netobserv.io.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
62 changes: 62 additions & 0 deletions
62
charts/network-observability-operator/templates/_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "network-observability-operator.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "network-observability-operator.fullname" -}} | ||
{{- if .Values.fullnameOverride }} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- $name := default .Chart.Name .Values.nameOverride }} | ||
{{- if contains $name .Release.Name }} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "network-observability-operator.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "network-observability-operator.labels" -}} | ||
helm.sh/chart: {{ include "network-observability-operator.chart" . }} | ||
{{ include "network-observability-operator.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "network-observability-operator.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "network-observability-operator.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "network-observability-operator.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create }} | ||
{{- default (include "network-observability-operator.fullname" .) .Values.serviceAccount.name }} | ||
{{- else }} | ||
{{- default "default" .Values.serviceAccount.name }} | ||
{{- end }} | ||
{{- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: cert-manager.io/v1 | ||
kind: Issuer | ||
metadata: | ||
name: selfsigned-issuer | ||
spec: | ||
selfSigned: {} | ||
--- | ||
apiVersion: cert-manager.io/v1 | ||
kind: Certificate | ||
metadata: | ||
name: {{ include "network-observability-operator.fullname" . }}-ca | ||
spec: | ||
isCA: true | ||
commonName: {{ include "network-observability-operator.fullname" . }}-ca | ||
subject: | ||
organizations: | ||
- Plural | ||
secretName: webhook-server-cert | ||
privateKey: | ||
algorithm: ECDSA | ||
size: 256 | ||
issuerRef: | ||
name: selfsigned-issuer | ||
kind: Issuer | ||
group: cert-manager.io |
19 changes: 19 additions & 0 deletions
19
charts/network-observability-operator/templates/config.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,19 @@ | ||
apiVersion: v1 | ||
data: | ||
controller_manager_config.yaml: | | ||
apiVersion: controller-runtime.sigs.k8s.io/v1alpha1 | ||
kind: ControllerManagerConfig | ||
health: | ||
healthProbeBindAddress: :8081 | ||
metrics: | ||
bindAddress: 127.0.0.1:8080 | ||
webhook: | ||
port: 9443 | ||
leaderElection: | ||
leaderElect: true | ||
resourceName: 7a7ecdcd.netobserv.io | ||
kind: ConfigMap | ||
metadata: | ||
labels: | ||
{{- include "network-observability-operator.labels" . | nindent 4 }} | ||
name: netobserv-manager-config |
161 changes: 161 additions & 0 deletions
161
charts/network-observability-operator/templates/deployment.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,161 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "network-observability-operator.fullname" . }} | ||
labels: | ||
{{- include "network-observability-operator.labels" . | nindent 4 }} | ||
spec: | ||
progressDeadlineSeconds: 600 | ||
{{- if not .Values.autoscaling.enabled }} | ||
replicas: {{ .Values.replicaCount }} | ||
{{- end }} | ||
selector: | ||
matchLabels: | ||
{{- include "network-observability-operator.selectorLabels" . | nindent 6 }} | ||
strategy: | ||
rollingUpdate: | ||
maxSurge: 25% | ||
maxUnavailable: 25% | ||
type: RollingUpdate | ||
template: | ||
metadata: | ||
{{- with .Values.podAnnotations }} | ||
annotations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
labels: | ||
{{- include "network-observability-operator.labels" . | nindent 8 }} | ||
{{- with .Values.podLabels }} | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
spec: | ||
containers: | ||
- args: {{- toYaml .Values.controllerManager.manager.args | nindent 10 }} | ||
command: | ||
- /manager | ||
env: | ||
- name: ENABLE_WEBHOOKS | ||
value: "false" | ||
- name: RELATED_IMAGE_EBPF_AGENT | ||
value: quay.io/netobserv/netobserv-ebpf-agent:v0.3.3 | ||
- name: RELATED_IMAGE_FLOWLOGS_PIPELINE | ||
value: quay.io/netobserv/flowlogs-pipeline:v0.1.11 | ||
- name: RELATED_IMAGE_CONSOLE_PLUGIN | ||
value: quay.io/netobserv/network-observability-console-plugin:v0.1.12 | ||
- name: DOWNSTREAM_DEPLOYMENT | ||
value: "false" | ||
- name: PROFILING_BIND_ADDRESS | ||
- name: OPERATOR_CONDITION_NAME | ||
value: netobserv-operator.v1.0.5 | ||
image: {{ .Values.controllerManager.manager.image.repository }}:{{ .Values.controllerManager.manager.image.tag | default (printf "%s" .Chart.AppVersion) }} | ||
imagePullPolicy: {{ .Values.controllerManager.manager.imagePullPolicy }} | ||
livenessProbe: | ||
failureThreshold: 3 | ||
httpGet: | ||
path: /healthz | ||
port: 8081 | ||
scheme: HTTP | ||
initialDelaySeconds: 15 | ||
periodSeconds: 20 | ||
successThreshold: 1 | ||
timeoutSeconds: 1 | ||
name: manager | ||
ports: | ||
- containerPort: 9443 | ||
name: webhook-server | ||
protocol: TCP | ||
readinessProbe: | ||
failureThreshold: 3 | ||
httpGet: | ||
path: /readyz | ||
port: 8081 | ||
scheme: HTTP | ||
initialDelaySeconds: 5 | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
timeoutSeconds: 1 | ||
resources: {{- toYaml .Values.controllerManager.manager.resources | nindent 12 | ||
}} | ||
securityContext: {{- toYaml .Values.controllerManager.manager.containerSecurityContext | ||
| nindent 12 }} | ||
volumeMounts: | ||
- mountPath: /tmp/k8s-webhook-server/serving-certs | ||
name: cert | ||
readOnly: true | ||
terminationMessagePath: /dev/termination-log | ||
terminationMessagePolicy: File | ||
- args: {{- toYaml .Values.controllerManager.kubeRbacProxy.args | nindent 10 }} | ||
env: | ||
- name: OPERATOR_CONDITION_NAME | ||
value: {{ quote .Values.controllerManager.kubeRbacProxy.operatorConditionName }} | ||
image: {{ .Values.controllerManager.kubeRbacProxy.image.repository }}:{{ .Values.controllerManager.kubeRbacProxy.image.tag | default (printf "v%s" .Chart.AppVersion) }} | ||
name: kube-rbac-proxy | ||
ports: | ||
- containerPort: 8443 | ||
name: https | ||
protocol: TCP | ||
resources: {{- toYaml .Values.controllerManager.kubeRbacProxy.resources | nindent | ||
12 }} | ||
securityContext: {{- toYaml .Values.controllerManager.kubeRbacProxy.containerSecurityContext | ||
| nindent 12 }} | ||
dnsPolicy: ClusterFirst | ||
restartPolicy: Always | ||
schedulerName: default-scheduler | ||
securityContext: | ||
runAsNonRoot: true | ||
serviceAccount: {{ include "network-observability-operator.serviceAccountName" . }} | ||
serviceAccountName: {{ include "network-observability-operator.serviceAccountName" . }} | ||
terminationGracePeriodSeconds: 10 | ||
volumes: | ||
- name: cert | ||
secret: | ||
defaultMode: 420 | ||
secretName: webhook-server-cert | ||
--- | ||
apiVersion: admissionregistration.k8s.io/v1 | ||
kind: ValidatingWebhookConfiguration | ||
metadata: | ||
annotations: | ||
service.beta.openshift.io/inject-cabundle: "true" | ||
name: netobserv-validating-webhook-configuration | ||
webhooks: | ||
- admissionReviewVersions: | ||
- v1 | ||
clientConfig: | ||
service: | ||
name: netobserv-webhook-service | ||
namespace: '{{ .Release.Namespace }}' | ||
path: /validate-netobserv-io-v1beta2-flowcollector | ||
failurePolicy: Fail | ||
name: flowcollectorconversionwebhook.netobserv.io | ||
rules: | ||
- apiGroups: | ||
- netobserv.io | ||
apiVersions: | ||
- v1beta2 | ||
operations: | ||
- CREATE | ||
- UPDATE | ||
resources: | ||
- flowcollectors | ||
sideEffects: None | ||
- admissionReviewVersions: | ||
- v1 | ||
clientConfig: | ||
service: | ||
name: netobserv-webhook-service | ||
namespace: '{{ .Release.Namespace }}' | ||
path: /validate-flows-netobserv-io-v1alpha1-flowmetric | ||
failurePolicy: Fail | ||
name: flowmetricvalidationwebhook.netobserv.io | ||
rules: | ||
- apiGroups: | ||
- flows.netobserv.io | ||
apiVersions: | ||
- v1alpha1 | ||
operations: | ||
- CREATE | ||
- UPDATE | ||
resources: | ||
- flowmetrics | ||
sideEffects: None |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forgot about this, but we should allow customizability of the security context for both containers and the overall pod