[onedrive] Corrections from testing to make the experience more seamless (#1187)

* [onedrive] Corrections from testing to make the experience more seamless

* [onedrive] Bump chart version and add changelog

* [onedrive] Customer setup commands slightly outdated

* [onedrive] Make CI happy, no actual secret to action on

* [onedrive] Probably should run pre-commit locally
This commit is contained in:
Winston R. Milling 2021-09-13 02:37:52 -05:00 committed by GitHub
parent 46df74c8ae
commit 80d311f7f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 39 additions and 27 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v2
appVersion: v2.4.12
description: A free Microsoft OneDrive Client which supports OneDrive Personal, OneDrive for Business, OneDrive for Office365, and SharePoint
name: onedrive
version: 1.0.0
version: 1.1.0
kubeVersion: ">=1.16.0-0"
keywords:
- onedrive

View File

@ -1,6 +1,6 @@
# onedrive
![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![AppVersion: v2.4.12](https://img.shields.io/badge/AppVersion-v2.4.12-informational?style=flat-square)
![Version: 1.1.0](https://img.shields.io/badge/Version-1.1.0-informational?style=flat-square) ![AppVersion: v2.4.12](https://img.shields.io/badge/AppVersion-v2.4.12-informational?style=flat-square)
A free Microsoft OneDrive Client which supports OneDrive Personal, OneDrive for Business, OneDrive for Office365, and SharePoint
@ -67,15 +67,13 @@ helm install onedrive k8s-at-home/onedrive -f values.yaml
## Custom configuration
To use this chart, you will need to set an application_id in the `config` section as well as a secret (called `auth-response` by default) with a field called `auth-response` that has the value derrived from the process below.
To use this chart, you will need to set an application_id in the `config` section as well as a secret (called `onedrive-auth` by default) with a field called `auth-response` that has the value derrived from the process below.
In order to generate an auth-response value you must do the following:
1. Generate an `application_id` and set it in the `config` varaible of values.yaml (see [values.yaml](values.yaml) for a default config).
* You can use a tool like [UUID Generator](https://www.uuidgenerator.net/) for this step.
2. Visit the following URL, replacing `<APPLICATION_ID>` with the one you generated above: `https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=<APPLICATION_ID>&scope=Files.ReadWrite%20Files.ReadWrite.all%20Sites.ReadWrite.All%20offline_access&response_type=code&redirect_uri=https://login.microsoftonline.com/common/oauth2/nativeclient`
3. Authenticate with your OneDrive account.
4. Copy the URL when you arrive at the blank page (should look like this: `https://login.microsoftonline.com/common/oauth2/nativeclient?code=<redacted>`) and use that as the `auth-reponse` value in the previously mentioned secret `auth-response`.
1. Visit the following URL: `https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=d50ca740-c83f-4d1b-b616-12c519384f0c&scope=Files.ReadWrite%20Files.ReadWrite.all%20Sites.ReadWrite.All%20offline_access&response_type=code&redirect_uri=https://login.microsoftonline.com/common/oauth2/nativeclient`
2. Authenticate with your OneDrive account.
3. Copy the URL when you arrive at the blank page (should look like this: `https://login.microsoftonline.com/common/oauth2/nativeclient?code=<redacted>`) and use that as the `auth-reponse` value in the previously mentioned secret `onedrive-auth`.
## Values
@ -84,23 +82,21 @@ In order to generate an auth-response value you must do the following:
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| auth | object | See values.yaml | Configure auth secret for onedrive to initialize with |
| config | string | `"# Configuration for OneDrive Linux Client\n# This file contains the list of supported configuration fields\n# with their default values.\n# All values need to be enclosed in quotes\n# When changing a config option below, remove the '#' from the start of the line\n# For explanations of all config options below see docs/USAGE.md or the man page.\n#\n# sync_dir = \"/onedrive/data\"\n# skip_file = \"~*|.~*|*.tmp\"\n# monitor_interval = \"300\"\n# skip_dir = \"\"\n# log_dir = \"/var/log/onedrive/\"\n# drive_id = \"\"\n# upload_only = \"false\"\n# check_nomount = \"false\"\n# check_nosync = \"false\"\n# download_only = \"false\"\n# disable_notifications = \"false\"\n# disable_upload_validation = \"false\"\n# enable_logging = \"false\"\n# force_http_2 = \"false\"\n# local_first = \"false\"\n# no_remote_delete = \"false\"\n# skip_symlinks = \"false\"\n# debug_https = \"false\"\n# skip_dotfiles = \"false\"\n# dry_run = \"false\"\n# min_notify_changes = \"5\"\n# monitor_log_frequency = \"5\"\n# monitor_fullscan_frequency = \"10\"\n# sync_root_files = \"false\"\n# classify_as_big_delete = \"1000\"\n# user_agent = \"\"\n# remove_source_files = \"false\"\n# skip_dir_strict_match = \"false\"\napplication_id = \"\"\n# resync = \"false\"\n# bypass_data_preservation = \"false\"\n# azure_ad_endpoint = \"\"\n# azure_tenant_id = \"common\"\n# sync_business_shared_folders = \"false\"\n# sync_dir_permissions = \"700\"\n# sync_file_permissions = \"600\"\n# rate_limit = \"131072\"\n"` | |
| config | string | `"# Configuration for OneDrive Linux Client\n# This file contains the list of supported configuration fields\n# with their default values.\n# All values need to be enclosed in quotes\n# When changing a config option below, remove the '#' from the start of the line\n# For explanations of all config options below see docs/USAGE.md or the man page.\n#\n# sync_dir = \"/onedrive/data\"\n# skip_file = \"~*|.~*|*.tmp\"\n# monitor_interval = \"300\"\n# skip_dir = \"\"\n# log_dir = \"/var/log/onedrive/\"\n# drive_id = \"\"\n# upload_only = \"false\"\n# check_nomount = \"false\"\n# check_nosync = \"false\"\n# download_only = \"false\"\n# disable_notifications = \"false\"\n# disable_upload_validation = \"false\"\n# enable_logging = \"false\"\n# force_http_2 = \"false\"\n# local_first = \"false\"\n# no_remote_delete = \"false\"\n# skip_symlinks = \"false\"\n# debug_https = \"false\"\n# skip_dotfiles = \"false\"\n# dry_run = \"false\"\n# min_notify_changes = \"5\"\n# monitor_log_frequency = \"5\"\n# monitor_fullscan_frequency = \"10\"\n# sync_root_files = \"false\"\n# classify_as_big_delete = \"1000\"\n# user_agent = \"\"\n# remove_source_files = \"false\"\n# skip_dir_strict_match = \"false\"\napplication_id = \"d50ca740-c83f-4d1b-b616-12c519384f0c\"\n# resync = \"false\"\n# bypass_data_preservation = \"false\"\n# azure_ad_endpoint = \"\"\n# azure_tenant_id = \"common\"\n# sync_business_shared_folders = \"false\"\n# sync_dir_permissions = \"700\"\n# sync_file_permissions = \"600\"\n# rate_limit = \"131072\"\n"` | |
| env | object | See below and commented variables in values.yaml | environment variables. |
| env.ONEDRIVE_AUTHFILES | string | `"/onedrive/auth-request:/onedrive/auth-response"` | Set the auth request and response file locations for OneDrive |
| env.ONEDRIVE_DATA_DIR | string | `"/onedrive/conf"` | Set the data directory for OneDrive |
| env.KAH_HELM_INSTALL | int | `1` | Indicate to container to run K8s specific setup |
| env.ONEDRIVE_AUTHFILES | string | `"/onedrive/conf/auth-request:/onedrive/conf/auth-response"` | Set the auth request and response file locations for OneDrive |
| env.ONEDRIVE_GID | int | `1000` | Set the One Drive Group ID |
| env.ONEDRIVE_UID | int | `1000` | Set the OneDrive User ID |
| env.TZ | string | `"UTC"` | Set the container timezone |
| image.pullPolicy | string | `"IfNotPresent"` | image pull policy |
| image.repository | string | `"ghcr.io/wrmilling/onedrive-docker"` | image repository |
| image.tag | string | `"latest"` | image tag |
| image.tag | string | `"v1.0.0"` | image tag |
| persistence | object | See values.yaml for full listing | Configure persistence settings for the chart under this key. |
| persistence.config | object | `{"accessMode":"ReadWriteOnce","enabled":true,"mountPath":"/onedrive/conf"}` | OneDrive config storage |
| persistence.config.enabled | bool | `true` | If config storage should be enabled |
| persistence.config.mountPath | string | `"/onedrive/conf"` | Mount location for config |
| persistence.data | object | `{"accessMode":"ReadWriteOnce","enabled":true,"mountPath":"/onedrive/data","readOnly":false,"retain":false,"size":"5Gi","type":"pvc"}` | OneDrive data storage |
| persistence.data.enabled | bool | `true` | If data storage should be enabled |
| persistence.data.mountPath | string | `"/onedrive/data"` | Mount location for onedrive data |
## Changelog
@ -108,6 +104,15 @@ All notable changes to this application Helm chart will be documented in this fi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### [1.1.0]
#### Added
- Modified the docker path to be against specific versions, no more `latest`
- Cleaned up the transfer between secrets to application so that login can happen
- Cleaned up Custom Setup section of README.md
- Hard coded upstream `application_id` (Doesn't change, can be updated with future releases from upstream)
### [1.0.0]
#### Added

View File

@ -9,6 +9,15 @@ All notable changes to this application Helm chart will be documented in this fi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### [1.1.0]
#### Added
- Modified the docker path to be against specific versions, no more `latest`
- Cleaned up the transfer between secrets to application so that login can happen
- Cleaned up Custom Setup section of README.md
- Hard coded upstream `application_id` (Doesn't change, can be updated with future releases from upstream)
### [1.0.0]
#### Added

View File

@ -5,14 +5,12 @@
{{- define "custom.custom.configuration" -}}
{{ template "custom.custom.configuration.header" . }}
To use this chart, you will need to set an application_id in the `config` section as well as a secret (called `auth-response` by default) with a field called `auth-response` that has the value derrived from the process below.
To use this chart, you will need to set an application_id in the `config` section as well as a secret (called `onedrive-auth` by default) with a field called `auth-response` that has the value derrived from the process below.
In order to generate an auth-response value you must do the following:
1. Generate an `application_id` and set it in the `config` varaible of values.yaml (see [values.yaml](values.yaml) for a default config).
* You can use a tool like [UUID Generator](https://www.uuidgenerator.net/) for this step.
2. Visit the following URL, replacing `<APPLICATION_ID>` with the one you generated above: `https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=<APPLICATION_ID>&scope=Files.ReadWrite%20Files.ReadWrite.all%20Sites.ReadWrite.All%20offline_access&response_type=code&redirect_uri=https://login.microsoftonline.com/common/oauth2/nativeclient`
3. Authenticate with your OneDrive account.
4. Copy the URL when you arrive at the blank page (should look like this: `https://login.microsoftonline.com/common/oauth2/nativeclient?code=<redacted>`) and use that as the `auth-reponse` value in the previously mentioned secret `auth-response`.
1. Visit the following URL: `https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=d50ca740-c83f-4d1b-b616-12c519384f0c&scope=Files.ReadWrite%20Files.ReadWrite.all%20Sites.ReadWrite.All%20offline_access&response_type=code&redirect_uri=https://login.microsoftonline.com/common/oauth2/nativeclient`
2. Authenticate with your OneDrive account.
3. Copy the URL when you arrive at the blank page (should look like this: `https://login.microsoftonline.com/common/oauth2/nativeclient?code=<redacted>`) and use that as the `auth-reponse` value in the previously mentioned secret `onedrive-auth`.
{{- end -}}

View File

@ -1,2 +1,4 @@
auth:
existingSecret: ""
env:
KAH_HELM_INSTALL: 0

View File

@ -9,7 +9,7 @@ image:
# -- image repository
repository: ghcr.io/wrmilling/onedrive-docker
# -- image tag
tag: latest
tag: v1.0.0
# -- image pull policy
pullPolicy: IfNotPresent
@ -18,14 +18,14 @@ image:
env:
# -- Set the container timezone
TZ: UTC
# -- Set the data directory for OneDrive
ONEDRIVE_DATA_DIR: /onedrive/conf
# -- Set the auth request and response file locations for OneDrive
ONEDRIVE_AUTHFILES: "/onedrive/auth-request:/onedrive/auth-response"
ONEDRIVE_AUTHFILES: "/onedrive/conf/auth-request:/onedrive/conf/auth-response"
# -- Set the OneDrive User ID
ONEDRIVE_UID: 1000
# -- Set the One Drive Group ID
ONEDRIVE_GID: 1000
# -- Indicate to container to run K8s specific setup
KAH_HELM_INSTALL: 1
# ONEDRIVE_VERBOSE: 0
# ONEDRIVE_DEBUG: 0
# ONEDRIVE_DEBUG_HTTPS: 0
@ -45,7 +45,6 @@ persistence:
config:
# -- If config storage should be enabled
enabled: true
# -- Mount location for config
mountPath: /onedrive/conf
accessMode: ReadWriteOnce
@ -53,7 +52,6 @@ persistence:
data:
# -- If data storage should be enabled
enabled: true
# -- Mount location for onedrive data
mountPath: /onedrive/data
type: pvc
size: 5Gi
@ -98,7 +96,7 @@ config: |
# user_agent = ""
# remove_source_files = "false"
# skip_dir_strict_match = "false"
application_id = ""
application_id = "d50ca740-c83f-4d1b-b616-12c519384f0c"
# resync = "false"
# bypass_data_preservation = "false"
# azure_ad_endpoint = ""