Skip to content

Commit d6f9041

Browse files
committed
init: added all files to build and deploy websupport webhook
* Add/Changed all files from cert-manager/example-webhook helm chart to work with our websupport webhook * Added webhook that is able to perform DNS01 challange through websupport DNS API * Added README.md with usage examples * Change .gitingore with the one used in the parent repository * Change OWNERS file to bratislava innovation team * Change licencing to EUPL-1.2 * Added github action Docker workflow, which builds the docker images and stores it in bratislava image repository
0 parents  commit d6f9041

File tree

23 files changed

+2899
-0
lines changed

23 files changed

+2899
-0
lines changed

.github/workflows/build.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build & Push Image
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
env:
8+
IMAGE_NAME: ${{ vars.HARBOR_REGISTRY }}/${{ vars.HARBOR_NAMESPACE }}/${{ github.event.repository.name }}
9+
IMAGE_TAG: ${{ github.ref_name }}
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
packages: write
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v3
19+
- name: Docker meta
20+
id: meta
21+
uses: docker/metadata-action@v4
22+
with:
23+
images: ${{ env.IMAGE_NAME }}
24+
tags: |
25+
${{ env.IMAGE_TAG }}
26+
latest
27+
- name: Setup Docker buildx
28+
uses: docker/setup-buildx-action@v2
29+
- name: Log into registry
30+
if: github.event_name != 'pull_request'
31+
uses: docker/login-action@v2
32+
with:
33+
registry: ${{ vars.HARBOR_REGISTRY }}
34+
username: ${{ secrets.HARBOR_REGISTRY_USERNAME }}
35+
password: ${{ secrets.HARBOR_REGISTRY_PASSWORD }}
36+
- name: Build and push
37+
uses: docker/build-push-action@v3
38+
with:
39+
context: "."
40+
file: "./Dockerfile"
41+
push: true
42+
tags: ${{ steps.meta.outputs.tags }}

.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Binaries for programs and plugins
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.dylib
7+
.idea
8+
# Test binary, build with `go test -c`
9+
*.test
10+
11+
# Output of the go coverage tool, specifically when used with LiteIDE
12+
*.out
13+
14+
# Ignore the built binary
15+
cert-manager-webhook-example
16+
17+
# Make artifacts
18+
_out
19+
_test

Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM golang:1.18-alpine AS build_deps
2+
3+
RUN apk add --no-cache git
4+
5+
WORKDIR /workspace
6+
7+
COPY go.mod .
8+
COPY go.sum .
9+
10+
RUN go mod download
11+
12+
FROM build_deps AS build
13+
14+
COPY . .
15+
16+
RUN CGO_ENABLED=0 go build -o webhook -ldflags '-w -extldflags "-static"' .
17+
18+
FROM alpine:3.9
19+
20+
RUN apk add --no-cache ca-certificates
21+
22+
COPY --from=build /workspace/webhook /usr/local/bin/webhook
23+
24+
ENTRYPOINT ["webhook"]

LICENSE

