diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a8d77a0..036c4b7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,7 +12,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.19 + go-version: 1.22 - name: Check out code uses: actions/checkout@v2 - name: Lint golang code @@ -23,7 +23,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.19 + go-version: 1.22 - name: Check out code uses: actions/checkout@v2 - name: Run tests @@ -34,7 +34,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.19 + go-version: 1.22 - name: Check out code uses: actions/checkout@v2 - name: Build binary diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 09c07fb..7148520 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -10,7 +10,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.19 + go-version: 1.22 - name: Check out code uses: actions/checkout@v2 - name: Lint golang code @@ -21,7 +21,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.19 + go-version: 1.22 - name: Check out code uses: actions/checkout@v2 - name: Run tests @@ -32,7 +32,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.19 + go-version: 1.22 - name: Check out code uses: actions/checkout@v2 - name: Build binary diff --git a/Dockerfile b/Dockerfile index c3342a1..32c445e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.19 as builder +FROM golang:1.22 as builder WORKDIR /workspace # Copy the Go Modules manifests diff --git a/ansible/server/README.md b/ansible/server/README.md index 718951f..29a7a56 100644 --- a/ansible/server/README.md +++ b/ansible/server/README.md @@ -1,4 +1,4 @@ -# RFP Server Ansible +# FRP Server Ansible This simple ansible to setup FRP server on the server that has public IP address and prerequisite of frp-operator on Kubernetes. @@ -8,29 +8,35 @@ This simple ansible to setup FRP server on the server that has public IP address ```shell sudo su ``` -2. clone the repository +2. generate ssh key and make sure to able to ssh to itself +```shell +ssh-keygen + +vi ~/.ssh/authorized_keys +``` +3. clone the repository ```shell git clone https://github.com/zufardhiyaulhaq/frp-operator cd frp-operator/ansible/server ``` -3. Adjust variables +1. Adjust variables ```shell vi group_vars/all.yaml ``` -4. Install ansible +1. Install ansible ```shell sudo apt-add-repository ppa:ansible/ansible -y sudo apt update sudo apt install ansible -y ``` -5. disable ansible hostkey checking +1. disable ansible hostkey checking ```shell vi ~/.ansible.cfg [defaults] host_key_checking = False ``` -6. Run ansible +7. Run ansible ``` ansible-playbook main.yml -i hosts/hosts ``` diff --git a/ansible/server/roles/rfps/handlers/main.yaml b/ansible/server/roles/frps/handlers/main.yaml similarity index 100% rename from ansible/server/roles/rfps/handlers/main.yaml rename to ansible/server/roles/frps/handlers/main.yaml diff --git a/ansible/server/roles/rfps/tasks/main.yaml b/ansible/server/roles/frps/tasks/main.yaml similarity index 100% rename from ansible/server/roles/rfps/tasks/main.yaml rename to ansible/server/roles/frps/tasks/main.yaml diff --git a/ansible/server/roles/rfps/templates/frps.service.j2 b/ansible/server/roles/frps/templates/frps.service.j2 similarity index 100% rename from ansible/server/roles/rfps/templates/frps.service.j2 rename to ansible/server/roles/frps/templates/frps.service.j2 diff --git a/ansible/server/roles/rfps/templates/frps.toml.j2 b/ansible/server/roles/frps/templates/frps.toml.j2 similarity index 61% rename from ansible/server/roles/rfps/templates/frps.toml.j2 rename to ansible/server/roles/frps/templates/frps.toml.j2 index 296602f..84b9d48 100644 --- a/ansible/server/roles/rfps/templates/frps.toml.j2 +++ b/ansible/server/roles/frps/templates/frps.toml.j2 @@ -1,6 +1,6 @@ -serverAddr = "{{ server_address }}" -serverPort = {{ server_port }} -auth.method = "{{ server_token }}" +bindPort = {{ server_port }} +auth.method = "token" +auth.token = "{{ server_token }}" webServer.addr = "{{ server_address }}" webServer.port = {{ webserver_port }} diff --git a/charts/frp-operator/Chart.yaml b/charts/frp-operator/Chart.yaml index 9c9a110..86aae50 100644 --- a/charts/frp-operator/Chart.yaml +++ b/charts/frp-operator/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: frp-operator description: Expose your service in Kubernetes to the Internet with open source FRP! -version: 1.1.0 -appVersion: 0.3.0 +version: 1.2.0 +appVersion: 0.3.1 type: application home: https://github.com/zufardhiyaulhaq/frp-operator diff --git a/charts/frp-operator/values.yaml b/charts/frp-operator/values.yaml index efa709b..5487e0d 100644 --- a/charts/frp-operator/values.yaml +++ b/charts/frp-operator/values.yaml @@ -2,7 +2,7 @@ operator: # image of frp-operator image: "zufardhiyaulhaq/frp-operator" # tag of frp-operator image - tag: "v0.3.0" + tag: "v0.3.1" # number of replica for deployment replica: 1 diff --git a/go.mod b/go.mod index 850cbb2..21688d2 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/zufardhiyaulhaq/frp-operator -go 1.19 +go 1.22 require ( k8s.io/api v0.26.2 diff --git a/go.sum b/go.sum index 66b7418..e72547b 100644 --- a/go.sum +++ b/go.sum @@ -67,6 +67,7 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= +github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= @@ -215,7 +216,9 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/onsi/ginkgo/v2 v2.6.0 h1:9t9b9vRUbFq3C4qKFCGkVuq/fIHji802N1nrtkh1mNc= +github.com/onsi/ginkgo/v2 v2.6.0/go.mod h1:63DOGlLAH8+REH8jUGdL3YpCpu7JODesutUjdENfUAc= github.com/onsi/gomega v1.24.1 h1:KORJXNNTzJXzu4ScJWssJfJMnJ+2QJqhoQSRwNlze9E= +github.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmvt1jM= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -282,6 +285,7 @@ go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= +go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak=