Skip to content

Commit 23c78d7

Browse files
Merge branch 'master' into release
2 parents 1393f40 + 1e1e9d7 commit 23c78d7

File tree

96 files changed

+9000
-1635
lines changed

Some content is hidden

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

96 files changed

+9000
-1635
lines changed

.github/mergify.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
defaults:
3+
actions:
4+
queue:
5+
name: default
6+
method: rebase
7+
update_method: rebase
8+
9+
10+
# each test should be listed separately, do not use regular expressions:
11+
# https://docs.mergify.io/conditions.html#validating-all-status-check
12+
# TODO: Use mergify's recently added 'shared configuration support'
13+
# to dedup some of the check-x=y repetition in the future.
14+
queue_rules:
15+
- name: default
16+
conditions:
17+
- check-success=check
18+
- check-success=build
19+
- check-success=podmanbuild
20+
- check-success=dockerbuild
21+
- check-success=test
22+
- check-success=test-kubernetes
23+
- check-success=centos-ci/sink-clustered/mini-k8s-latest
24+
- check-success=dpulls
25+
26+
27+
pull_request_rules:
28+
# Clearing approvals after content changes
29+
- name: Remove outdated approvals
30+
conditions:
31+
- base=master
32+
actions:
33+
dismiss_reviews:
34+
approved: true
35+
changes_requested: false
36+
# Perform automatic merge on conditions
37+
- name: Automatic merge on approval
38+
conditions:
39+
- check-success=check
40+
- check-success=build
41+
- check-success=podmanbuild
42+
- check-success=dockerbuild
43+
- check-success=test
44+
- check-success=test-kubernetes
45+
- check-success=centos-ci/sink-clustered/mini-k8s-latest
46+
- check-success=dpulls
47+
- "-draft"
48+
# Contributors should set the 'do-not-merge' label if they don't want
49+
# the PR to be (auto)merged for some reason.
50+
- "label!=do-not-merge"
51+
# A reviewer should set a label starting with 'review-in-progress' (and
52+
# suffixed by their username) in order to indicate a detailed review has been
53+
# started and not completed. This will hold the PR until the label has been
54+
# removed.
55+
- "-label~=^review-in-progress"
56+
- "base=master"
57+
# Even if there are 2 or more approvals we won't automerge if there are
58+
# any changes requested.
59+
- "#changes-requested-reviews-by=0"
60+
- or:
61+
# Any contributor's PR can be automerged with 2 (or more) reviews.
62+
- "#approved-reviews-by>=2"
63+
# A maintainer's contribution that has already aged long enough to
64+
# earn the "priority-review" label can be merged immediately.
65+
# The label can also be applied manually in case of an important
66+
# bugfix, etc.
67+
- and:
68+
- "label=priority-review"
69+
- "author=@maintainers"
70+
- "#approved-reviews-by>=1"
71+
actions:
72+
queue: {}
73+
dismiss_reviews: {}
74+
# Conflict resolution prompt
75+
- name: Ask contributor to resolve a conflict
76+
conditions:
77+
- conflict
78+
actions:
79+
comment:
80+
message: "This pull request now has conflicts with the target branch.
81+
Please resolve these conflicts and force push the updated branch."
82+
# Label PRs that have been sitting there unchanged, aging like a fine wine
83+
#
84+
# NOTE: the updated-at "counter" resets every time the PR is changed so
85+
# reacting to a reviewer's feedback and fixing a typo (for example) will
86+
# reset the counter. Thus we now apply a label once we hit the 15 day window
87+
# so that we know that PR had, at some time, sat unchanged for that long.
88+
- name: Label aged PRs
89+
conditions:
90+
- "updated-at<15 days ago"
91+
- "-draft"
92+
actions:
93+
label:
94+
add:
95+
- "priority-review"

.github/workflows/main.yml

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,43 @@ jobs:
1111
build:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/setup-go@v2
14+
- uses: actions/setup-go@v3
1515
with:
16-
go-version: "1.16"
17-
- uses: actions/checkout@v2
16+
go-version: "1.18"
17+
- uses: actions/checkout@v3
1818
- name: Build
1919
run: make
2020
# Run static/code-quality checks
2121
check:
2222
runs-on: ubuntu-latest
2323
steps:
24-
- uses: actions/setup-go@v2
24+
- uses: actions/setup-go@v3
2525
with:
26-
go-version: "1.16"
27-
- uses: actions/checkout@v2
26+
go-version: "1.18"
27+
- uses: actions/checkout@v3
2828
- name: Install revive
2929
run: go install github.com/mgechev/revive@latest
3030
- name: Run checks
3131
run: make check
32+
check-commits:
33+
runs-on: ubuntu-latest
34+
if: github.event_name == 'pull_request'
35+
steps:
36+
- uses: actions/checkout@v3
37+
with:
38+
fetch-depth: 0
39+
ref: ${{ github.event.pull_request.head.sha }}
40+
- name: Ensure branches
41+
run: git fetch
42+
- name: Lint git commit messages
43+
run: make check-gitlint
3244
test:
3345
runs-on: ubuntu-latest
3446
steps:
35-
- uses: actions/setup-go@v2
47+
- uses: actions/setup-go@v3
3648
with:
37-
go-version: "1.16"
38-
- uses: actions/checkout@v2
49+
go-version: "1.18"
50+
- uses: actions/checkout@v3
3951
- name: run the tests
4052
run: make test
4153
podmanbuild:
@@ -44,7 +56,7 @@ jobs:
4456
# image build step, so no need to do it twice.
4557
if: github.event_name == 'pull_request'
4658
steps:
47-
- uses: actions/checkout@v2
59+
- uses: actions/checkout@v3
4860
- name: Install fuse-overlayfs
4961
run: sudo apt-get -y install fuse-overlayfs
5062
- name: Setup podman config
@@ -72,7 +84,7 @@ jobs:
7284
# image build step, so no need to do it twice.
7385
if: github.event_name == 'pull_request'
7486
steps:
75-
- uses: actions/checkout@v2
87+
- uses: actions/checkout@v3
7688
- name: build container image
7789
# note: forcing use of podman here since we are
7890
# using podman explicitly for the push job
@@ -85,10 +97,10 @@ jobs:
8597
CONTAINER_CMD: docker
8698
PR_NUM: ${{ github.event.pull_request.number }}
8799
steps:
88-
- uses: actions/checkout@v2
89-
- uses: actions/setup-go@v2
100+
- uses: actions/checkout@v3
101+
- uses: actions/setup-go@v3
90102
with:
91-
go-version: "1.16"
103+
go-version: "1.18"
92104
- name: Install k3d
93105
run: curl -L --silent --fail "https://raw.githubusercontent.com/rancher/k3d/main/install.sh" | bash
94106
# The TAG env var can interfere with the k3d install script.
@@ -140,7 +152,7 @@ jobs:
140152
runs-on: ubuntu-latest
141153
if: github.event_name == 'push'
142154
steps:
143-
- uses: actions/checkout@v2
155+
- uses: actions/checkout@v3
144156
- name: log in to quay.io
145157
# using docker for now, since podman has an issue with space
146158
# consumption: image build fails with no space left on device...