Lines changed: 291 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,291 @@
1+
EUROPEAN UNION PUBLIC LICENCE v. 1.2
2+
EUPL © the European Union 2007, 2016
3+
4+
This European Union Public Licence (the ‘EUPL’) applies to the Work (as
5+
defined below) which is provided under the terms of this Licence. Any use of
6+
the Work, other than as authorised under this Licence is prohibited (to the
7+
extent such use is covered by a right of the copyright holder of the Work).
8+
9+
The Work is provided under the terms of this Licence when the Licensor (as
10+
defined below) has placed the following notice immediately following the
11+
copyright notice for the Work:
12+
13+
Licensed under the EUPL
14+
15+
or has expressed by any other means his willingness to license under the EUPL.
16+
17+
1. Definitions
18+
19+
In this Licence, the following terms have the following meaning:
20+
21+
- ‘The Licence’: this Licence.
22+
23+
- ‘The Original Work’: the work or software distributed or communicated by the
24+
Licensor under this Licence, available as Source Code and also as Executable
25+
Code as the case may be.
26+
27+
- ‘Derivative Works’: the works or software that could be created by the
28+
Licensee, based upon the Original Work or modifications thereof. This
29+
Licence does not define the extent of modification or dependence on the
30+
Original Work required in order to classify a work as a Derivative Work;
31+
this extent is determined by copyright law applicable in the country
32+
mentioned in Article 15.
33+
34+
- ‘The Work’: the Original Work or its Derivative Works.
35+
36+
- ‘The Source Code’: the human-readable form of the Work which is the most
37+
convenient for people to study and modify.
38+
39+
- ‘The Executable Code’: any code which has generally been compiled and which
40+
is meant to be interpreted by a computer as a program.
41+
42+
- ‘The Licensor’: the natural or legal person that distributes or communicates
43+
the Work under the Licence.
44+
45+
- ‘Contributor(s)’: any natural or legal person who modifies the Work under
46+
the Licence, or otherwise contributes to the creation of a Derivative Work.
47+
48+
- ‘The Licensee’ or ‘You’: any natural or legal person who makes any usage of
49+
the Work under the terms of the Licence.
50+
51+
- ‘Distribution’ or ‘Communication’: any act of selling, giving, lending,
52+
renting, distributing, communicating, transmitting, or otherwise making
53+
available, online or offline, copies of the Work or providing access to its
54+
essential functionalities at the disposal of any other natural or legal
55+
person.
56+
57+
2. Scope of the rights granted by the Licence
58+
59+
The Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
60+
sublicensable licence to do the following, for the duration of copyright
61+
vested in the Original Work:
62+
63+
- use the Work in any circumstance and for all usage,
64+
- reproduce the Work,
65+
- modify the Work, and make Derivative Works based upon the Work,
66+
- communicate to the public, including the right to make available or display
67+
the Work or copies thereof to the public and perform publicly, as the case
68+
may be, the Work,
69+
- distribute the Work or copies thereof,
70+
- lend and rent the Work or copies thereof,
71+
- sublicense rights in the Work or copies thereof.
72+
73+
Those rights can be exercised on any media, supports and formats, whether now
74+
known or later invented, as far as the applicable law permits so.
75+
76+
In the countries where moral rights apply, the Licensor waives his right to
77+
exercise his moral right to the extent allowed by law in order to make
78+
effective the licence of the economic rights here above listed.
79+
80+
The Licensor grants to the Licensee royalty-free, non-exclusive usage rights
81+
to any patents held by the Licensor, to the extent necessary to make use of
82+
the rights granted on the Work under this Licence.
83+
84+
3. Communication of the Source Code
85+
86+
The Licensor may provide the Work either in its Source Code form, or as
87+
Executable Code. If the Work is provided as Executable Code, the Licensor
88+
provides in addition a machine-readable copy of the Source Code of the Work
89+
along with each copy of the Work that the Licensor distributes or indicates,
90+
in a notice following the copyright notice attached to the Work, a repository
91+
where the Source Code is easily and freely accessible for as long as the
92+
Licensor continues to distribute or communicate the Work.
93+
94+
4. Limitations on copyright
95+
96+
Nothing in this Licence is intended to deprive the Licensee of the benefits
97+
from any exception or limitation to the exclusive rights of the rights owners
98+
in the Work, of the exhaustion of those rights or of other applicable
99+
limitations thereto.
100+
101+
5. Obligations of the Licensee
102+
103+
The grant of the rights mentioned above is subject to some restrictions and
104+
obligations imposed on the Licensee. Those obligations are the following:
105+
106+
Attribution right: The Licensee shall keep intact all copyright, patent or
107+
trademarks notices and all notices that refer to the Licence and to the
108+
disclaimer of warranties. The Licensee must include a copy of such notices and
109+
a copy of the Licence with every copy of the Work he/she distributes or
110+
communicates. The Licensee must cause any Derivative Work to carry prominent
111+
notices stating that the Work has been modified and the date of modification.
112+
113+
Copyleft clause: If the Licensee distributes or communicates copies of the
114+
Original Works or Derivative Works, this Distribution or Communication will be
115+
done under the terms of this Licence or of a later version of this Licence
116+
unless the Original Work is expressly distributed only under this version of
117+
the Licence — for example by communicating ‘EUPL v. 1.2 only’. The Licensee
118+
(becoming Licensor) cannot offer or impose any additional terms or conditions
119+
on the Work or Derivative Work that alter or restrict the terms of the
120+
Licence.
121+
122+
Compatibility clause: If the Licensee Distributes or Communicates Derivative
123+
Works or copies thereof based upon both the Work and another work licensed
124+
under a Compatible Licence, this Distribution or Communication can be done
125+
under the terms of this Compatible Licence. For the sake of this clause,
126+
‘Compatible Licence’ refers to the licences listed in the appendix attached to
127+
this Licence. Should the Licensee's obligations under the Compatible Licence
128+
conflict with his/her obligations under this Licence, the obligations of the
129+
Compatible Licence shall prevail.
130+
131+
Provision of Source Code: When distributing or communicating copies of the
132+
Work, the Licensee will provide a machine-readable copy of the Source Code or
133+
indicate a repository where this Source will be easily and freely available
134+
for as long as the Licensee continues to distribute or communicate the Work.
135+
136+
Legal Protection: This Licence does not grant permission to use the trade
137+
names, trademarks, service marks, or names of the Licensor, except as required
138+
for reasonable and customary use in describing the origin of the Work and
139+
reproducing the content of the copyright notice.
140+
141+
6. Chain of Authorship
142+
143+
The original Licensor warrants that the copyright in the Original Work granted
144+
hereunder is owned by him/her or licensed to him/her and that he/she has the
145+
power and authority to grant the Licence.
146+
147+
Each Contributor warrants that the copyright in the modifications he/she
148+
brings to the Work are owned by him/her or licensed to him/her and that he/she
149+
has the power and authority to grant the Licence.
150+
151+
Each time You accept the Licence, the original Licensor and subsequent
152+
Contributors grant You a licence to their contributions to the Work, under the
153+
terms of this Licence.
154+
155+
7. Disclaimer of Warranty
156+
157+
The Work is a work in progress, which is continuously improved by numerous
158+
Contributors. It is not a finished work and may therefore contain defects or
159+
‘bugs’ inherent to this type of development.
160+
161+
For the above reason, the Work is provided under the Licence on an ‘as is’
162+
basis and without warranties of any kind concerning the Work, including
163+
without limitation merchantability, fitness for a particular purpose, absence
164+
of defects or errors, accuracy, non-infringement of intellectual property
165+
rights other than copyright as stated in Article 6 of this Licence.
166+
167+
This disclaimer of warranty is an essential part of the Licence and a
168+
condition for the grant of any rights to the Work.
169+
170+
8. Disclaimer of Liability
171+
172+
Except in the cases of wilful misconduct or damages directly caused to natural
173+
persons, the Licensor will in no event be liable for any direct or indirect,
174+
material or moral, damages of any kind, arising out of the Licence or of the
175+
use of the Work, including without limitation, damages for loss of goodwill,
176+
work stoppage, computer failure or malfunction, loss of data or any commercial
177+
damage, even if the Licensor has been advised of the possibility of such
178+
damage. However, the Licensor will be liable under statutory product liability
179+
laws as far such laws apply to the Work.
180+
181+
9. Additional agreements
182+
183+
While distributing the Work, You may choose to conclude an additional
184+
agreement, defining obligations or services consistent with this Licence.
185+
However, if accepting obligations, You may act only on your own behalf and on
186+
your sole responsibility, not on behalf of the original Licensor or any other
187+
Contributor, and only if You agree to indemnify, defend, and hold each
188+
Contributor harmless for any liability incurred by, or claims asserted against
189+
such Contributor by the fact You have accepted any warranty or additional
190+
liability.
191+
192+
10. Acceptance of the Licence
193+
194+
The provisions of this Licence can be accepted by clicking on an icon ‘I
195+
agree’ placed under the bottom of a window displaying the text of this Licence
196+
or by affirming consent in any other similar way, in accordance with the rules
197+
of applicable law. Clicking on that icon indicates your clear and irrevocable
198+
acceptance of this Licence and all of its terms and conditions.
199+
200+
Similarly, you irrevocably accept this Licence and all of its terms and
201+
conditions by exercising any rights granted to You by Article 2 of this
202+
Licence, such as the use of the Work, the creation by You of a Derivative Work
203+
or the Distribution or Communication by You of the Work or copies thereof.
204+
205+
11. Information to the public
206+
207+
In case of any Distribution or Communication of the Work by means of
208+
electronic communication by You (for example, by offering to download the Work
209+
from a remote location) the distribution channel or media (for example, a
210+
website) must at least provide to the public the information requested by the
211+
applicable law regarding the Licensor, the Licence and the way it may be
212+
accessible, concluded, stored and reproduced by the Licensee.
213+
214+
12. Termination of the Licence
215+
216+
The Licence and the rights granted hereunder will terminate automatically upon
217+
any breach by the Licensee of the terms of the Licence.
218+
219+
Such a termination will not terminate the licences of any person who has
220+
received the Work from the Licensee under the Licence, provided such persons
221+
remain in full compliance with the Licence.
222+
223+
13. Miscellaneous
224+
225+
Without prejudice of Article 9 above, the Licence represents the complete
226+
agreement between the Parties as to the Work.
227+
228+
If any provision of the Licence is invalid or unenforceable under applicable
229+
law, this will not affect the validity or enforceability of the Licence as a
230+
whole. Such provision will be construed or reformed so as necessary to make it
231+
valid and enforceable.
232+
233+
The European Commission may publish other linguistic versions or new versions
234+
of this Licence or updated versions of the Appendix, so far this is required
235+
and reasonable, without reducing the scope of the rights granted by the
236+
Licence. New versions of the Licence will be published with a unique version
237+
number.
238+
239+
All linguistic versions of this Licence, approved by the European Commission,
240+
have identical value. Parties can take advantage of the linguistic version of
241+
their choice.
242+
243+
14. Jurisdiction
244+
245+
Without prejudice to specific agreement between parties,
246+
247+
- any litigation resulting from the interpretation of this License, arising
248+
between the European Union institutions, bodies, offices or agencies, as a
249+
Licensor, and any Licensee, will be subject to the jurisdiction of the Court
250+
of Justice of the European Union, as laid down in article 272 of the Treaty
251+
on the Functioning of the European Union,
252+
253+
- any litigation arising between other parties and resulting from the
254+
interpretation of this License, will be subject to the exclusive
255+
jurisdiction of the competent court where the Licensor resides or conducts
256+
its primary business.
257+
258+
15. Applicable Law
259+
260+
Without prejudice to specific agreement between parties,
261+
262+
- this Licence shall be governed by the law of the European Union Member State
263+
where the Licensor has his seat, resides or has his registered office,
264+
265+
- this licence shall be governed by Belgian law if the Licensor has no seat,
266+
residence or registered office inside a European Union Member State.
267+
268+
Appendix
269+
270+
‘Compatible Licences’ according to Article 5 EUPL are:
271+
272+
- GNU General Public License (GPL) v. 2, v. 3
273+
- GNU Affero General Public License (AGPL) v. 3
274+
- Open Software License (OSL) v. 2.1, v. 3.0
275+
- Eclipse Public License (EPL) v. 1.0
276+
- CeCILL v. 2.0, v. 2.1
277+
- Mozilla Public Licence (MPL) v. 2
278+
- GNU Lesser General Public Licence (LGPL) v. 2.1, v. 3
279+
- Creative Commons Attribution-ShareAlike v. 3.0 Unported (CC BY-SA 3.0) for
280+
works other than software
281+
- European Union Public Licence (EUPL) v. 1.1, v. 1.2
282+
- Québec Free and Open-Source Licence — Reciprocity (LiLiQ-R) or Strong
283+
Reciprocity (LiLiQ-R+).
284+
285+
The European Commission may update this Appendix to later versions of the
286+
above licences without producing a new version of the EUPL, as long as they
287+
provide the rights granted in Article 2 of this Licence and protect the
288+
covered Source Code from exclusive appropriation.
289+
290+
All other changes or additions to this Appendix require the production of a
291+
new EUPL version.

0 commit comments

Comments
 (0)