Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support deploy Docker Image to AliyunCR #175

Merged
merged 4 commits into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/docker-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,21 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to AliyunCR
uses: docker/login-action@v2
with:
registry: registry.cn-shanghai.aliyuncs.com
username: ${{ secrets.ALIYUN_CR_USERNAME }}
password: ${{ secrets.ALIYUN_CR_TOKEN }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
ahoowang/cosec-gateway
ghcr.io/ahoo-wang/cosec-gateway
registry.cn-shanghai.aliyuncs.com/ahoo/cosec-gateway
tags: |
type=ref,event=branch
type=ref,event=pr
Expand Down
2 changes: 1 addition & 1 deletion cosec-gateway-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ARG APP_NAME=cosec-gateway-server
ARG WORK_HOME=/opt/${APP_NAME}

FROM openjdk:17.0.2-jdk-slim AS base
FROM dragonwell-registry.cn-hangzhou.cr.aliyuncs.com/dragonwell/dragonwell:17 AS base

FROM base as build
ARG WORK_HOME
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# limitations under the License.
#
group=me.ahoo.cosec
version=2.0.0
version=2.0.1
description=RBAC-based And Policy-based Multi-Tenant Reactive Security Framework.
website=https://github.com/Ahoo-Wang/CoSec
issues=https://github.com/Ahoo-Wang/CoSec/issues
Expand Down
18 changes: 17 additions & 1 deletion k8s/cosec-gateway-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,28 @@ spec:
metadata:
labels:
app: cosec-gateway
annotations:
instrumentation.opentelemetry.io/inject-java: "true"
spec:
containers:
- env:
- name: LANG
value: C.utf8
- name: SPRING_DATA_REDIS_CLUSTER_NODES
valueFrom:
secretKeyRef:
name: redis-secret
key: nodes
- name: SPRING_DATA_REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: redis-secret
key: password
- name: SPRING_DATA_REDIS_CLUSTER_MAX_REDIRECTS
value: "3"
- name: TZ
value: Asia/Shanghai
image: ahoowang/cosec-gateway:lastVersion
image: registry.cn-shanghai.aliyuncs.com/ahoo/cosec-gateway:2.0.1
startupProbe:
httpGet:
port: http
Expand Down
9 changes: 9 additions & 0 deletions k8s/cosec-gateway-reids.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: Secret
metadata:
name: redis-secret
labels:
app: redis-secret
data:
nodes: NODES
password: PASSWORD