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

add diff mode to init #9693

Merged
merged 5 commits into from
Jul 29, 2024
Merged

Conversation

dragonchaser
Copy link
Member

@dragonchaser dragonchaser commented Jul 26, 2024

Enhancement: Add --diff to the ocis init command to show the diff of the configuration files

We have added a new flag --diff to the ocis init command to show the diff of the configuration files.
This is useful to see what has changed in the configuration files when you run the ocis init command.
The diff is stored to the ocispath in the config folder as ocis.config.patch and can be applied using the
linux patch command.

#3645

Signed-off-by: Christian Richter <crichter@owncloud.com>
Signed-off-by: Christian Richter <crichter@owncloud.com>
Signed-off-by: Christian Richter <crichter@owncloud.com>
@owncloud owncloud deleted a comment from update-docs bot Jul 26, 2024
@dragonchaser dragonchaser force-pushed the add-init-diff-mode branch 2 times, most recently from bdf1c4d to 14b8316 Compare July 26, 2024 07:47
Signed-off-by: Christian Richter <crichter@owncloud.com>
Signed-off-by: Christian Richter <crichter@owncloud.com>
@dragonchaser dragonchaser marked this pull request as ready for review July 26, 2024 09:23
Copy link

sonarcloud bot commented Jul 26, 2024

@dragonchaser
Copy link
Member Author

Please review, the complexity sonarcloud is complaining about can not be reduced anymore.

@butonic
Copy link
Member

butonic commented Jul 28, 2024

nice!

➜  ocis git:(add-init-diff-mode) ✗ go run ./ocis/cmd/ocis init --diff
2024/07/28 21:03:10 INFO memory is not limited, skipping package=github.com/KimMachineGun/automemlimit/memlimit
Do you want to configure Infinite Scale with certificate checking disabled?
 This is not recommended for public instances! [yes | no = default] 
running in diff mode
diff -u /home/jfd/.ocis/config/ocis.yaml /home/jfd/.ocis/config/ocis.yaml.tmp
no changes, your config is up to date
➜  ocis git:(add-init-diff-mode) ✗ go run ./ocis/cmd/ocis init --diff
2024/07/28 21:03:17 INFO memory is not limited, skipping package=github.com/KimMachineGun/automemlimit/memlimit
Do you want to configure Infinite Scale with certificate checking disabled?
 This is not recommended for public instances! [yes | no = default] yes
running in diff mode
diff -u /home/jfd/.ocis/config/ocis.yaml /home/jfd/.ocis/config/ocis.yaml.tmp
--- /home/jfd/.ocis/config/ocis.yaml    2024-07-28 21:03:04.013862146 +0200
+++ /home/jfd/.ocis/config/ocis.yaml.tmp        2024-07-28 21:03:19.313850807 +0200
@@ -9,9 +9,9 @@
   application:
     id: ac9ad1ac-e4e0-45e6-9125-6ea43917fe25
   events:
-    tls_insecure: false
+    tls_insecure: true
   spaces:
-    insecure: false
+    insecure: true
   identity:
     ldap:
       bind_password: 1eAo0BchDC7.4++MS4X4L4D1kk^uJwt%
@@ -31,19 +31,19 @@
   wopi:
     secret: M9HCPv7ckiUDU-5UV3ZebN@FkojqOO0D
   app:
-    insecure: false
+    insecure: true
 proxy:
   oidc:
-    insecure: false
-  insecure_backends: false
+    insecure: true
+  insecure_backends: true
   service_account:
     service_account_id: 7655a2b0-4981-4cec-92fe-8cdf6ed15f42
     service_account_secret: YQ5%9XPBY#0jDoGiKORJ^E0#ByNe7@tK
 frontend:
   app_handler:
-    insecure: false
+    insecure: true
   archiver:
-    insecure: false
+    insecure: true
   service_account:
     service_account_id: 7655a2b0-4981-4cec-92fe-8cdf6ed15f42
     service_account_secret: YQ5%9XPBY#0jDoGiKORJ^E0#ByNe7@tK
@@ -54,7 +54,7 @@
 auth_bearer:
   auth_providers:
     oidc:
-      insecure: false
+      insecure: true
 users:
   drivers:
     ldap:
@@ -64,7 +64,7 @@
     ldap:
       bind_password: Bdw=EEN6rHpZd7uusg%zorpA0Q7m%v%0
 ocdav:
-  insecure: false
+  insecure: true
 ocm:
   service_account:
     service_account_id: 7655a2b0-4981-4cec-92fe-8cdf6ed15f42
@@ -72,26 +72,26 @@
 thumbnails:
   thumbnail:
     transfer_secret: IukWYJ#GfsKAON-zIK5RzZUN$GRnk!Wx
-    webdav_allow_insecure: false
-    cs3_allow_insecure: false
+    webdav_allow_insecure: true
+    cs3_allow_insecure: true
 search:
   events:
-    tls_insecure: false
+    tls_insecure: true
   service_account:
     service_account_id: 7655a2b0-4981-4cec-92fe-8cdf6ed15f42
     service_account_secret: YQ5%9XPBY#0jDoGiKORJ^E0#ByNe7@tK
 audit:
   events:
-    tls_insecure: false
+    tls_insecure: true
 settings:
   service_account_ids:
   - 7655a2b0-4981-4cec-92fe-8cdf6ed15f42
 sharing:
   events:
-    tls_insecure: false
+    tls_insecure: true
 storage_users:
   events:
-    tls_insecure: false
+    tls_insecure: true
   mount_id: 73409605-a2c8-40c0-b4c8-888a9d836b12
   service_account:
     service_account_id: 7655a2b0-4981-4cec-92fe-8cdf6ed15f42
@@ -99,13 +99,13 @@
 notifications:
   notifications:
     events:
-      tls_insecure: false
+      tls_insecure: true
   service_account:
     service_account_id: 7655a2b0-4981-4cec-92fe-8cdf6ed15f42
     service_account_secret: YQ5%9XPBY#0jDoGiKORJ^E0#ByNe7@tK
 nats:
   nats:
-    tls_skip_verify_client_cert: false
+    tls_skip_verify_client_cert: true
 gateway:
   storage_registry:
     storage_users_mount_id: 73409605-a2c8-40c0-b4c8-888a9d836b12

diff written to /home/jfd/.ocis/config/ocis.config.patch

@dragonchaser dragonchaser merged commit 990ea4e into owncloud:master Jul 29, 2024
4 checks passed
@dragonchaser dragonchaser deleted the add-init-diff-mode branch July 29, 2024 08:01
ownclouders pushed a commit that referenced this pull request Jul 29, 2024
@micbar micbar mentioned this pull request Jul 30, 2024
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants