generated from cybozu-go/neco-template
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Support require_secure_transport=ON #544
Comments
First, as @daichimukai pointed out in cybozu-go/moco-agent#83, the
apiVersion: moco.cybozu.com/v1beta1
kind: MySQLCluster
metadata:
name: test
spec:
mysqlConfigMapName: test
replicas: 3
podTemplate:
spec:
containers:
- name: mysqld
image: quay.io/cybozu/mysql:8.0.30
volumeClaimTemplates:
- metadata:
name: mysql-data
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 5Gi
---
apiVersion: v1
kind: ConfigMap
metadata:
name: test
data:
require_secure_transport: "ON"
$ kubectl get pod
NAME READY STATUS RESTARTS AGE
moco-test-0 1/3 CrashLoopBackOff 4 (80s ago) 3m19s
moco-test-1 1/3 CrashLoopBackOff 4 (80s ago) 3m19s
moco-test-2 1/3 CrashLoopBackOff 4 (76s ago) 3m19s
$ kubectl logs -n sandbox moco-test-0 -c agent -p
Error: Error 3159: Connections using insecure transport are prohibited while --require_secure_transport=ON.
Usage:
moco-agent [flags]
Flags:
--address string Listening address and port for gRPC API. (default ":9080")
--connection-timeout duration Dial timeout (default 5s)
--grpc-cert-dir string gRPC certificate directory (default "/grpc-cert")
-h, --help help for moco-agent
--log-rotation-schedule string Cron format schedule for MySQL log rotation (default "*/5 * * * *")
--logfile string Log filename
--logformat string Log format [plain,logfmt,json]
--loglevel string Log level [critical,error,warning,info,debug]
--max-delay duration Acceptable max commit delay considering as ready; the zero value accepts any delay (default 1m0s)
--max-idle-time duration The maximum amount of time a connection may be idle (default 30s)
--metrics-address string Listening address and port for metrics. (default ":8080")
--probe-address string Listening address and port for mysqld health probes. (default ":9081")
--read-timeout duration I/O read timeout (default 30s)
--socket-path string Path of mysqld socket file. (default "/run/mysqld.sock")
Error 3159: Connections using insecure transport are prohibited while --require_secure_transport=ON. |
Next, the cluster-manager will cause errors.
|
Even if the above errors are resolved, replication will fail, and the MySQLCluster will not be HEALTHY. $ kubectl get pod -l app.kubernetes.io/name=mysql
NAME READY STATUS RESTARTS AGE
moco-test-0 3/3 Running 0 4m1s
moco-test-1 2/3 Running 0 4m1s
moco-test-2 2/3 Running 0 4m1s
$ kubectl get mysqlcluster
NAME AVAILABLE HEALTHY PRIMARY SYNCED REPLICAS ERRANT REPLICAS LAST BACKUP
test False False 0 1 <no value> Log of
Log of
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What
A user wants to enforce encrypted communication within a k8s cluster using the
require_secure_transport=ON
option.However, the current MOCO implementation does not suppose encrypted communication. Some updates are needed.
How
Describe how to address the issue.
Checklist
The text was updated successfully, but these errors were encountered: