-
Notifications
You must be signed in to change notification settings - Fork 540
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SusQL: address some synk scan issues (#5155)
Signed-off-by: Scott Trent <[email protected]>
- Loading branch information
Showing
7 changed files
with
650 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM scratch | ||
|
||
# Core bundle labels. | ||
LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 | ||
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ | ||
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ | ||
LABEL operators.operatorframework.io.bundle.package.v1=susql-operator | ||
LABEL operators.operatorframework.io.bundle.channels.v1=alpha | ||
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.36.1 | ||
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 | ||
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v4 | ||
|
||
# Labels for testing. | ||
LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 | ||
LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ | ||
|
||
# Copy files to locations specified by labels. | ||
COPY bundle/manifests /manifests/ | ||
COPY bundle/metadata /metadata/ | ||
COPY bundle/tests/scorecard /tests/scorecard/ |
17 changes: 17 additions & 0 deletions
17
....29/manifests/susql-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.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,17 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
app.kubernetes.io/component: kube-rbac-proxy | ||
app.kubernetes.io/created-by: susql-operator | ||
app.kubernetes.io/instance: metrics-reader | ||
app.kubernetes.io/managed-by: kustomize | ||
app.kubernetes.io/name: clusterrole | ||
app.kubernetes.io/part-of: susql-operator | ||
name: susql-operator-metrics-reader | ||
rules: | ||
- nonResourceURLs: | ||
- /metrics | ||
verbs: | ||
- get |
23 changes: 23 additions & 0 deletions
23
.../0.0.29/manifests/susql-operator-susql-controller-manager-metrics-service_v1_service.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,23 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
creationTimestamp: null | ||
labels: | ||
app.kubernetes.io/component: kube-rbac-proxy | ||
app.kubernetes.io/created-by: susql-operator | ||
app.kubernetes.io/instance: susql-controller-manager-metrics-service | ||
app.kubernetes.io/managed-by: kustomize | ||
app.kubernetes.io/name: service | ||
app.kubernetes.io/part-of: susql-operator | ||
control-plane: susql-controller-manager | ||
name: susql-operator-susql-controller-manager-metrics-service | ||
spec: | ||
ports: | ||
- name: https | ||
port: 8443 | ||
protocol: TCP | ||
targetPort: https | ||
selector: | ||
control-plane: susql-controller-manager | ||
status: | ||
loadBalancer: {} |
405 changes: 405 additions & 0 deletions
405
operators/susql-operator/0.0.29/manifests/susql-operator.clusterserviceversion.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
98 changes: 98 additions & 0 deletions
98
operators/susql-operator/0.0.29/manifests/susql.ibm.com_labelgroups.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,98 @@ | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.14.0 | ||
creationTimestamp: null | ||
name: labelgroups.susql.ibm.com | ||
spec: | ||
group: susql.ibm.com | ||
names: | ||
kind: LabelGroup | ||
listKind: LabelGroupList | ||
plural: labelgroups | ||
singular: labelgroup | ||
scope: Namespaced | ||
versions: | ||
- name: v1 | ||
schema: | ||
openAPIV3Schema: | ||
description: LabelGroup is the Schema for the LabelGroups 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: LabelGroupSpec defines the desired state of LabelGroup | ||
properties: | ||
disableUsingMostRecentValue: | ||
description: Do not use the most recent value stored in the database | ||
type: boolean | ||
labels: | ||
description: List of labels to be tracked for energy measurments (up | ||
to 5) | ||
items: | ||
type: string | ||
type: array | ||
type: object | ||
status: | ||
description: LabelGroupStatus defines the observed state of LabelGroup | ||
properties: | ||
activeContainerIds: | ||
additionalProperties: | ||
type: number | ||
description: Active containers associated with these set of labels | ||
type: object | ||
kubernetesLabels: | ||
additionalProperties: | ||
type: string | ||
description: SusQL Kubernetes labels constructed from the spec | ||
type: object | ||
phase: | ||
description: Transition phase of the LabelGroup | ||
type: string | ||
prometheusLabels: | ||
additionalProperties: | ||
type: string | ||
description: SusQL Prometheus labels constructed from the spec | ||
type: object | ||
susqlPrometheusCarbonQuery: | ||
description: Prometheus query to get the total CO2 for this LabelGroup | ||
type: string | ||
susqlPrometheusEnergyQuery: | ||
description: Prometheus query to get the total energy for this LabelGroup | ||
type: string | ||
totalCarbon: | ||
description: TotalCarbon keeps track of the accumulated grams of carbon | ||
dioxide emission over time | ||
type: string | ||
totalEnergy: | ||
description: TotalEnergy keeps track of the accumulated energy over | ||
time | ||
type: string | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} | ||
status: | ||
acceptedNames: | ||
kind: "" | ||
plural: "" | ||
conditions: null | ||
storedVersions: null |
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,17 @@ | ||
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: susql-operator | ||
operators.operatorframework.io.bundle.channels.v1: alpha | ||
operators.operatorframework.io.metrics.builder: operator-sdk-v1.36.1 | ||
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 | ||
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v4 | ||
|
||
# Annotations for testing. | ||
operators.operatorframework.io.test.mediatype.v1: scorecard+v1 | ||
operators.operatorframework.io.test.config.v1: tests/scorecard/ | ||
|
||
# Annotations for OpenShift version | ||
com.redhat.openshift.versions: "v4.12-v4.16" |
70 changes: 70 additions & 0 deletions
70
operators/susql-operator/0.0.29/tests/scorecard/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,70 @@ | ||
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.33.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.33.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.33.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.33.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.33.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.33.0 | ||
labels: | ||
suite: olm | ||
test: olm-status-descriptors-test | ||
storage: | ||
spec: | ||
mountPath: {} | ||
storage: | ||
spec: | ||
mountPath: {} |