Skip to content
This repository was archived by the owner on Jan 9, 2025. It is now read-only.

Commit c13cc68

Browse files
committed
extract Servlet code from original project
0 parents  commit c13cc68

File tree

140 files changed

+15311
-0
lines changed

Some content is hidden

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

140 files changed

+15311
-0
lines changed

.gimps.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright 2024 The Kubermatic Kubernetes Platform contributors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# This is the configuration for https://github.com/xrstf/gimps.
16+
17+
importOrder: [std, external, project, kcp, kubernetes]
18+
sets:
19+
- name: kubernetes
20+
patterns:
21+
- 'k8s.io/**'
22+
- '*.k8s.io/**'
23+
- 'github.com/kcp-dev/client-go/**'
24+
- 'github.com/kcp-dev/kubernetes/**'
25+
- name: kcp
26+
patterns:
27+
- 'github.com/kcp-dev/kcp/**'

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/_build/
2+
/vendor/
3+
.cover
4+
*.kubeconfig
5+
*.pem
6+
*.key

.golangci.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Copyright 2024 The Kubermatic Kubernetes Platform contributors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
run:
16+
modules-download-mode: readonly
17+
deadline: 20m
18+
skip-files:
19+
- zz_generated.*.go
20+
21+
linters:
22+
enable:
23+
- asciicheck
24+
- bidichk
25+
- bodyclose
26+
- depguard
27+
- durationcheck
28+
- errcheck
29+
- errname
30+
- errorlint
31+
- exportloopref
32+
- goconst
33+
- gocritic
34+
- gocyclo
35+
- godot
36+
- gofmt
37+
- gosimple
38+
- govet
39+
- importas
40+
- ineffassign
41+
- misspell
42+
- noctx
43+
- nolintlint
44+
- nosprintfhostport
45+
- predeclared
46+
- promlinter
47+
- staticcheck
48+
- tenv
49+
- unconvert
50+
- unused
51+
- wastedassign
52+
- whitespace
53+
disable-all: true
54+
issues:
55+
# defaults to 3, which often needlessly hides issues and forces
56+
# to re-run the linter across the entire repo many times
57+
max-same-issues: 50
58+
59+
# NOTE: Do not use commas in the exclude patterns, or else the regex will be
60+
# split and you will be sad: https://github.com/golangci/golangci-lint/issues/665
61+
exclude:
62+
# gocritic
63+
- singleCaseSwitch # in most cases this is the beginning of a lookup table and should be kept an obvious table
64+
65+
linters-settings:
66+
depguard:
67+
rules:
68+
main:
69+
deny:
70+
- { pkg: io/ioutil, desc: https://go.dev/doc/go1.16#ioutil }
71+
- { pkg: github.com/ghodss/yaml, desc: use sigs.k8s.io/yaml instead }
72+
73+
importas:
74+
no-unaliased: true
75+
alias:
76+
# Servlet APIs
77+
- pkg: k8c.io/servlet/sdk/apis/(\w+)/(v[\w\d]+)
78+
alias: $1$2
79+
# Kubernetes
80+
- pkg: k8s.io/api/(\w+)/(v[\w\d]+)
81+
alias: $1$2
82+
- pkg: k8s.io/apimachinery/pkg/apis/meta/v1
83+
alias: metav1
84+
- pkg: k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1
85+
alias: apiextensionsv1
86+
- pkg: k8s.io/apimachinery/pkg/api/errors
87+
alias: apierrors
88+
- pkg: k8s.io/apimachinery/pkg/util/errors
89+
alias: utilerrors
90+
# Controller Runtime
91+
- pkg: sigs.k8s.io/controller-runtime/pkg/client
92+
alias: ctrlruntimeclient

.wwhrd.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Copyright 2024 The Kubermatic Kubernetes Platform contributors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# To add a license, we follow https://github.com/cncf/foundation/blob/main/allowed-third-party-license-policy.md.
16+
17+
denylist:
18+
- GPL-2.0
19+
- LGPL-3.0
20+
21+
allowlist:
22+
- Apache-2.0
23+
- MIT
24+
- BSD-2-Clause
25+
- BSD-2-Clause-FreeBSD
26+
- BSD-3-Clause
27+
- ISC
28+
29+
exceptions:
30+
- github.com/muhlemmer/gu # public domain, required for zitadel/oidc
31+
- github.com/hashicorp/hcl # MPL 2.0
32+
- github.com/hashicorp/hcl/hcl/ast # MPL 2.0
33+
- github.com/hashicorp/hcl/hcl/parser # MPL 2.0
34+
- github.com/hashicorp/hcl/hcl/printer # MPL 2.0
35+
- github.com/hashicorp/hcl/hcl/scanner # MPL 2.0
36+
- github.com/hashicorp/hcl/hcl/strconv # MPL 2.0
37+
- github.com/hashicorp/hcl/hcl/token # MPL 2.0
38+
- github.com/hashicorp/hcl/json/parser # MPL 2.0
39+
- github.com/hashicorp/hcl/json/scanner # MPL 2.0
40+
- github.com/hashicorp/hcl/json/token # MPL 2.0

CODE_OF_CONDUCT.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Kubermatic Community Code of Conduct
2+
3+
## Contributor Code of Conduct
4+
5+
As contributors and maintainers of this project, and in the interest of fostering
6+
an open and welcoming community, we pledge to respect all people who contribute
7+
through reporting issues, posting feature requests, updating documentation,
8+
submitting pull requests or patches, and other activities.
9+
10+
We are committed to making participation in this project a harassment-free experience for
11+
everyone, regardless of level of experience, gender, gender identity and expression,
12+
sexual orientation, disability, personal appearance, body size, race, ethnicity, age,
13+
religion, or nationality.
14+
15+
Examples of unacceptable behavior by participants include:
16+
17+
* The use of sexualized language or imagery
18+
* Personal attacks
19+
* Trolling or insulting/derogatory comments
20+
* Public or private harassment
21+
* Publishing others' private information, such as physical or electronic addresses,
22+
without explicit permission
23+
* Other unethical or unprofessional conduct.
24+
25+
Project maintainers have the right and responsibility to remove, edit, or reject
26+
comments, commits, code, wiki edits, issues, and other contributions that are not
27+
aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers
28+
commit themselves to fairly and consistently applying these principles to every aspect
29+
of managing this project. Project maintainers who do not follow or enforce the Code of
30+
Conduct may be permanently removed from the project team.
31+
32+
This code of conduct applies both within project spaces and in public spaces
33+
when an individual is representing the project or its community.
34+
35+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the Kubermatic Conduct Committee via [email protected].
36+
37+
This Code of Conduct is adapted from the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md) and [Contributor Covenant](http://contributor-covenant.org/version/1/2/0/), version 1.2.0.

CONTRIBUTING.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# How to Contribute
2+
3+
Kubermatic projects are [Apache 2.0 licensed](LICENSE) and accept contributions via
4+
GitHub pull requests. This document outlines some of the conventions on
5+
development workflow, commit message formatting, contact points and other
6+
resources to make it easier to get your contribution accepted.
7+
8+
## Certificate of Origin
9+
10+
By contributing to this project you agree to the Developer Certificate of
11+
Origin (DCO). This document was created by the Linux Kernel community and is a
12+
simple statement that you, as a contributor, have the legal right to make the
13+
contribution. See the [DCO](DCO) file for details.
14+
15+
Any copyright notices in this repo should specify the authors as "the Kubermatic Developer Platform project contributors".
16+
17+
To sign your work, just add a line like this at the end of your commit message:
18+
19+
```
20+
Signed-off-by: Joe Example <[email protected]>
21+
```
22+
23+
This can easily be done with the `--signoff` option to `git commit`.
24+
25+
Note that we're requiring all commits in a PR to be signed-off. If you already created a PR, you can sign-off all existing commits by rebasing with the `--signoff` flag.
26+
27+
```
28+
git rebase --signoff origin/main
29+
```
30+
31+
By doing this you state that you can certify the following (from https://developercertificate.org/):
32+
```
33+
Developer Certificate of Origin
34+
Version 1.1
35+
36+
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
37+
1 Letterman Drive
38+
Suite D4700
39+
San Francisco, CA, 94129
40+
41+
Everyone is permitted to copy and distribute verbatim copies of this
42+
license document, but changing it is not allowed.
43+
44+
45+
Developer's Certificate of Origin 1.1
46+
47+
By making a contribution to this project, I certify that:
48+
49+
(a) The contribution was created in whole or in part by me and I
50+
have the right to submit it under the open source license
51+
indicated in the file; or
52+
53+
(b) The contribution is based upon previous work that, to the best
54+
of my knowledge, is covered under an appropriate open source
55+
license and I have the right under that license to submit that
56+
work with modifications, whether created in whole or in part
57+
by me, under the same open source license (unless I am
58+
permitted to submit under a different license), as indicated
59+
in the file; or
60+
61+
(c) The contribution was provided directly to me by some other
62+
person who certified (a), (b) or (c) and I have not modified
63+
it.
64+
65+
(d) I understand and agree that this project and the contribution
66+
are public and that a record of the contribution (including all
67+
personal information I submit with it, including my sign-off) is
68+
maintained indefinitely and may be redistributed consistent with
69+
this project or the open source license(s) involved.
70+
```
71+
72+
## Email and Chat
73+
74+
The XXX project currently uses the general Kubermatic email list and Slack channel:
75+
- Email: [kubermatic-dev](https://groups.google.com/forum/#!forum/kubermatic-dev)
76+
- Slack: #[Slack](http://slack.kubermatic.io/) on Slack
77+
78+
Please avoid emailing maintainers found in the MAINTAINERS file directly. They
79+
are very busy and read the mailing lists.
80+
81+
## Reporting a security vulnerability
82+
83+
Due to their public nature, GitHub and mailing lists are not appropriate places for reporting vulnerabilities. If you suspect you have found a security vulnerability, please do not file a GitHub issue, but instead email [email protected] with the full details, including steps to reproduce the issue.
84+
85+
## Getting Started
86+
87+
- Fork the repository on GitHub
88+
- Read the [README](README.md) for build and test instructions
89+
- Play with the project, submit bugs, submit patches!
90+
91+
### Contribution Flow
92+
93+
This is a rough outline of what a contributor's workflow looks like:
94+
95+
- Create a topic branch from where you want to base your work (usually main).
96+
- Make commits of logical units.
97+
- Make sure your commit messages are in the proper format (see below).
98+
- Push your changes to a topic branch in your fork of the repository.
99+
- Make sure the tests pass, and add any new tests as appropriate.
100+
- Submit a pull request to the original repository.
101+
102+
Thanks for your contributions!

DCO

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Developer Certificate of Origin
2+
Version 1.1
3+
4+
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
5+
660 York Street, Suite 102,
6+
San Francisco, CA 94110 USA
7+
8+
Everyone is permitted to copy and distribute verbatim copies of this
9+
license document, but changing it is not allowed.
10+
11+
12+
Developer's Certificate of Origin 1.1
13+
14+
By making a contribution to this project, I certify that:
15+
16+
(a) The contribution was created in whole or in part by me and I
17+
have the right to submit it under the open source license
18+
indicated in the file; or
19+
20+
(b) The contribution is based upon previous work that, to the best
21+
of my knowledge, is covered under an appropriate open source
22+
license and I have the right under that license to submit that
23+
work with modifications, whether created in whole or in part
24+
by me, under the same open source license (unless I am
25+
permitted to submit under a different license), as indicated
26+
in the file; or
27+
28+
(c) The contribution was provided directly to me by some other
29+
person who certified (a), (b) or (c) and I have not modified
30+
it.
31+
32+
(d) I understand and agree that this project and the contribution
33+
are public and that a record of the contribution (including all
34+
personal information I submit with it, including my sign-off) is
35+
maintained indefinitely and may be redistributed consistent with
36+
this project or the open source license(s) involved.

Dockerfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Copyright 2024 The Kubermatic Kubernetes Platform contributors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
FROM docker.io/golang:1.23.4 as builder
16+
17+
# import the GOPROXY variable via an arg and then use
18+
# that arg to define the environment variable later on
19+
ARG GOPROXY=
20+
ENV GOPROXY=$GOPROXY
21+
22+
WORKDIR /go/src/k8c.io/servlet
23+
COPY . .
24+
RUN make clean servlet
25+
26+
FROM gcr.io/distroless/static-debian12:debug
27+
LABEL maintainer="[email protected]"
28+
29+
COPY --from=builder /go/src/k8c.io/servlet/_build/servlet /usr/local/bin/servlet
30+
31+
USER nobody
32+
ENTRYPOINT [ "servlet" ]

0 commit comments

Comments
 (0)