Skip to content

Commit

Permalink
operator mondoo-operator (1.19.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
czunker authored Dec 20, 2023
1 parent e1bc8ba commit 14f4895
Show file tree
Hide file tree
Showing 11 changed files with 1,224 additions and 0 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# Copyright (c) Mondoo, Inc.
# SPDX-License-Identifier: BUSL-1.1

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
name: mondoooperatorconfigs.k8s.mondoo.com
spec:
group: k8s.mondoo.com
names:
kind: MondooOperatorConfig
listKind: MondooOperatorConfigList
plural: mondoooperatorconfigs
singular: mondoooperatorconfig
scope: Cluster
versions:
- name: v1alpha2
schema:
openAPIV3Schema:
description: MondooOperatorConfig is the Schema for the mondoooperatorconfigs
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
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: MondooOperatorConfigSpec defines the desired state of MondooOperatorConfig
properties:
httpProxy:
description: HttpProxy specifies a proxy to use for HTTP requests
to the Mondoo Platform.
type: string
metrics:
description: Metrics controls the enabling/disabling of metrics report
of mondoo-operator
properties:
enable:
type: boolean
resourceLabels:
additionalProperties:
type: string
description: ResourceLabels allows providing a list of extra labels
to apply to the metrics-related resources (eg. ServiceMonitor)
type: object
type: object
skipContainerResolution:
description: Allows skipping Image resolution from upstream repository
type: boolean
type: object
status:
description: MondooOperatorConfigStatus defines the observed state of
MondooOperatorConfig
properties:
conditions:
description: Conditions includes more detailed status for the mondoo
config
items:
description: Condition contains details for the current condition
of a MondooOperatorConfig
properties:
lastTransitionTime:
description: LastTransitionTime is the last time the condition
transitioned from one status to another.
format: date-time
type: string
lastUpdateTime:
description: LastUpdateTime is the last time the condition was
updated.
format: date-time
type: string
message:
description: Message is a human-readable message indicating
details about last transition.
type: string
reason:
description: Reason is a unique, one-word, CamelCase reason
for the condition's last transition.
type: string
status:
description: Status is the status of the condition.
type: string
type:
description: Type is the type of the condition.
type: string
required:
- status
- type
type: object
type: array
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: null
storedVersions: null
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (c) Mondoo, Inc.
# SPDX-License-Identifier: BUSL-1.1

apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
app.kubernetes.io/name: mondoo-operator
name: mondoo-operator-controller-manager-metrics-service
spec:
ports:
- name: metrics
port: 8080
protocol: TCP
targetPort: metrics
selector:
app.kubernetes.io/name: mondoo-operator
status:
loadBalancer: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (c) Mondoo, Inc.
# SPDX-License-Identifier: BUSL-1.1

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: mondoo-operator-k8s-resources-scanning
rules:
- apiGroups:
- '*'
resources:
- '*'
verbs:
- get
- watch
- list
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright (c) Mondoo, Inc.
# SPDX-License-Identifier: BUSL-1.1

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
creationTimestamp: null
name: mondoo-operator-k8s-resources-scanning
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: mondoo-operator-k8s-resources-scanning
subjects:
- kind: ServiceAccount
name: mondoo-operator-k8s-resources-scanning
namespace: mondoo-operator
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (c) Mondoo, Inc.
# SPDX-License-Identifier: BUSL-1.1

apiVersion: v1
kind: ServiceAccount
metadata:
creationTimestamp: null
name: mondoo-operator-k8s-resources-scanning
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: v1
data:
controller_manager_config.yaml: |
# Copyright (c) Mondoo, Inc.
# SPDX-License-Identifier: BUSL-1.1
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: 60679458.mondoo.com
kind: ConfigMap
metadata:
name: mondoo-operator-manager-config
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (c) Mondoo, Inc.
# SPDX-License-Identifier: BUSL-1.1

apiVersion: v1
kind: ServiceAccount
metadata:
creationTimestamp: null
name: mondoo-operator-webhook

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions operators/mondoo-operator/1.19.0/metadata/annotations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (c) Mondoo, Inc.
# SPDX-License-Identifier: BUSL-1.1

annotations:
# Core bundle annotations.
operators.operatorframework.io.bundle.mediatype.v1: registry+v1
operators.operatorframework.io.bundle.manifests.v1: manifests/
operators.operatorframework.io.bundle.metadata.v1: metadata/
operators.operatorframework.io.bundle.package.v1: mondoo-operator
operators.operatorframework.io.bundle.channels.v1: stable-v1
operators.operatorframework.io.metrics.builder: operator-sdk-v1.32.0
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v4-alpha

# Annotations for testing.
operators.operatorframework.io.test.mediatype.v1: scorecard+v1
operators.operatorframework.io.test.config.v1: tests/scorecard/
73 changes: 73 additions & 0 deletions operators/mondoo-operator/1.19.0/tests/scorecard/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Copyright (c) Mondoo, Inc.
# SPDX-License-Identifier: BUSL-1.1

apiVersion: scorecard.operatorframework.io/v1alpha3
kind: Configuration
metadata:
name: config
stages:
- parallel: true
tests:
- entrypoint:
- scorecard-test
- basic-check-spec
image: quay.io/operator-framework/scorecard-test:v1.15.0
labels:
suite: basic
test: basic-check-spec-test
storage:
spec:
mountPath: {}
- entrypoint:
- scorecard-test
- olm-bundle-validation
image: quay.io/operator-framework/scorecard-test:v1.15.0
labels:
suite: olm
test: olm-bundle-validation-test
storage:
spec:
mountPath: {}
- entrypoint:
- scorecard-test
- olm-crds-have-validation
image: quay.io/operator-framework/scorecard-test:v1.15.0
labels:
suite: olm
test: olm-crds-have-validation-test
storage:
spec:
mountPath: {}
- entrypoint:
- scorecard-test
- olm-crds-have-resources
image: quay.io/operator-framework/scorecard-test:v1.15.0
labels:
suite: olm
test: olm-crds-have-resources-test
storage:
spec:
mountPath: {}
- entrypoint:
- scorecard-test
- olm-spec-descriptors
image: quay.io/operator-framework/scorecard-test:v1.15.0
labels:
suite: olm
test: olm-spec-descriptors-test
storage:
spec:
mountPath: {}
- entrypoint:
- scorecard-test
- olm-status-descriptors
image: quay.io/operator-framework/scorecard-test:v1.15.0
labels:
suite: olm
test: olm-status-descriptors-test
storage:
spec:
mountPath: {}
storage:
spec:
mountPath: {}

0 comments on commit 14f4895

Please sign in to comment.