-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
41 changed files
with
461 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM golang:alpine AS builder | ||
MAINTAINER cylon | ||
WORKDIR /firewall | ||
COPY ./ /firewall | ||
ENV GOPROXY https://goproxy.cn,direct | ||
RUN \ | ||
sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories && \ | ||
apk add upx bash make && \ | ||
make build && \ | ||
upx -1 _output/firewalld-gateway && \ | ||
chmod +x _output/firewalld-gateway | ||
|
||
FROM alpine AS runner | ||
WORKDIR /go/firewalld | ||
COPY --from=builder /firewalld/_output/firewalld-gateway ./bin/ | ||
COPY --from=builder /firewalld/firewalld-gateway.conf . | ||
CMD ["firewalld-gateway", "-v", "5", "--config", "./firewalld-gateway.conf"] | ||
ENV PATH "$PATH:/go/firewalld/bin" | ||
VOLUME ["/firewall"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
%define name dbus | ||
%define version 1.12.20 | ||
%define release 1 | ||
%define release_tag %{?dist} | ||
|
||
Name: %{name} | ||
Version: %{version} | ||
Release: %{release}%{release_tag} | ||
Summary: D-Bus message bus system | ||
|
||
Group: System Environment/Daemons | ||
License: AFL-2.1 or GPL-2.0 or GPL-3.0 | ||
URL: https://dbus.freedesktop.org/ | ||
Source0: https://dbus.freedesktop.org/releases/%{name}/%{name}-%{version}.tar.gz | ||
|
||
BuildRequires: gcc | ||
BuildRequires: make | ||
BuildRequires: pkgconfig | ||
BuildRequires: xmlto | ||
|
||
%description | ||
D-Bus is a message bus system, a simple way for applications to talk to one another. In addition to interprocess communication, D-Bus helps coordinate process lifecycle; it makes it simple and reliable to code a "single instance" application or daemon, and to launch applications and daemons on demand when their services are needed. | ||
|
||
%package libs | ||
Summary: Libraries for D-Bus | ||
Group: System Environment/Libraries | ||
License: AFL-2.1 or GPL-2.0 or GPL-3.0 | ||
Requires: %{name} = %{version}-%{release}%{?dist} | ||
|
||
%description libs | ||
This package contains libraries needed at runtime for applications using D-Bus. | ||
%prep | ||
%autosetup -p1 | ||
|
||
%build | ||
%configure | ||
make %{?_smp_mflags} | ||
|
||
%install | ||
%make_install | ||
|
||
|
||
%check | ||
make check | ||
|
||
%clean | ||
rm -rf %{buildroot} | ||
|
||
%post -p /sbin/ldconfig | ||
%postun -p /sbin/ldconfig | ||
|
||
%files libs | ||
%defattr(-,root,root,-) | ||
%{_libdir}/libdbus-1.* | ||
|
||
|
||
%files | ||
%{_sysconfdir}/* | ||
%{_bindir}/dbus-cleanup-sockets | ||
%{_bindir}/dbus-daemon | ||
%{_bindir}/dbus-launch | ||
%{_bindir}/dbus-monitor | ||
%{_bindir}/dbus-run-session | ||
%{_bindir}/dbus-send | ||
%{_bindir}/dbus-uuidgen | ||
%{_mandir}/man1/* | ||
%{_datadir}/dbus-1/ | ||
%{_prefix}/lib/systemd/system/* | ||
%{_prefix}/libexec/* | ||
|
||
%changelog | ||
* Fri Mar 21 2023 John Doe <[email protected]> - 1.12.20-1 | ||
- Initial build of D-Bus 1.12.20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# Copyright 2017 The cylonchau Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: uranus | ||
|
||
--- | ||
|
||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
firewalld-app: uranus | ||
name: uranus | ||
namespace: uranus | ||
|
||
--- | ||
|
||
kind: Service | ||
apiVersion: v1 | ||
metadata: | ||
labels: | ||
firewalld-app: uranus | ||
name: uranus | ||
namespace: uranus | ||
spec: | ||
ports: | ||
- port: 2952 | ||
targetPort: 2952 | ||
selector: | ||
firewalld-app: uranus | ||
|
||
--- | ||
|
||
kind: Deployment | ||
apiVersion: apps/v1 | ||
metadata: | ||
labels: | ||
firewalld-app: uranus | ||
name: firewalld-uranus | ||
namespace: uranus | ||
spec: | ||
replicas: 1 | ||
revisionHistoryLimit: 10 | ||
selector: | ||
matchLabels: | ||
firewalld-app: uranus | ||
template: | ||
metadata: | ||
labels: | ||
firewalld-app: uranus | ||
spec: | ||
containers: | ||
- name: uranus | ||
image: cylonchau/uranus | ||
imagePullPolicy: Always | ||
ports: | ||
- containerPort: 2952 | ||
protocol: TCP | ||
livenessProbe: | ||
httpGet: | ||
scheme: HTTP | ||
path: / | ||
port: 2952 | ||
initialDelaySeconds: 30 | ||
timeoutSeconds: 30 | ||
serviceAccountName: uranus | ||
nodeSelector: | ||
"kubernetes.io/os": linux | ||
# Comment the following tolerations if Dashboard must not be deployed on master | ||
tolerations: | ||
- key: node-role.kubernetes.io/master | ||
effect: NoSchedule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
appname = "firewalld-gateway" | ||
appname = "Uranus" | ||
port = 2952 | ||
address = "0.0.0.0" | ||
dbus_port = 55556 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module github.com/cylonchau/firewalldGateway | ||
module github.com/cylonchau/firewalld-gateway | ||
|
||
go 1.18 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.