Skip to content

Commit 448129b

Browse files
committed
Added CI
1 parent 5927510 commit 448129b

15 files changed

+53323
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request: {}
8+
9+
jobs:
10+
operator-pr:
11+
name: Version
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Operator PR
20+
uses: ./
21+
env:
22+
GITHUB_TOKEN: "${{ secrets.GHA_TOKEN }}"
23+
with:
24+
name: "mariadb-operator"
25+
version: "test"
26+
fork-repo-name: "mariadb-operator/test-operators"
27+
upstream-repo-name: "redhat-openshift-ecosystem/certified-operators"
28+
bundle-path-dir: "deploy/olm/bundle"
29+
ci-path-file: "deploy/olm/ci.yaml"
30+
user-name: "Martin Montes"
31+
user-email: "[email protected]"
32+
dry-run: true

deploy/olm/ci.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cert_project_id: test

deploy/olm/manifests/k8s.mariadb.com_backups.yaml

Lines changed: 3811 additions & 0 deletions
Large diffs are not rendered by default.

deploy/olm/manifests/k8s.mariadb.com_connections.yaml

Lines changed: 344 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 222 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,222 @@
1+
apiVersion: apiextensions.k8s.io/v1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
annotations:
5+
controller-gen.kubebuilder.io/version: v0.15.0
6+
creationTimestamp: null
7+
name: databases.k8s.mariadb.com
8+
spec:
9+
group: k8s.mariadb.com
10+
names:
11+
kind: Database
12+
listKind: DatabaseList
13+
plural: databases
14+
shortNames:
15+
- dmdb
16+
singular: database
17+
scope: Namespaced
18+
versions:
19+
- additionalPrinterColumns:
20+
- jsonPath: .status.conditions[?(@.type=="Ready")].status
21+
name: Ready
22+
type: string
23+
- jsonPath: .status.conditions[?(@.type=="Ready")].message
24+
name: Status
25+
type: string
26+
- jsonPath: .spec.characterSet
27+
name: CharSet
28+
type: string
29+
- jsonPath: .spec.collate
30+
name: Collate
31+
type: string
32+
- jsonPath: .spec.mariaDbRef.name
33+
name: MariaDB
34+
type: string
35+
- jsonPath: .metadata.creationTimestamp
36+
name: Age
37+
type: date
38+
- jsonPath: .spec.name
39+
name: Name
40+
type: string
41+
name: v1alpha1
42+
schema:
43+
openAPIV3Schema:
44+
description: Database is the Schema for the databases API. It is used to define
45+
a logical database as if you were running a 'CREATE DATABASE' statement.
46+
properties:
47+
apiVersion:
48+
description: |-
49+
APIVersion defines the versioned schema of this representation of an object.
50+
Servers should convert recognized schemas to the latest internal value, and
51+
may reject unrecognized values.
52+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
53+
type: string
54+
kind:
55+
description: |-
56+
Kind is a string value representing the REST resource this object represents.
57+
Servers may infer this from the endpoint the client submits requests to.
58+
Cannot be updated.
59+
In CamelCase.
60+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
61+
type: string
62+
metadata:
63+
type: object
64+
spec:
65+
description: DatabaseSpec defines the desired state of Database
66+
properties:
67+
characterSet:
68+
default: utf8
69+
description: CharacterSet to use in the Database.
70+
type: string
71+
collate:
72+
default: utf8_general_ci
73+
description: Collate to use in the Database.
74+
type: string
75+
mariaDbRef:
76+
description: MariaDBRef is a reference to a MariaDB object.
77+
properties:
78+
apiVersion:
79+
description: API version of the referent.
80+
type: string
81+
fieldPath:
82+
description: |-
83+
If referring to a piece of an object instead of an entire object, this string
84+
should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
85+
For example, if the object reference is to a container within a pod, this would take on a value like:
86+
"spec.containers{name}" (where "name" refers to the name of the container that triggered
87+
the event) or if no container name is specified "spec.containers[2]" (container with
88+
index 2 in this pod). This syntax is chosen only to have some well-defined way of
89+
referencing a part of an object.
90+
TODO: this design is not final and this field is subject to change in the future.
91+
type: string
92+
kind:
93+
description: |-
94+
Kind of the referent.
95+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
96+
type: string
97+
name:
98+
description: |-
99+
Name of the referent.
100+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
101+
type: string
102+
namespace:
103+
description: |-
104+
Namespace of the referent.
105+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
106+
type: string
107+
resourceVersion:
108+
description: |-
109+
Specific resourceVersion to which this reference is made, if any.
110+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
111+
type: string
112+
uid:
113+
description: |-
114+
UID of the referent.
115+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
116+
type: string
117+
waitForIt:
118+
default: true
119+
description: WaitForIt indicates whether the controller using
120+
this reference should wait for MariaDB to be ready.
121+
type: boolean
122+
type: object
123+
x-kubernetes-map-type: atomic
124+
name:
125+
description: Name overrides the default Database name provided by
126+
metadata.name.
127+
maxLength: 80
128+
type: string
129+
requeueInterval:
130+
description: RequeueInterval is used to perform requeue reconciliations.
131+
type: string
132+
retryInterval:
133+
description: RetryInterval is the interval used to perform retries.
134+
type: string
135+
required:
136+
- mariaDbRef
137+
type: object
138+
status:
139+
description: DatabaseStatus defines the observed state of Database
140+
properties:
141+
conditions:
142+
description: Conditions for the Database object.
143+
items:
144+
description: "Condition contains details for one aspect of the current
145+
state of this API Resource.\n---\nThis struct is intended for
146+
direct use as an array at the field path .status.conditions. For
147+
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
148+
observations of a foo's current state.\n\t // Known .status.conditions.type
149+
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
150+
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
151+
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
152+
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
153+
\ // other fields\n\t}"
154+
properties:
155+
lastTransitionTime:
156+
description: |-
157+
lastTransitionTime is the last time the condition transitioned from one status to another.
158+
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
159+
format: date-time
160+
type: string
161+
message:
162+
description: |-
163+
message is a human readable message indicating details about the transition.
164+
This may be an empty string.
165+
maxLength: 32768
166+
type: string
167+
observedGeneration:
168+
description: |-
169+
observedGeneration represents the .metadata.generation that the condition was set based upon.
170+
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
171+
with respect to the current state of the instance.
172+
format: int64
173+
minimum: 0
174+
type: integer
175+
reason:
176+
description: |-
177+
reason contains a programmatic identifier indicating the reason for the condition's last transition.
178+
Producers of specific condition types may define expected values and meanings for this field,
179+
and whether the values are considered a guaranteed API.
180+
The value should be a CamelCase string.
181+
This field may not be empty.
182+
maxLength: 1024
183+
minLength: 1
184+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
185+
type: string
186+
status:
187+
description: status of the condition, one of True, False, Unknown.
188+
enum:
189+
- "True"
190+
- "False"
191+
- Unknown
192+
type: string
193+
type:
194+
description: |-
195+
type of condition in CamelCase or in foo.example.com/CamelCase.
196+
---
197+
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
198+
useful (see .node.status.conditions), the ability to deconflict is important.
199+
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
200+
maxLength: 316
201+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
202+
type: string
203+
required:
204+
- lastTransitionTime
205+
- message
206+
- reason
207+
- status
208+
- type
209+
type: object
210+
type: array
211+
type: object
212+
type: object
213+
served: true
214+
storage: true
215+
subresources:
216+
status: {}
217+
status:
218+
acceptedNames:
219+
kind: ""
220+
plural: ""
221+
conditions: null
222+
storedVersions: null

0 commit comments

Comments
 (0)