Skip to content

Commit b531823

Browse files
committed
Initial commit
1 parent 63ae884 commit b531823

34 files changed

+15582
-7
lines changed

.github/CODEOWNERS.md

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

.github/ISSUE_TEMPLATE/bug-report.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Bug report
3+
about: Tell us about a problem you are experiencing
4+
title: ''
5+
labels: bug, triage
6+
assignees: ''
7+
8+
---
9+
10+
**What steps did you take:**
11+
[A clear and concise description steps that can be used to reproduce the problem.]
12+
13+
**What happened:**
14+
[A small description of the issue]
15+
16+
**What did you expect:**
17+
[A description of what was expected]
18+
19+
**Anything else you would like to add:**
20+
[Additional information that will assist in solving the issue.]
21+
22+
**Environment:**
23+
24+
* Kubernetes version (execute `kubectl version`):
25+
* kctrl version (execute `kctrl version`):
26+
* kapp-controller version (execute `kubectl get deployment -n kapp-controller kapp-controller -o yaml` and the annotation is `kbld.k14s.io/images`):
27+
* package version (execute `kctrl package installed get -i postgresql-operator -n <namespace>`):
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement, triage
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the problem/challenge you have:**
11+
[A description of the current challenge that you are experiencing.]
12+
13+
**Describe the solution you'd like:**
14+
[A clear and concise description of what you want to happen. If applicable a visual representation of the UX.]
15+
16+
**Anything else you would like to add:**
17+
[Additional information that will assist in solving the issue.]
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
name: Other issue or question
3+
about: Free form issue or question
4+
title: ''
5+
labels: triage
6+
assignees: ''
7+
8+
---

.github/workflows/release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release
2+
3+
on:
4+
- workflow_dispatch
5+
6+
jobs:
7+
release:
8+
name: Release
9+
permissions:
10+
actions: read
11+
contents: write
12+
id-token: write
13+
packages: write
14+
uses: kadras-io/github-reusable-workflows/.github/workflows/package-release.yml@main
15+
with:
16+
package-name-slug: postgresql-operator
17+
package-name-display: PostgreSQL Operator
18+
registry-server: ghcr.io
19+
registry-username: ${{ github.actor }}
20+
image: ${{ github.repository }}
21+
version: 1.22.2
22+
secrets:
23+
pull-request-token: ${{ secrets.GH_ORG_PAT }}

.github/workflows/test.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Test
2+
3+
on:
4+
- push
5+
6+
jobs:
7+
test-config:
8+
name: Configuration Tests
9+
permissions:
10+
contents: read
11+
uses: kadras-io/github-reusable-workflows/.github/workflows/carvel-package-test-config.yml@main
12+
13+
test-integration:
14+
name: Integration Tests
15+
strategy:
16+
matrix:
17+
k8s_version: [v1.27, v1.28, v1.29]
18+
permissions:
19+
contents: read
20+
uses: kadras-io/github-reusable-workflows/.github/workflows/carvel-package-test-integration.yml@main
21+
with:
22+
k8s_version: ${{ matrix.k8s_version }}

.gitignore

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
# If you prefer the allow list template instead of the deny list, see community template:
2-
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
3-
#
1+
### Carvel ###
2+
carvel-artifacts/
3+
repo/
4+
schema-openapi.yml
5+
6+
### KUTTL ###
7+
test/integration/kubeconfig
8+
test/integration/kuttl-artifacts
9+
kubeconfig
10+
411
# Binaries for programs and plugins
512
*.exe
613
*.exe~
@@ -17,5 +24,38 @@
1724
# Dependency directories (remove the comment below to include it)
1825
# vendor/
1926

20-
# Go workspace file
21-
go.work
27+
### VS Code ###
28+
.vscode/
29+
30+
#############
31+
### macOS ###
32+
#############
33+
34+
# General
35+
.DS_Store
36+
*.DS_Store
37+
**/.DS_Store
38+
.AppleDouble
39+
.LSOverride
40+
41+
# Icon must end with two \r
42+
Icon
43+
44+
# Thumbnails
45+
._*
46+
47+
# Files that might appear in the root of a volume
48+
.DocumentRevisions-V100
49+
.fseventsd
50+
.Spotlight-V100
51+
.TemporaryItems
52+
.Trashes
53+
.VolumeIcon.icns
54+
.com.apple.timemachine.donotpresent
55+
56+
# Directories potentially created on remote AFP share
57+
.AppleDB
58+
.AppleDesktop
59+
Network Trash Folder
60+
Temporary Items
61+
.apdisk

CODE_OF_CONDUCT.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

MAINTAINERS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Maintainers
2+
3+
* Thomas Vitale | [ThomasVitale](https://github.com/ThomasVitale)

Makefile

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
K8S_VERSION=v1.29
2+
3+
# Build package configuration
4+
build: package
5+
cd package && kctrl package init
6+
7+
# Prepare cluster for development workflow
8+
prepare: test/setup
9+
ytt -f test/setup/assets/namespace.yml | kapp deploy -a ns -f- -y
10+
ytt -f test/setup/assets/rbac.yml | kapp deploy -a rbac -f- -y
11+
kubectl config set-context --current --namespace=tests
12+
13+
# Inner development loop
14+
dev: package
15+
cd package && kctrl dev -f package-resources.yml --local -y
16+
17+
# Clean development environment
18+
clean:
19+
cd package && kctrl dev -f package-resources.yml --local -y --delete
20+
21+
# Process the configuration manifests with ytt
22+
ytt:
23+
ytt --file package/config
24+
25+
# Use ytt to generate an OpenAPI specification
26+
schema:
27+
ytt -f package/config/values-schema.yml --data-values-schema-inspect -o openapi-v3 > schema-openapi.yml
28+
29+
# Use kbld to resolve the OCI images referenced within the manifests
30+
kbld:
31+
rm -f package/.imgpkg/images.yml && mkdir -p package/.imgpkg && kbld --file package/config --imgpkg-lock-output package/.imgpkg/images.yml 1>> /dev/null
32+
33+
# Check the ytt-annotated Kubernetes configuration and its validation
34+
test-config:
35+
ytt -f package/config | kubeconform -ignore-missing-schemas -summary
36+
37+
# Run package integration tests
38+
test-integration: test/integration
39+
kubectl kuttl test --config test/integration/kuttl-test.yml --kind-config test/setup/kind/$(K8S_VERSION)/kind-config.yml

0 commit comments

Comments
 (0)