Skip to content

Commit 4457115

Browse files
authored
feat: systemd support (#295)
PLAT-417
2 parents 63c54b8 + 54ec399 commit 4457115

84 files changed

Lines changed: 3519 additions & 388 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
.scratch
55
docker/control-plane-dev/data
66
clustertest/data
7+
lima/data
78
.vagrant
89
vagrant-ssh.cfg
910
.terraform

.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ linters:
1616
rules:
1717
- linters:
1818
- errcheck
19+
- staticcheck
1920
path: (.+)_test.go
2021
- linters:
2122
- errcheck

Makefile

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ build: dev-build
347347

348348
.PHONY: dev-build
349349
dev-build:
350-
GOOS=linux go build \
350+
CGO_ENABLED=0 GOOS=linux go build \
351351
-gcflags "all=-N -l" \
352352
-o docker/control-plane-dev/pgedge-control-plane \
353353
$(shell pwd)/server
@@ -406,13 +406,37 @@ dev-teardown: dev-down
406406
api-docs:
407407
WORKSPACE_DIR=$(shell pwd) DEBUG=0 docker compose -f ./docker/control-plane-dev/docker-compose.yaml up api-docs
408408

409+
########################
410+
# lima dev environment #
411+
########################
412+
413+
.PHONY: dev-lima-deploy
414+
dev-lima-deploy:
415+
$(MAKE) -C lima deploy
416+
417+
.PHONY: dev-lima-build
418+
dev-lima-build:
419+
$(MAKE) -C lima build
420+
421+
.PHONY: dev-lima-run
422+
dev-lima-run:
423+
$(MAKE) -C lima run
424+
425+
.PHONY: dev-lima-reset
426+
dev-lima-reset:
427+
$(MAKE) -C lima reset
428+
429+
.PHONY: dev-lima-teardown
430+
dev-lima-teardown:
431+
$(MAKE) -C lima teardown
432+
409433
#################################
410434
# docker compose ci environment #
411435
#################################
412436

413437
.PHONY: ci-compose-build
414438
ci-compose-build:
415-
GOOS=linux go build \
439+
CGO_ENABLED=0 GOOS=linux go build \
416440
-gcflags "all=-N -l" \
417441
-o docker/control-plane-ci/pgedge-control-plane \
418442
$(shell pwd)/server

NOTICE.txt

Lines changed: 248 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,9 +1248,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12481248

12491249
```
12501250

1251-
## github.com/coreos/go-systemd/v22/journal
1251+
## github.com/coreos/go-systemd/v22
12521252

1253-
* Name: github.com/coreos/go-systemd/v22/journal
1253+
* Name: github.com/coreos/go-systemd/v22
12541254
* Version: v22.5.0
12551255
* License: [Apache-2.0](https://github.com/coreos/go-systemd/blob/v22.5.0/LICENSE)
12561256

@@ -2414,6 +2414,217 @@ SOFTWARE.
24142414

24152415
```
24162416

2417+
## github.com/elastic/gosigar
2418+
2419+
* Name: github.com/elastic/gosigar
2420+
* Version: v0.14.3
2421+
* License: [Apache-2.0](https://github.com/elastic/gosigar/blob/v0.14.3/LICENSE)
2422+
2423+
```
2424+
Apache License
2425+
Version 2.0, January 2004
2426+
http://www.apache.org/licenses/
2427+
2428+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
2429+
2430+
1. Definitions.
2431+
2432+
"License" shall mean the terms and conditions for use, reproduction,
2433+
and distribution as defined by Sections 1 through 9 of this document.
2434+
2435+
"Licensor" shall mean the copyright owner or entity authorized by
2436+
the copyright owner that is granting the License.
2437+
2438+
"Legal Entity" shall mean the union of the acting entity and all
2439+
other entities that control, are controlled by, or are under common
2440+
control with that entity. For the purposes of this definition,
2441+
"control" means (i) the power, direct or indirect, to cause the
2442+
direction or management of such entity, whether by contract or
2443+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
2444+
outstanding shares, or (iii) beneficial ownership of such entity.
2445+
2446+
"You" (or "Your") shall mean an individual or Legal Entity
2447+
exercising permissions granted by this License.
2448+
2449+
"Source" form shall mean the preferred form for making modifications,
2450+
including but not limited to software source code, documentation
2451+
source, and configuration files.
2452+
2453+
"Object" form shall mean any form resulting from mechanical
2454+
transformation or translation of a Source form, including but
2455+
not limited to compiled object code, generated documentation,
2456+
and conversions to other media types.
2457+
2458+
"Work" shall mean the work of authorship, whether in Source or
2459+
Object form, made available under the License, as indicated by a
2460+
copyright notice that is included in or attached to the work
2461+
(an example is provided in the Appendix below).
2462+
2463+
"Derivative Works" shall mean any work, whether in Source or Object
2464+
form, that is based on (or derived from) the Work and for which the
2465+
editorial revisions, annotations, elaborations, or other modifications
2466+
represent, as a whole, an original work of authorship. For the purposes
2467+
of this License, Derivative Works shall not include works that remain
2468+
separable from, or merely link (or bind by name) to the interfaces of,
2469+
the Work and Derivative Works thereof.
2470+
2471+
"Contribution" shall mean any work of authorship, including
2472+
the original version of the Work and any modifications or additions
2473+
to that Work or Derivative Works thereof, that is intentionally
2474+
submitted to Licensor for inclusion in the Work by the copyright owner
2475+
or by an individual or Legal Entity authorized to submit on behalf of
2476+
the copyright owner. For the purposes of this definition, "submitted"
2477+
means any form of electronic, verbal, or written communication sent
2478+
to the Licensor or its representatives, including but not limited to
2479+
communication on electronic mailing lists, source code control systems,
2480+
and issue tracking systems that are managed by, or on behalf of, the
2481+
Licensor for the purpose of discussing and improving the Work, but
2482+
excluding communication that is conspicuously marked or otherwise
2483+
designated in writing by the copyright owner as "Not a Contribution."
2484+
2485+
"Contributor" shall mean Licensor and any individual or Legal Entity
2486+
on behalf of whom a Contribution has been received by Licensor and
2487+
subsequently incorporated within the Work.
2488+
2489+
2. Grant of Copyright License. Subject to the terms and conditions of
2490+
this License, each Contributor hereby grants to You a perpetual,
2491+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
2492+
copyright license to reproduce, prepare Derivative Works of,
2493+
publicly display, publicly perform, sublicense, and distribute the
2494+
Work and such Derivative Works in Source or Object form.
2495+
2496+
3. Grant of Patent License. Subject to the terms and conditions of
2497+
this License, each Contributor hereby grants to You a perpetual,
2498+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
2499+
(except as stated in this section) patent license to make, have made,
2500+
use, offer to sell, sell, import, and otherwise transfer the Work,
2501+
where such license applies only to those patent claims licensable
2502+
by such Contributor that are necessarily infringed by their
2503+
Contribution(s) alone or by combination of their Contribution(s)
2504+
with the Work to which such Contribution(s) was submitted. If You
2505+
institute patent litigation against any entity (including a
2506+
cross-claim or counterclaim in a lawsuit) alleging that the Work
2507+
or a Contribution incorporated within the Work constitutes direct
2508+
or contributory patent infringement, then any patent licenses
2509+
granted to You under this License for that Work shall terminate
2510+
as of the date such litigation is filed.
2511+
2512+
4. Redistribution. You may reproduce and distribute copies of the
2513+
Work or Derivative Works thereof in any medium, with or without
2514+
modifications, and in Source or Object form, provided that You
2515+
meet the following conditions:
2516+
2517+
(a) You must give any other recipients of the Work or
2518+
Derivative Works a copy of this License; and
2519+
2520+
(b) You must cause any modified files to carry prominent notices
2521+
stating that You changed the files; and
2522+
2523+
(c) You must retain, in the Source form of any Derivative Works
2524+
that You distribute, all copyright, patent, trademark, and
2525+
attribution notices from the Source form of the Work,
2526+
excluding those notices that do not pertain to any part of
2527+
the Derivative Works; and
2528+
2529+
(d) If the Work includes a "NOTICE" text file as part of its
2530+
distribution, then any Derivative Works that You distribute must
2531+
include a readable copy of the attribution notices contained
2532+
within such NOTICE file, excluding those notices that do not
2533+
pertain to any part of the Derivative Works, in at least one
2534+
of the following places: within a NOTICE text file distributed
2535+
as part of the Derivative Works; within the Source form or
2536+
documentation, if provided along with the Derivative Works; or,
2537+
within a display generated by the Derivative Works, if and
2538+
wherever such third-party notices normally appear. The contents
2539+
of the NOTICE file are for informational purposes only and
2540+
do not modify the License. You may add Your own attribution
2541+
notices within Derivative Works that You distribute, alongside
2542+
or as an addendum to the NOTICE text from the Work, provided
2543+
that such additional attribution notices cannot be construed
2544+
as modifying the License.
2545+
2546+
You may add Your own copyright statement to Your modifications and
2547+
may provide additional or different license terms and conditions
2548+
for use, reproduction, or distribution of Your modifications, or
2549+
for any such Derivative Works as a whole, provided Your use,
2550+
reproduction, and distribution of the Work otherwise complies with
2551+
the conditions stated in this License.
2552+
2553+
5. Submission of Contributions. Unless You explicitly state otherwise,
2554+
any Contribution intentionally submitted for inclusion in the Work
2555+
by You to the Licensor shall be under the terms and conditions of
2556+
this License, without any additional terms or conditions.
2557+
Notwithstanding the above, nothing herein shall supersede or modify
2558+
the terms of any separate license agreement you may have executed
2559+
with Licensor regarding such Contributions.
2560+
2561+
6. Trademarks. This License does not grant permission to use the trade
2562+
names, trademarks, service marks, or product names of the Licensor,
2563+
except as required for reasonable and customary use in describing the
2564+
origin of the Work and reproducing the content of the NOTICE file.
2565+
2566+
7. Disclaimer of Warranty. Unless required by applicable law or
2567+
agreed to in writing, Licensor provides the Work (and each
2568+
Contributor provides its Contributions) on an "AS IS" BASIS,
2569+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
2570+
implied, including, without limitation, any warranties or conditions
2571+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
2572+
PARTICULAR PURPOSE. You are solely responsible for determining the
2573+
appropriateness of using or redistributing the Work and assume any
2574+
risks associated with Your exercise of permissions under this License.
2575+
2576+
8. Limitation of Liability. In no event and under no legal theory,
2577+
whether in tort (including negligence), contract, or otherwise,
2578+
unless required by applicable law (such as deliberate and grossly
2579+
negligent acts) or agreed to in writing, shall any Contributor be
2580+
liable to You for damages, including any direct, indirect, special,
2581+
incidental, or consequential damages of any character arising as a
2582+
result of this License or out of the use or inability to use the
2583+
Work (including but not limited to damages for loss of goodwill,
2584+
work stoppage, computer failure or malfunction, or any and all
2585+
other commercial damages or losses), even if such Contributor
2586+
has been advised of the possibility of such damages.
2587+
2588+
9. Accepting Warranty or Additional Liability. While redistributing
2589+
the Work or Derivative Works thereof, You may choose to offer,
2590+
and charge a fee for, acceptance of support, warranty, indemnity,
2591+
or other liability obligations and/or rights consistent with this
2592+
License. However, in accepting such obligations, You may act only
2593+
on Your own behalf and on Your sole responsibility, not on behalf
2594+
of any other Contributor, and only if You agree to indemnify,
2595+
defend, and hold each Contributor harmless for any liability
2596+
incurred by, or claims asserted against, such Contributor by reason
2597+
of your accepting any such warranty or additional liability.
2598+
2599+
END OF TERMS AND CONDITIONS
2600+
2601+
APPENDIX: How to apply the Apache License to your work.
2602+
2603+
To apply the Apache License to your work, attach the following
2604+
boilerplate notice, with the fields enclosed by brackets "[]"
2605+
replaced with your own identifying information. (Don't include
2606+
the brackets!) The text should be enclosed in the appropriate
2607+
comment syntax for the file format. We also recommend that a
2608+
file or class name and description of purpose be included on the
2609+
same "printed page" as the copyright notice for easier
2610+
identification within third-party archives.
2611+
2612+
Copyright [yyyy] [name of copyright owner]
2613+
2614+
Licensed under the Apache License, Version 2.0 (the "License");
2615+
you may not use this file except in compliance with the License.
2616+
You may obtain a copy of the License at
2617+
2618+
http://www.apache.org/licenses/LICENSE-2.0
2619+
2620+
Unless required by applicable law or agreed to in writing, software
2621+
distributed under the License is distributed on an "AS IS" BASIS,
2622+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2623+
See the License for the specific language governing permissions and
2624+
limitations under the License.
2625+
2626+
```
2627+
24172628
## github.com/fatih/structs
24182629

24192630
* Name: github.com/fatih/structs
@@ -3070,6 +3281,41 @@ SOFTWARE.
30703281

30713282
```
30723283

3284+
## github.com/godbus/dbus/v5
3285+
3286+
* Name: github.com/godbus/dbus/v5
3287+
* Version: v5.1.0
3288+
* License: [BSD-2-Clause](https://github.com/godbus/dbus/blob/v5.1.0/LICENSE)
3289+
3290+
```
3291+
Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>), Google
3292+
All rights reserved.
3293+
3294+
Redistribution and use in source and binary forms, with or without
3295+
modification, are permitted provided that the following conditions
3296+
are met:
3297+
3298+
1. Redistributions of source code must retain the above copyright notice,
3299+
this list of conditions and the following disclaimer.
3300+
3301+
2. Redistributions in binary form must reproduce the above copyright
3302+
notice, this list of conditions and the following disclaimer in the
3303+
documentation and/or other materials provided with the distribution.
3304+
3305+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3306+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3307+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3308+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3309+
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3310+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
3311+
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
3312+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
3313+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
3314+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
3315+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3316+
3317+
```
3318+
30733319
## github.com/gogo/protobuf
30743320

30753321
* Name: github.com/gogo/protobuf

api/apiv1/design/database.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ var DatabaseSpec = g.Type("DatabaseSpec", func() {
575575
g.Meta("struct:tag:json", "port,omitempty")
576576
})
577577
g.Attribute("patroni_port", g.Int, func() {
578-
g.Description("The port used by Patroni for this database. NOTE: This field is not currently supported for Docker Swarm.")
578+
g.Description("The port used by Patroni for this database. If the port is 0, each instance will be assigned a random port. NOTE: This field is not currently supported for Docker Swarm.")
579579
g.Minimum(0)
580580
g.Maximum(65535)
581581
g.Example(8888)

api/apiv1/gen/control_plane/service.go

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/apiv1/gen/http/control_plane/client/types.go

Lines changed: 9 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)