二、日程服务环境搭建
一、环境搭建准备
-
定义日程文件目录collections,后续所有的日程文件都在这个目录.
mdkir /radicale/data/collections
-
定义日程用户密码文件user,后续用户名密码都会被记录在此文件.
touch /radicale/data/users
eqct:be0eeb622f -
定义日程权限文件rights,定义用户的权限.
touch /radicale/data/rights
[principal] user:admin collection:{user} permissions:rw -
定义服务端的基础配置文件,文件内容如下:
touch /radicale/config
[server] hosts: 0.0.0.0:5232 [auth] type=htpasswd htpasswd_filename=/data/users htpasswd_encryption=plain [rights] type=owner_only file=/data/rights permit_delete_collection = True [storage] filesystem_folder=/data/collections [web] type=none [logging] level=info
二、K8S执行脚本
-
deployment-caldav-webapp.yaml:
apiVersion: apps/v1 kind: Deployment metadata: name: deployment-caldav-webapp spec: replicas: 1 selector: matchLabels: apps: caldav-webapp template: metadata: labels: apps: caldav-webapp spec: containers: - name: caldav-webapp imagePullPolicy: Always image: cupcakearmy/radicale:1 ports: - containerPort: 5232 env: - name: TZ value: Asia/Shanghai volumeMounts: - name: collections mountPath: /data/collections - name: users mountPath: /data/users - name: rights mountPath: /data/rights - name: config mountPath: /etc/radicale/config volumes: - name: collections hostPath: path: /radicale/data/collections - name: users hostPath: path: /radicale/data/users - name: rights hostPath: path: /radicale/data/rights - name: config hostPath: path: /radicale/config -
service-caldav-webapp.yaml:
apiVersion: v1 kind: Service metadata: name: service-caldav-webapp spec: type: ClusterIP selector: apps: caldav-webapp ports: - port: 5232 targetPort: 5232 name: baikal-webapp -
ingress-caldav.yaml:
apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: radicale-ingress annotations: kubernetes.io/ingress.class: traefik traefik.frontend.rule.type: PathPrefix spec: tls: - hosts: - "cal.sitc.ink" secretName: nginx-tls rules: - host: cal.sitc.ink http: paths: - path: / pathType: Prefix backend: service: name: service-caldav-webapp port: number: 5232
三、客户端接入
-
Iphone15 接入截图:
设置 - App - 日历 - 日历账户 - 添加账户[CalDAV账户] - 设置账户并提交
-
小米6S 接入截图:
日历 - 设置 - 账户管理 - 日程导入 - 添加CalDAV账户 - 设置账户并提交

1177

被折叠的 条评论
为什么被折叠?



