Skip to content

Commit

Permalink
github: OLM
Browse files Browse the repository at this point in the history
Signed-off-by: Feruzjon Muyassarov <[email protected]>
  • Loading branch information
fmuyassarov committed Dec 23, 2024
1 parent e13c3b8 commit c9880f8
Show file tree
Hide file tree
Showing 12 changed files with 2,895 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/publish-olm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Publish a release

on:
push:
tags:
- '*' # Triggers on any tag creation

jobs:
update:
name: Publish new OperatorHub release
runs-on: ubuntu-22.04
steps:

- name: Get the release tag
run: echo ${GITHUB_REF##*/}

- name: Get the release tag
run: echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Run make bundle
run: pushd deployment/operator && ls -lah && pwd && popd

- name: Checkout tools repo
uses: actions/checkout@v4
with:
repository: fmuyassarov/operator-demo
path: operator-demo
ref: main
token: ${{ secrets.MACHINE_PAT }}

- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
id: import-gpg
with:
gpg_private_key: ${{ secrets.MACHINE_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.MACHINE_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
workdir: operator-demo

- name: Make changes to pull request
run: date +%s > operator-demo/report.txt

- name: Run pwd
run: cd && ls -lah
# && cp nri-plugins/Tiltfile operator-demo/ && ls -lah operator-demo/

- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
signoff: true
committer: "Github Actions <${{ steps.import-gpg.outputs.email }}>"
path: operator-demo
push-to-fork: nri-plugins-bot/operator-demo
branch: olm-${{ github.ref_name }}
token: ${{ secrets.MACHINE_PAT }}
delete-branch: false
title: 'operator nri-plugins-operator ${{ github.ref_name }}'
commit-message: 'Submit operator nri-plugins-operator ${{ github.ref_name }}'
body: |
Added OLM bundle for [nri-plugins operator ${{ github.ref_name }}](https://github.com/containers/nri-plugins/releases/tag/${{ github.ref_name }})
> Auto-generated by `Github Actions Bot`
561 changes: 561 additions & 0 deletions deployment/operator/config/crd/bases/config.nri_balloonspolicies.yaml

Large diffs are not rendered by default.

1,061 changes: 1,061 additions & 0 deletions deployment/operator/config/crd/bases/config.nri_nriplugindeployments.yaml

Large diffs are not rendered by default.

250 changes: 250 additions & 0 deletions deployment/operator/config/crd/bases/config.nri_templatepolicies.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.5
name: templatepolicies.config.nri
spec:
group: config.nri
names:
kind: TemplatePolicy
listKind: TemplatePolicyList
plural: templatepolicies
singular: templatepolicy
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: TemplatePolicy represents the configuration for the template
policy.
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: TemplatePolicySpec describes a template policy.
properties:
agent:
default:
nodeResourceTopology: true
description: AgentConfig provides access to configuration data for
the agent.
properties:
nodeResourceTopology:
description: |-
NodeResourceTopology enables support for exporting resource usage using
NodeResourceTopology Custom Resources.
type: boolean
podResourceAPI:
description: PodResourceAPI enables support for querying kubelet
Pod Resource API.
type: boolean
type: object
availableResources:
additionalProperties:
type: string
type: object
control:
properties:
cpu:
properties:
classes:
additionalProperties:
properties:
energyPerformancePreference:
description: EnergyPerformancePreference for CPUs in
this class.
type: integer
freqGovernor:
description: CPUFreq Governor for this class.
type: string
maxFreq:
description: MaxFreq is the maximum frequency for this
class.
type: integer
minFreq:
description: MinFreq is the minimum frequency for this
class.
type: integer
uncoreMaxFreq:
description: UncoreMaxFreq is the maximum uncore frequency
for this class.
type: integer
uncoreMinFreq:
description: UncoreMinFreq is the minimum uncore frequency
for this class.
type: integer
type: object
type: object
required:
- classes
type: object
type: object
instrumentation:
description: Config provides runtime configuration for instrumentation.
properties:
httpEndpoint:
description: |-
HTTPEndpoint is the address our HTTP server listens on. This endpoint is used
to expose Prometheus metrics among other things.
example: :8891
type: string
metrics:
default:
enabled:
- policy
- buildinfo
description: Metrics defines which metrics to collect.
properties:
enabled:
description: Enabled enables collection for metrics matched
by glob patterns.
example:
- '*'
items:
type: string
type: array
polled:
description: Polled forces polled collection for metrics matched
by glob patterns.
example:
- computationally-expensive-metrics
items:
type: string
type: array
type: object
prometheusExport:
description: PrometheusExport enables exporting /metrics for Prometheus.
type: boolean
reportPeriod:
default: 30s
description: ReportPeriod is the interval between collecting polled
metrics.
format: duration
type: string
samplingRatePerMillion:
description: SamplingRatePerMillion is the number of samples to
collect per million spans.
example: 100000
type: integer
tracingCollector:
description: |-
TracingCollector defines the external endpoint for tracing data collection.
Endpoints are specified as full URLs, or as plain URL schemes which then
imply scheme-specific defaults. The supported schemes and their default
URLs are:
- otlp-http, http: localhost:4318
- otlp-grpc, grpc: localhost:4317
example: otlp-http://localhost:4318
type: string
type: object
log:
properties:
debug:
description: Debub turns on debug messages matching listed logger
sources.
items:
type: string
type: array
klog:
description: Klog configures the klog backend.
properties:
add_dir_header:
type: boolean
alsologtostderr:
type: boolean
log_backtrace_at:
type: string
log_dir:
type: string
log_file:
type: string
log_file_max_size:
format: int64
type: integer
logtostderr:
type: boolean
one_output:
type: boolean
skip_headers:
type: boolean
skip_log_headers:
type: boolean
stderrthreshold:
type: string
v:
type: integer
vmodule:
type: string
type: object
source:
description: Source controls whether messages are prefixed with
their logger source.
type: boolean
type: object
reservedResources:
additionalProperties:
type: string
type: object
required:
- reservedResources
type: object
status:
description: ConfigStatus is the per-node status for a configuration resource.
properties:
nodes:
additionalProperties:
description: NodeStatus is the configuration status for a single
node.
properties:
errors:
description: Error can provide further details of a configuration
error.
type: string
generation:
description: Generation is the generation the configuration
this status was set for.
format: int64
type: integer
status:
description: Status of activating the configuration on this
node.
enum:
- Success
- Failure
type: string
timestamp:
description: Timestamp of setting this status.
format: date-time
type: string
required:
- generation
- status
type: object
type: object
required:
- nodes
type: object
required:
- spec
type: object
served: true
storage: true
subresources:
status: {}
Loading

0 comments on commit c9880f8

Please sign in to comment.