Skip to content

Commit d0e3d41

Browse files
thomasquinnsebhoss
authored andcommitted
feat: add planetscale/vitess-operator CRDs
1 parent bd6708c commit d0e3d41

25 files changed

+14394
-0
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# SPDX-FileCopyrightText: The kube-custom-resources-rs Authors
2+
# SPDX-License-Identifier: 0BSD
3+
4+
name: Release planetscale_com
5+
on:
6+
schedule:
7+
- cron: 57 14 * * THU
8+
workflow_dispatch:
9+
jobs:
10+
release:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
steps:
15+
- id: checkout
16+
name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
- id: commits
21+
name: Count Commits
22+
run: echo "count=$(git rev-list --count HEAD --since='last Thursday' -- custom-resources/planetscale_com)" >> $GITHUB_OUTPUT
23+
- id: release
24+
name: Create Release Version
25+
if: steps.commits.outputs.count > 0
26+
run: echo "version=2.$(date --utc +'%Y%m%d').$(date --utc +'%-H%M%S')" >> $GITHUB_OUTPUT
27+
- name: Set up Rust
28+
if: steps.commits.outputs.count > 0
29+
uses: dtolnay/rust-toolchain@stable
30+
- name: Install cargo-workspaces
31+
uses: taiki-e/install-action@v2
32+
with:
33+
tool: cargo-edit
34+
- name: Cargo Version
35+
if: steps.commits.outputs.count > 0
36+
run: cargo set-version --package kcr_planetscale_com ${{ steps.release.outputs.version }}
37+
- name: Publish to crates.io
38+
if: steps.commits.outputs.count > 0
39+
run: >
40+
cargo publish
41+
--allow-dirty
42+
--token ${{ secrets.CRATES_IO_TOKEN }}
43+
--package kcr_planetscale_com
44+
--jobs 1
45+
--no-verify
46+
env:
47+
RUSTFLAGS: "-A warnings"
48+
- id: mail
49+
name: Send Mail
50+
if: steps.commits.outputs.count > 0
51+
uses: dawidd6/action-send-mail@v5
52+
with:
53+
server_address: ${{ secrets.MAIL_SERVER }}
54+
server_port: ${{ secrets.MAIL_PORT }}
55+
username: ${{ secrets.MAIL_USERNAME }}
56+
password: ${{ secrets.MAIL_PASSWORD }}
57+
subject: ${{ github.event.repository.name }}/planetscale_com version ${{ steps.release.outputs.version }} published
58+
body: See ${{ steps.create_release.outputs.url }} for details.
59+
to: ${{ secrets.MAIL_RECIPIENT }}
60+
from: ${{ secrets.MAIL_SENDER }}
61+
- id: matrix
62+
name: Send Matrix Message
63+
if: steps.commits.outputs.count > 0
64+
uses: s3krit/[email protected]
65+
with:
66+
room_id: ${{ secrets.MATRIX_ROOM_ID }}
67+
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
68+
message: ${{ github.event.repository.name }}/planetscale_com version [${{ steps.release.outputs.version }}](${{ steps.create_release.outputs.url }}) published
69+
server: ${{ secrets.MATRIX_SERVER }}

.reuse/dep5

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,6 +1151,10 @@ Files: crd-catalog/perses/perses-operator/*
11511151
Copyright: The perses/perses-operator Authors
11521152
License: Apache-2.0
11531153

1154+
Files: crd-catalog/planetscale/vitess-operator/*
1155+
Copyright: The planetscale/vitess-operator Authors
1156+
License: Apache-2.0
1157+
11541158
Files: crd-catalog/pravega/zookeeper-operator/*
11551159
Copyright: The pravega/zookeeper-operator Authors
11561160
License: Apache-2.0

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ members = [
324324
"custom-resources/pgv2_percona_com",
325325
"custom-resources/pipes_services_k8s_aws",
326326
"custom-resources/pkg_crossplane_io",
327+
"custom-resources/planetscale_com",
327328
"custom-resources/policies_kyverno_io",
328329
"custom-resources/policy_clusterpedia_io",
329330
"custom-resources/policy_karmada_io",

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ The following groups are available:
364364
- [pgv2.percona.com](https://crates.io/crates/kcr_pgv2_percona_com)
365365
- [pipes.services.k8s.aws](https://crates.io/crates/kcr_pipes_services_k8s_aws)
366366
- [pkg.crossplane.io](https://crates.io/crates/kcr_pkg_crossplane_io)
367+
- [planetscale.com](https://crates.io/crates/kcr_planetscale_com)
367368
- [policies.kyverno.io](https://crates.io/crates/kcr_policies_kyverno_io)
368369
- [policy.clusterpedia.io](https://crates.io/crates/kcr_policy_clusterpedia_io)
369370
- [policy.karmada.io](https://crates.io/crates/kcr_policy_karmada_io)

code-generator/src/catalog.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3175,6 +3175,22 @@ pub const CRD_V1_SOURCES: &'static [UpstreamSource] = &[
31753175
],
31763176
ignores: &[],
31773177
},
3178+
UpstreamSource {
3179+
project_name: "planetscale/vitess-operator",
3180+
license: APACHE_V2,
3181+
urls: &[
3182+
"https://github.com/planetscale/vitess-operator/blob/main/deploy/crds/planetscale.com_etcdlockservers.yaml",
3183+
"https://github.com/planetscale/vitess-operator/blob/main/deploy/crds/planetscale.com_vitessbackups.yaml",
3184+
"https://github.com/planetscale/vitess-operator/blob/main/deploy/crds/planetscale.com_vitessbackupschedules.yaml",
3185+
"https://github.com/planetscale/vitess-operator/blob/main/deploy/crds/planetscale.com_vitessbackupstorages.yaml",
3186+
"https://github.com/planetscale/vitess-operator/blob/main/deploy/crds/planetscale.com_vitesscells.yaml",
3187+
"https://github.com/planetscale/vitess-operator/blob/main/deploy/crds/planetscale.com_vitessclusters.yaml",
3188+
"https://github.com/planetscale/vitess-operator/blob/main/deploy/crds/planetscale.com_vitesskeyspaces.yaml",
3189+
"https://github.com/planetscale/vitess-operator/blob/main/deploy/crds/planetscale.com_vitessshards.yaml",
3190+
3191+
],
3192+
ignores: &[],
3193+
},
31783194
UpstreamSource {
31793195
project_name: "pravega/zookeeper-operator",
31803196
license: APACHE_V2,

0 commit comments

Comments
 (0)