diff --git a/base/app-resign/app-resign-deployment.yaml b/base/app-resign/app-resign-deployment.yaml new file mode 100644 index 0000000..03c5c06 --- /dev/null +++ b/base/app-resign/app-resign-deployment.yaml @@ -0,0 +1,23 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: app-resign-api + labels: + app: app-resign-api +spec: + replicas: 1 + selector: + matchLabels: + app: app-resign-api + template: + metadata: + labels: + app: app-resign-api + spec: + containers: + - name: app-resign-api + image: juyou.tencentcloudcr.com/juyoutech/app-resign:latest + ports: + - containerPort: 3000 + imagePullSecrets: + - name: juyou-docker-tcr-secret \ No newline at end of file diff --git a/base/download/app-resign-role-binding.yaml b/base/app-resign/app-resign-role-binding.yaml similarity index 100% rename from base/download/app-resign-role-binding.yaml rename to base/app-resign/app-resign-role-binding.yaml diff --git a/base/app-resign/app-resign-role.yaml b/base/app-resign/app-resign-role.yaml new file mode 100644 index 0000000..9ee7662 --- /dev/null +++ b/base/app-resign/app-resign-role.yaml @@ -0,0 +1,14 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: app-resign-role +rules: + - apiGroups: ["batch"] + resources: ["jobs"] + verbs: ["list", "create", "delete", "get", "watch"] + - apiGroups: [""] + resources: ["pods"] + verbs: ["list", "get", "watch"] + - apiGroups: [""] + resources: ["pods/log"] + verbs: ["get"] \ No newline at end of file diff --git a/base/download/app-resign-service-account.yaml b/base/app-resign/app-resign-service-account.yaml similarity index 100% rename from base/download/app-resign-service-account.yaml rename to base/app-resign/app-resign-service-account.yaml diff --git a/base/app-resign/app-resign-service.yaml b/base/app-resign/app-resign-service.yaml new file mode 100644 index 0000000..a61bea6 --- /dev/null +++ b/base/app-resign/app-resign-service.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: app-resign-api-service +spec: + ports: + - port: 80 + targetPort: 3000 + name: app-resign-api + selector: + app: app-resign-api \ No newline at end of file diff --git a/base/app-resign/kustomization.yaml b/base/app-resign/kustomization.yaml new file mode 100644 index 0000000..e07fb5b --- /dev/null +++ b/base/app-resign/kustomization.yaml @@ -0,0 +1,6 @@ +resources: + - app-resign-service-account.yaml + - app-resign-role.yaml + - app-resign-role-binding.yaml + - app-resign-deployment.yaml + - app-resign-service.yaml \ No newline at end of file diff --git a/base/download/app-resign-role.yaml b/base/download/app-resign-role.yaml deleted file mode 100644 index 638a3ea..0000000 --- a/base/download/app-resign-role.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: app-resign-role -rules: - - apiGroups: [ "batch", "extensions", "apps" ] - resources: [ "jobs", "deployments", "pods", "pods/log" ] - verbs: [ "create", "get", "list", "watch", "create", "delete", "update", "patch" ] \ No newline at end of file diff --git a/base/download/download-api-deployment.yaml b/base/download/download-api-deployment.yaml index 8e3ee54..d907324 100644 --- a/base/download/download-api-deployment.yaml +++ b/base/download/download-api-deployment.yaml @@ -12,7 +12,6 @@ spec: labels: app: download-api spec: - serviceAccountName: app-resign-service-account containers: - name: download-api image: juyou.tencentcloudcr.com/juyoutech/download_api:latest diff --git a/base/download/kustomization.yaml b/base/download/kustomization.yaml index dfef3b5..882d008 100644 --- a/base/download/kustomization.yaml +++ b/base/download/kustomization.yaml @@ -2,7 +2,4 @@ resources: - download-api-deployment.yaml - download-api-service.yaml - download-deployment.yaml - - download-service.yaml - - app-resign-service-account.yaml - - app-resign-role.yaml - - app-resign-role-binding.yaml \ No newline at end of file + - download-service.yaml \ No newline at end of file diff --git a/gp2505/kustomization.yaml b/gp2505/kustomization.yaml index 3d55a42..a090a58 100644 --- a/gp2505/kustomization.yaml +++ b/gp2505/kustomization.yaml @@ -14,6 +14,7 @@ resources: - ../base/tls - ../base/basic-auth - ../base/haproxy + - ../base/app-resign - ingress.yaml configMapGenerator: diff --git a/gp2505/patch/app-resign-deployment_patch.yaml b/gp2505/patch/app-resign-deployment_patch.yaml new file mode 100644 index 0000000..622758a --- /dev/null +++ b/gp2505/patch/app-resign-deployment_patch.yaml @@ -0,0 +1,22 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: app-resign-api +spec: + replicas: 3 + template: + spec: + containers: + - name: app-resign-api + image: juyou.tencentcloudcr.com/juyoutech/app-resign:latest + imagePullPolicy: Always + envFrom: + - configMapRef: + name: mysql-configmap + - configMapRef: + name: redis-configmap + - configMapRef: + name: storage-configmap + env: + - name: TZ + value: "Asia/Shanghai" \ No newline at end of file