.gitlint

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# Edit this file as you like.
2+
#
3+
# All these sections are optional. Each section with the exception of [general] represents
4+
# one rule and each key in it is an option for that specific rule.
5+
#
6+
# Rules and sections can be referenced by their full name or by id. For example
7+
# section "[body-max-line-length]" could also be written as "[B1]". Full section names are
8+
# used in here for clarity.
9+
#
10+
[general]
11+
# Ignore certain rules, this example uses both full name and id
12+
# ignore=title-trailing-punctuation, T3
13+
14+
# verbosity should be a value between 1 and 3, the commandline -v flags take precedence over this
15+
verbosity=3
16+
17+
# By default gitlint will ignore merge, revert, fixup and squash commits.
18+
ignore-merge-commits=true
19+
# ignore-revert-commits=true
20+
# ignore-fixup-commits=true
21+
# ignore-squash-commits=true
22+
23+
# Ignore any data send to gitlint via stdin
24+
# ignore-stdin=true
25+
26+
# Fetch additional meta-data from the local repository when manually passing a
27+
# commit message to gitlint via stdin or --commit-msg. Disabled by default.
28+
# staged=true
29+
30+
# Enable debug mode (prints more output). Disabled by default.
31+
# debug=true
32+
33+
# Enable community contributed rules
34+
# See http://jorisroovers.github.io/gitlint/contrib_rules for details
35+
# contrib=contrib-body-requires-signed-off-by
36+
37+
# Set the extra-path where gitlint will search for user defined rules
38+
# See http://jorisroovers.github.io/gitlint/user_defined_rules for details
39+
# extra-path=examples/
40+
41+
# This is an example of how to configure the "title-max-length" rule and
42+
# set the line-length it enforces to 80
43+
[title-max-length]
44+
line-length=72
45+
46+
# Conversely, you can also enforce minimal length of a title with the
47+
# "title-min-length" rule:
48+
# [title-min-length]
49+
# min-length=5
50+
51+
[title-must-not-contain-word]
52+
# Comma-separated list of words that should not occur in the title. Matching is case
53+
# insensitive. It's fine if the keyword occurs as part of a larger word (so "WIPING"
54+
# will not cause a violation, but "WIP: my title" will.
55+
words=wip,WIP
56+
57+
[title-match-regex]
58+
# python-style regex that the commit-msg title must match
59+
# Note that the regex can contradict with other rules if not used correctly
60+
# (e.g. title-must-not-contain-word).
61+
regex=^.*
62+
63+
# [body-max-line-length]
64+
# line-length=72
65+
66+
# [body-min-length]
67+
# min-length=5
68+
69+
# [body-is-missing]
70+
# Whether to ignore this rule on merge commits (which typically only have a title)
71+
# default = True
72+
# ignore-merge-commits=false
73+
74+
# [body-changed-file-mention]
75+
# List of files that need to be explicitly mentioned in the body when they are changed
76+
# This is useful for when developers often erroneously edit certain files or git submodules.
77+
# By specifying this rule, developers can only change the file when they explicitly reference
78+
# it in the commit message.
79+
# files=gitlint/rules.py,README.md
80+
81+
# [body-match-regex]
82+
# python-style regex that the commit-msg body must match.
83+
# E.g. body must end in My-Commit-Tag: foo
84+
# regex=My-Commit-Tag: foo$
85+
86+
# [author-valid-email]
87+
# python-style regex that the commit author email address must match.
88+
# For example, use the following regex if you only want to allow email addresses from foo.com
89+
# regex=[^@][email protected]
90+
91+
# [ignore-by-title]
92+
# Ignore certain rules for commits of which the title matches a regex
93+
# E.g. Match commit titles that start with "Release"
94+
# regex=^Release(.*)
95+
96+
# Ignore certain rules, you can reference them by their id or by their full name
97+
# Use 'all' to ignore all rules
98+
# ignore=T1,body-min-length
99+
100+
# [ignore-by-body]
101+
# Ignore certain rules for commits of which the body has a line that matches a regex
102+
# E.g. Match bodies that have a line that that contain "release"
103+
# regex=(.*)release(.*)
104+
#
105+
# Ignore certain rules, you can reference them by their id or by their full name
106+
# Use 'all' to ignore all rules
107+
# ignore=T1,body-min-length
108+
109+
# [ignore-body-lines]
110+
# Ignore certain lines in a commit body that match a regex.
111+
# E.g. Ignore all lines that start with 'Co-Authored-By'
112+
# regex=^Co-Authored-By
113+
114+
# This is a contrib rule - a community contributed rule. These are disabled by default.
115+
# You need to explicitly enable them one-by-one by adding them to the "contrib" option
116+
# under [general] section above.
117+
# [contrib-title-conventional-commits]
118+
# Specify allowed commit types. For details see: https://www.conventionalcommits.org/
119+
# types = bugfix,user-story,epic

.golangci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ linters:
55
disable-all: true
66
enable:
77
- asciicheck
8-
- deadcode
8+
# - deadcode
99
- depguard
1010
- dupl
1111
- errcheck
@@ -30,7 +30,7 @@ linters:
3030
# - nolintlint
3131
- revive
3232
- staticcheck
33-
- structcheck
33+
# - structcheck
3434
# - tagliatelle
3535
# - testpackage
3636
- typecheck

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} GO111MODULE=on \
2424
-ldflags "-X main.Version=${GIT_VERSION} -X main.CommitID=${COMMIT_ID}" \
2525
-o manager main.go
2626

27-
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
27+
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest
28+
LABEL org.opencontainers.image.title="Samba operator"
29+
LABEL org.opencontainers.image.vendor="Samba in Kubernetes"
30+
LABEL org.opencontainers.image.url="https://github.com/samba-in-kubernetes/samba-operator"
2831

2932
WORKDIR /
3033
COPY --from=builder /workspace/manager .

0 commit comments

Comments
 (0)