Compare commits

..

42 Commits

Author SHA1 Message Date
Ron
9f88c7bc79 Merge pull request #238 from fleetbase/dev-v0.4.15
v0.4.15
2024-03-27 20:04:55 +07:00
Ron
b3816c394a Merge pull request #236 from fleetbase/feature/helm_eks
feature/helm eks
2024-03-27 20:00:08 +07:00
Ronald A. Richardson
34462c61c4 Prepeared next release with latest upgrades/ patches 2024-03-27 20:58:40 +08:00
Eugene Dementyev
080302eb86 Fix socketcluster port for eks 2024-03-20 18:19:06 +13:00
Eugene Dementyev
b063cf6338 Set api host and socketcluster host from github 2024-03-20 18:03:15 +13:00
Eugene Dementyev
b6dca79251 Fix registry 2024-03-19 23:26:38 +13:00
Eugene Dementyev
c35af4d47a Add EKS deployments 2024-03-19 21:23:21 +13:00
Eugene Dementyev
2a89659cc3 Adapt the Helm chart to be used with AWS EKS 2024-03-19 21:05:47 +13:00
Ron
f8ae75d767 Merge pull request #235 from fleetbase/dev-v0.4.14
v0.4.14
2024-03-17 12:27:18 +08:00
Ronald A. Richardson
924448a4d0 Upgraded fleetops for distance matrix calculation optimization and provider configuration 2024-03-17 12:20:40 +08:00
Ron
5426ac374d Merge pull request #234 from fleetbase/dev-v0.4.13
v0.4.13
2024-03-15 17:27:12 +08:00
Ronald A. Richardson
73f56b7958 added translations for schedule monitor ui 2024-03-15 17:23:06 +08:00
Ronald A. Richardson
095eb87e14 preparing for new release 2024-03-15 17:00:31 +08:00
Ronald A. Richardson
fabc16612b core-api upgrade includes improved upload error reporting 2024-03-13 18:02:22 +08:00
Ronald A. Richardson
3389cba935 added the visibility_handler to the gcs filesystem driver config 2024-03-13 17:13:23 +08:00
Ron
099ea57c39 Merge pull request #231 from fleetbase/dev-v0.4.12
v0.4.12
2024-03-13 15:26:36 +08:00
Ronald A. Richardson
5492bc7299 - Revamped service rates to integrate with the new order configuration system.
- Enhanced activities to now support proof of delivery requirements.
- Patched and improved the stringent validation for creating new orders.
- Added a new column `order_config_uuid` to the `service_rates` table for better data management.
- Various other minor improvements and optimizations for enhanced performance and stability.
- Critical patch and improvement to location service
2024-03-13 15:15:42 +08:00
Ron
00b037a385 Merge pull request #229 from fleetbase/dev-v0.4.11
v0.4.11
2024-03-12 18:18:42 +08:00
Ronald A. Richardson
151fea2505 ready for release 2024-03-12 18:13:35 +08:00
Ronald A. Richardson
08f901d865 patches following major release 2024-03-12 17:55:51 +08:00
Ron
116873a1ce Merge pull request #225 from fleetbase/dev-v0.4.10
v0.4.10
2024-03-11 21:12:01 +08:00
Ronald A. Richardson
20a1793447 remove test url from cors allowed_origins 2024-03-11 21:07:23 +08:00
Ronald A. Richardson
72ab83dc7a release is ready 2024-03-11 21:06:25 +08:00
Ronald A. Richardson
171e365ba6 added commercial license 2024-03-11 20:33:39 +08:00
Ronald A. Richardson
009f2d6e53 Merge branch 'dev-v0.4.10' of github.com:fleetbase/fleetbase into dev-v0.4.10 2024-03-11 16:25:17 +08:00
Ronald A. Richardson
4a59318feb upgraded fleetops-data; fixed custom fields and custom field value models; patch notification model 2024-03-11 16:24:46 +08:00
Ron
8920039b40 Merge pull request #227 from fleetbase/fix/helm_install_order 2024-03-11 12:44:53 +08:00
Eugene Dementyev
cd9be05714 Remove helm service hooks. Use DNS names for services 2024-03-08 20:40:31 +13:00
Ron
fbe35545e9 Merge pull request #223 from fleetbase/feature/nginx_host_header
Make nginx pass the Host header
2024-03-06 13:14:35 +08:00
Ron
56ab967d7a Merge pull request #224 from fleetbase/fix/helm_install_order
Fix/helm install order
2024-03-06 13:14:03 +08:00
Ronald A. Richardson
79604c7981 preparing for v0.4.10 release 2024-03-06 13:10:31 +08:00
Eugene Dementyev
312eb1aa6f Adds pre-install for redis service 2024-03-02 20:55:17 +13:00
Eugene Dementyev
6572a59120 Fixes helm install order 2024-03-02 20:21:18 +13:00
Eugene Dementyev
fa536c6183 Make nginx pass the Host header 2024-02-27 19:54:50 +13:00
Ron
d4626be332 Merge pull request #221 from fleetbase/dev-v0.4.9
v0.4.9
2024-02-24 16:02:05 +07:00
Ronald A. Richardson
ffc54ecdbb upgrade dependencies which has expansion hotfixes 2024-02-24 16:59:12 +08:00
Ron
9bf097b88b Merge pull request #220 from fleetbase/dev-v0.4.8
v0.4.8
2024-02-23 12:48:50 +07:00
Ronald A. Richardson
52c8df8b66 prepared for next release 2024-02-23 13:47:15 +08:00
Ron
908e0eb9ee Merge pull request #219 from fleetbase/dev-v0.4.7
v0.4.7
2024-02-22 17:11:51 +07:00
Ronald A. Richardson
6438138913 add upgraded core-api submodule 2024-02-22 17:57:22 +08:00
Ronald A. Richardson
aee06a2146 update composer lockfile 2024-02-22 17:54:01 +08:00
Ronald A. Richardson
ccacc6c597 adds fleetops migrations hotfix 2024-02-22 12:43:33 +08:00
52 changed files with 2366 additions and 1188 deletions

170
.github/workflows/eks-cd.yml vendored Normal file
View File

@@ -0,0 +1,170 @@
name: Fleetbase EKS CI/CD
on:
push:
branches: ["eksdeploy/*"]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
PROJECT: ${{ secrets.PROJECT }}
GITHUB_AUTH_KEY: ${{ secrets._GITHUB_AUTH_TOKEN }}
jobs:
build_service:
name: Build and Deploy the Service
runs-on: ubuntu-latest
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set Dynamic ENV Vars
run: |
SHORT_COMMIT=$(echo $GITHUB_SHA | cut -c -8)
echo "VERSION=${SHORT_COMMIT}" >> $GITHUB_ENV
echo "STACK=$(basename $GITHUB_REF)" >> $GITHUB_ENV
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.EKS_DEPLOYER_ROLE }}
role-session-name: github
aws-region: ${{ secrets.AWS_REGION }}
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Build and Release
uses: docker/bake-action@v2
env:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}/${{ env.PROJECT }}-${{ env.STACK }}
VERSION: ${{ env.VERSION }}
GITHUB_AUTH_KEY: ${{ env.GITHUB_AUTH_KEY }}
CACHE: type=gha
with:
push: true
files: |
./docker-bake.hcl
- name: Update kube config
run: aws eks update-kubeconfig --name ${{ secrets.EKS_CLUSTER_NAME }} --region ${{ secrets.AWS_REGION }}
- name: Deploy the images 🚀
env:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}/${{ env.PROJECT }}-${{ env.STACK }}
run: |-
set -eu
# run deploy.sh script before deployments
helm upgrade -i ${{ env.PROJECT }} infra/helm -n ${{ env.PROJECT}}-${{ env.STACK }} --set image.repository=${{ env.REGISTRY }} \
--set image.tag=${{ env.VERSION }} --set 'api_host=${{ secrets.API_HOST }}' --set 'socketcluster_host=${{ secrets.SOCKETCLUSTER_HOST }}' \
--set gcp=false --set 'ingress.annotations.kubernetes\.io/ingress\.class=null' --set 'ingress.annotations.alb\.ingress\.kubernetes\.io/scheme=internet-facing' \
--set serviceAccount.name=default --set serviceAccount.create=false --set ingress.className=alb \
--set 'ingress.annotations.alb\.ingress\.kubernetes\.io/listen-ports=[{"HTTPS":443}]' \
--set service.type=NodePort
build_frontend:
name: Build and Deploy the Console
needs: [build_service]
runs-on: ubuntu-latest
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Set Dynamic ENV Vars
run: |
SHORT_COMMIT=$(echo $GITHUB_SHA | cut -c -8)
echo "VERSION=${SHORT_COMMIT}" >> $GITHUB_ENV
echo "STACK=$(basename $GITHUB_REF)" >> $GITHUB_ENV
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.EKS_DEPLOYER_ROLE }}
role-session-name: github
aws-region: ${{ secrets.AWS_REGION }}
- name: Get infra-provided configuration
run: |
set -eu
wget -O- https://github.com/springload/ssm-parent/releases/download/1.8.0/ssm-parent_1.8.0_linux_amd64.tar.gz | tar xvzf - ssm-parent
./ssm-parent -n /actions/${{ env.PROJECT }}/${{ env.STACK }}/configuration dotenv /tmp/dotenv.file
# remove double quotes and pipe into the env
cat /tmp/dotenv.file | sed -e 's/"//g' >> $GITHUB_ENV
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false
- name: Get pnpm Store Directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm Cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Check for _GITHUB_AUTH_TOKEN and create .npmrc
run: |
if [[ -n "${{ secrets._GITHUB_AUTH_TOKEN }}" ]]; then
echo "//npm.pkg.github.com/:_authToken=${{ secrets._GITHUB_AUTH_TOKEN }}" > .npmrc
fi
working-directory: ./console
- name: Install dependencies
run: pnpm install
working-directory: ./console
- name: Build
env:
API_HOST: ${{ secrets.API_HOST }}
SOCKETCLUSTER_HOST: ${{ secrets.SOCKETCLUSTER_HOST }}
SOCKETCLUSTER_PORT: "443" # it uses common ingress so port 443
run: |
set -eu
pnpm build --environment production
working-directory: ./console
- name: Deploy Console 🚀
run: |
set -u
DEPLOY_BUCKET=${STATIC_DEPLOY_BUCKET:-${{ env.PROJECT }}-${{ env.STACK }}}
# this value will come from the dotenv above
echo "Deploying to $DEPLOY_BUCKET"
wget -O- https://github.com/bep/s3deploy/releases/download/v2.11.0/s3deploy_2.11.0_linux-amd64.tar.gz | tar xzv -f - s3deploy
./s3deploy -region ${AWS_REGION} -source console/dist -bucket ${DEPLOY_BUCKET}

11
COMMERCIAL_LICENSE.md Normal file
View File

@@ -0,0 +1,11 @@
FLEETBASE DUAL LICENSE
COPYRIGHT (C) 2024 FLEETBASE PTE LTD.
PERMISSION IS HEREBY GRANTED, FREE OF CHARGE, TO ANY PERSON OBTAINING A COPY OF THIS SOFTWARE AND ASSOCIATED DOCUMENTATION FILES (THE "SOFTWARE"), TO USE THE SOFTWARE FOR NON-COMMERCIAL PURPOSES ONLY. NON-COMMERCIAL PURPOSES INCLUDE INTERNAL OPERATIONS, ACADEMIC RESEARCH, PERSONAL PROJECTS, OR ANY OTHER USE THAT IS NOT INTENDED FOR COMMERCIAL GAIN.
FOR VERSIONS 0.4.10 ONWARDS, YOU ARE PERMITTED TO USE THE SOFTWARE FOR NON-COMMERCIAL PURPOSES FREE OF CHARGE. HOWEVER, COMMERCIAL USE OF THIS SOFTWARE, INCLUDING BUT NOT LIMITED TO BUILDING SAAS PLATFORMS, OFFERING SERVICES TO THIRD PARTIES, OR INTEGRATING WITH COMMERCIAL PRODUCTS, REQUIRES THE PURCHASE OF A COMMERCIAL LICENSE FROM FLEETBASE PTE LTD.
FOR INQUIRIES REGARDING COMMERCIAL LICENSING OR ANY OTHER QUESTIONS RELATED TO FLEETBASE, PLEASE CONTACT HELLO@FLEETBASE.IO.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

21
LICENSE
View File

@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2023 Fleetbase Pte Ltd
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

21
LICENSE.md Normal file
View File

@@ -0,0 +1,21 @@
MIT LICENSE
COPYRIGHT (C) 2023 FLEETBASE PTE LTD
PERMISSION IS HEREBY GRANTED, FREE OF CHARGE, TO ANY PERSON OBTAINING A COPY
OF THIS SOFTWARE AND ASSOCIATED DOCUMENTATION FILES (THE "SOFTWARE"), TO DEAL
IN THE SOFTWARE WITHOUT RESTRICTION, INCLUDING WITHOUT LIMITATION THE RIGHTS
TO USE, COPY, MODIFY, MERGE, PUBLISH, DISTRIBUTE, SUBLICENSE, AND/OR SELL
COPIES OF THE SOFTWARE, AND TO PERMIT PERSONS TO WHOM THE SOFTWARE IS
FURNISHED TO DO SO, SUBJECT TO THE FOLLOWING CONDITIONS:
THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN ALL
COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -9,9 +9,9 @@
"license": "MIT",
"require": {
"php": "^8.0",
"fleetbase/core-api": "^1.4.7",
"fleetbase/fleetops-api": "^0.4.13",
"fleetbase/storefront-api": "^0.3.1",
"fleetbase/core-api": "^1.4.15",
"fleetbase/fleetops-api": "^0.4.23",
"fleetbase/storefront-api": "^0.3.6",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^10.0",
"laravel/octane": "^2.3",

2181
api/composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -27,7 +27,7 @@ return [
'allowed_headers' => ['*'],
'exposed_headers' => [],
'exposed_headers' => ['x-compressed-json', 'access-console-sandbox', 'access-console-sandbox-key'],
'max_age' => 0,

View File

@@ -58,6 +58,7 @@ return [
'bucket' => env('GOOGLE_CLOUD_STORAGE_BUCKET', env('AWS_BUCKET')),
'path_prefix' => env('GOOGLE_CLOUD_STORAGE_PATH_PREFIX', null),
'storage_api_uri' => env('GOOGLE_CLOUD_STORAGE_API_URI', env('AWS_URL')),
'visibility_handler' => \League\Flysystem\GoogleCloudStorage\UniformBucketLevelAccessVisibility::class,
],
],

View File

@@ -17,3 +17,6 @@ php artisan fleetbase:seed
# Restart queue
php artisan queue:restart
# Sync scheduler
php artisan schedule-monitor:sync

View File

@@ -7,6 +7,31 @@
<InputGroup @name="S3 URL" @value={{this.s3Url}} disabled={{this.isLoading}} />
<InputGroup @name="S3 Endpoint" @value={{this.s3Endpoint}} disabled={{this.isLoading}} />
{{/if}}
{{#if (eq this.driver "gcs")}}
{{#if this.isGoogleCloudStorageEnvConfigued}}
<div class="border border-yellow-900 shadow-sm rounded-lg bg-yellow-200 mb-4">
<div class="px-3 py-2 text-sm text-yellow-900 flex items-center">
<FaIcon @icon="triangle-exclamation" @size="md" class="mr-1.5" />
Warning! GCS is already configured in the server environment. Changing values below may break this.
</div>
</div>
{{/if}}
<InputGroup @name="GCS Bucket" @value={{this.gcsBucket}} disabled={{this.isLoading}} />
<InputGroup @name="GCS Service Account Key File" @wrapperClass="">
<div class="flex flex-row items-center mb-0i">
<UploadButton @name="firebase-service-account" @accept="text/plain,text/javascript,application/json" @onFileAdded={{this.uploadGcsCredentialsFile}} @buttonText="Upload Service Account JSON" @icon="upload" class="w-auto m-0i mt-0i" />
{{#if this.gcsCredentialsFile}}
<div class="ml-2.5 text-sm dark:text-white text-black flex flex-row items-center border border-blue-500 rounded-lg px-2 py-0.5 -mt-1">
<FaIcon @icon="file-text" @size="sm" class="mr-2 dark:text-white text-black" />
<span>{{this.gcsCredentialsFile.original_filename}}</span>
<a href="javascript:;" class="text-red-500 ml-2" {{on "click" this.removeGcsCredentialsFile}}>
<FaIcon @icon="times" class="text-red-500" />
</a>
</div>
{{/if}}
</div>
</InputGroup>
{{/if}}
{{#if this.testResponse}}
<div class="animate-pulse flex flex-row items-center rounded-lg border {{if (eq this.testResponse.status 'error') 'border-red-900 bg-red-800 text-red-100' 'border-green-900 bg-green-800 text-green-100'}} shadow-sm my-2 px-4 py-2">
<FaIcon @icon={{if (eq this.testResponse.status 'error') 'triangle-exclamation' 'circle-check'}} class="mr-1.5 {{if (eq this.testResponse.status 'error') 'text-red-200' 'text-green-200'}}" />

View File

@@ -6,6 +6,7 @@ import { action } from '@ember/object';
export default class ConfigureFilesystemComponent extends Component {
@service fetch;
@service notifications;
@service currentUser;
@tracked isLoading = false;
@tracked testResponse;
@tracked disks = [];
@@ -13,6 +14,10 @@ export default class ConfigureFilesystemComponent extends Component {
@tracked s3Bucket = null;
@tracked s3Url = null;
@tracked s3Endpoint = null;
@tracked gcsBucket = null;
@tracked gcsCredentialsFileId = null;
@tracked gcsCredentialsFile = null;
@tracked isGoogleCloudStorageEnvConfigued = false;
/**
* Creates an instance of ConfigureFilesystemComponent.
@@ -59,6 +64,8 @@ export default class ConfigureFilesystemComponent extends Component {
url: this.s3Url,
endpoint: this.s3Endpoint,
},
gcsCredentialsFileId: this.gcsCredentialsFileId,
gcsBucket: this.gcsBucket,
})
.then(() => {
this.notifications.success('Filesystem configuration saved.');
@@ -82,4 +89,31 @@ export default class ConfigureFilesystemComponent extends Component {
this.isLoading = false;
});
}
@action removeGcsCredentialsFile() {
this.gcsCredentialsFileId = undefined;
this.gcsCredentialsFile = undefined;
}
@action uploadGcsCredentialsFile(file) {
try {
this.fetch.uploadFile.perform(
file,
{
path: 'gcs',
subject_uuid: this.currentUser.companyId,
subject_type: 'company',
type: 'gcs_credentials',
},
(uploadedFile) => {
console.log('uploadedFile', uploadedFile);
this.gcsCredentialsFileId = uploadedFile.id;
this.gcsCredentialsFile = uploadedFile;
console.log('this.gcsCredentialsFile', this.gcsCredentialsFile);
}
);
} catch (error) {
this.notifications.serverError(error);
}
}
}

View File

@@ -24,7 +24,7 @@ export default class ConfigureNotificationChannelsComponent extends Component {
production: true,
};
@tracked firebase = {
credentials: ''
credentials: '',
};
constructor() {
@@ -56,7 +56,6 @@ export default class ConfigureNotificationChannelsComponent extends Component {
this.fetch.uploadFile.perform(
file,
{
disk: 'local',
path: 'apn',
subject_uuid: this.currentUser.companyId,
subject_type: 'company',
@@ -82,7 +81,6 @@ export default class ConfigureNotificationChannelsComponent extends Component {
this.fetch.uploadFile.perform(
file,
{
disk: 'local',
path: 'firebase',
subject_uuid: this.currentUser.companyId,
subject_type: 'company',

View File

@@ -50,9 +50,9 @@ export default class ConsoleAccountIndexController extends Controller {
file,
{
path: `uploads/${this.user.company_uuid}/users/${this.user.slug}`,
key_uuid: this.user.id,
key_type: `user`,
type: `user_avatar`,
subject_uuid: this.user.id,
subject_type: 'user',
type: 'user_avatar',
},
(uploadedFile) => {
this.user.setProperties({

View File

@@ -60,6 +60,13 @@ export default class ConsoleAdminOrganizationsIndexUsersController extends Contr
*/
@tracked company;
/**
* The overlay context API.
*
* @memberof ConsoleAdminOrganizationsIndexUsersController
*/
@tracked contextApi;
/**
* Queryable parameters for this controller's model
*

View File

@@ -0,0 +1,65 @@
import Controller from '@ember/controller';
import { tracked } from '@glimmer/tracking';
import { inject as service } from '@ember/service';
import { action } from '@ember/object';
import { task } from 'ember-concurrency';
export default class ConsoleAdminScheduleMonitorLogsController extends Controller {
/**
* The router service.
*
* @memberof ConsoleAdminScheduleMonitorLogsController
*/
@service router;
/**
* The fetch service.
*
* @memberof ConsoleAdminScheduleMonitorLogsController
*/
@service fetch;
/**
* Tracked property for logs.
* @type {Array}
*/
@tracked logs = [];
/**
* Tracked property for the context API.
* @type {Object}
*/
@tracked contextApi;
/**
* Periodically reloads logs every 3 seconds.
*
* @memberof ConsoleAdminScheduleMonitorLogsController
*/
@task *reload(task) {
this.logs = yield this.fetch.get(`schedule-monitor/${task.id}/logs`);
}
/**
* Set the overlay component context object.
*
* @param {Object} contextApi
* @memberof ConsoleAdminOrganizationsIndexUsersController
*/
@action setOverlayContext(contextApi) {
this.contextApi = contextApi;
}
/**
* Handle closing the overlay.
*
* @return {Promise<Transition>}
* @memberof ConsoleAdminOrganizationsIndexUsersController
*/
@action onPressClose() {
if (this.contextApi && typeof this.contextApi.close === 'function') {
this.contextApi.close();
}
return this.router.transitionTo('console.admin.schedule-monitor');
}
}

View File

@@ -1,7 +1,12 @@
export function initialize() {
const socketClusterClientScript = document.createElement('script');
socketClusterClientScript.src = '/assets/socketcluster-client.min.js';
document.body.appendChild(socketClusterClientScript);
// Check if the script already exists
// Only insert the script tag if it doesn't already exist
if (!document.querySelector('script[data-socketcluster-client]')) {
const socketClusterClientScript = document.createElement('script');
socketClusterClientScript.setAttribute('data-socketcluster-client', '1');
socketClusterClientScript.src = '/assets/socketcluster-client.min.js';
document.body.appendChild(socketClusterClientScript);
}
}
export default {

View File

@@ -29,6 +29,7 @@ export default class CategoryModel extends Model {
@attr('string') slug;
@attr('string') order;
@attr('raw') translations;
@attr('raw') meta;
/** @dates */
@attr('date') deleted_at;

View File

@@ -0,0 +1,54 @@
import Model, { attr } from '@ember-data/model';
import { computed } from '@ember/object';
import { getOwner } from '@ember/application';
import { format, formatDistanceToNow } from 'date-fns';
function isValidFileObjectJson(str) {
return typeof str === 'string' && str.startsWith('{') && str.endsWith('}');
}
export default class CustomFieldValueModel extends Model {
/** @ids */
@attr('string') company_uuid;
@attr('string') custom_field_uuid;
@attr('string') subject_uuid;
@attr('string') subject_type;
/** @attributes */
@attr('string') value;
@attr('string') value_type;
/** @dates */
@attr('date') created_at;
@attr('date') updated_at;
@attr('date') deleted_at;
/** @computed */
@computed('value') get asFile() {
const owner = getOwner(this);
const fetch = owner.lookup(`service:fetch`);
const value = this.value;
if (!isValidFileObjectJson(value)) {
return null;
}
const fileModel = fetch.jsonToModel(value, 'file');
return fileModel;
}
@computed('created_at') get createdAgo() {
return formatDistanceToNow(this.created_at);
}
@computed('created_at') get createdAt() {
return format(this.created_at, 'PPP p');
}
@computed('updated_at') get updatedAgo() {
return formatDistanceToNow(this.updated_at);
}
@computed('updated_at') get updatedAt() {
return format(this.updated_at, 'PPP p');
}
}

View File

@@ -0,0 +1,48 @@
import Model, { attr } from '@ember-data/model';
import { computed } from '@ember/object';
import { format, formatDistanceToNow } from 'date-fns';
export default class CustomFieldModel extends Model {
/** @ids */
@attr('string') company_uuid;
@attr('string') category_uuid;
@attr('string') subject_uuid;
@attr('string') subject_type;
/** @attributes */
@attr('string') name;
@attr('string') description;
@attr('string') help_text;
@attr('string') label;
@attr('string') type;
@attr('string') component;
@attr('string') default_value;
@attr('number') order;
@attr('boolean') required;
@attr('boolean', { defaultValue: true }) editable;
@attr('raw') options;
@attr('raw') validation_rules;
@attr('raw') meta;
/** @dates */
@attr('date') created_at;
@attr('date') updated_at;
@attr('date') deleted_at;
/** @computed */
@computed('created_at') get createdAgo() {
return formatDistanceToNow(this.created_at);
}
@computed('created_at') get createdAt() {
return format(this.created_at, 'PPP p');
}
@computed('updated_at') get updatedAgo() {
return formatDistanceToNow(this.updated_at);
}
@computed('updated_at') get updatedAt() {
return format(this.updated_at, 'PPP p');
}
}

View File

@@ -1,6 +1,5 @@
import Model, { attr } from '@ember-data/model';
import { computed } from '@ember/object';
import { format, formatDistanceToNow } from 'date-fns';
export default class NotificationModel extends Model {

View File

@@ -0,0 +1,10 @@
import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
export default class ConsoleAdminScheduleMonitorRoute extends Route {
@service fetch;
model() {
return this.fetch.get('schedule-monitor/tasks');
}
}

View File

@@ -0,0 +1,14 @@
import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
export default class ConsoleAdminScheduleMonitorLogsRoute extends Route {
@service fetch;
model({ id }) {
return this.fetch.get(`schedule-monitor/${id}`);
}
async setupController(controller, model) {
controller.logs = await this.fetch.get(`schedule-monitor/${model.id}/logs`);
}
}

View File

@@ -1,7 +1,7 @@
<Layout::Section::Header @title={{t "common.profile"}} />
<Layout::Section::Body class="overflow-y-scroll h-full">
<div class="container mx-auto h-screen" {{increase-height-by 500}}>
<div class="container mx-auto h-screen">
<div class="max-w-3xl my-10 mx-auto">
<ContentPanel @title={{t "common.your-profile"}} @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
<form class="flex flex-col md:flex-row" {{on "submit" this.saveProfile}}>
@@ -42,4 +42,5 @@
</ContentPanel>
</div>
</div>
<Spacer @height="500px" />
</Layout::Section::Body>

View File

@@ -6,6 +6,7 @@
<Layout::Sidebar::Item @route="console.admin.branding" @icon="palette">{{t "common.branding"}}</Layout::Sidebar::Item>
<Layout::Sidebar::Item @route="console.admin.notifications" @icon="bell">{{t "common.notifications"}}</Layout::Sidebar::Item>
<Layout::Sidebar::Item @route="console.admin.two-fa-settings" @icon="shield-halved">{{t "common.2fa-config"}}</Layout::Sidebar::Item>
<Layout::Sidebar::Item @route="console.admin.schedule-monitor" @icon="calendar-check">{{t "console.admin.schedule-monitor.schedule-monitor"}}</Layout::Sidebar::Item>
{{#each this.universe.adminMenuItems as |menuItem|}}
<Layout::Sidebar::Item
@onClick={{fn this.universe.transitionMenuItem "console.admin.virtual" menuItem}}

View File

@@ -4,7 +4,7 @@
</Layout::Section::Header>
<Layout::Section::Body class="overflow-y-scroll h-full">
<div class="container mx-auto h-screen" {{increase-height-by 300}}>
<div class="container mx-auto h-screen">
<div class="max-w-3xl my-10 mx-auto space-y-6">
<ContentPanel @title={{t "console.admin.branding.title"}} @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
<form class="flex flex-col" {{on "submit" this.save}}>
@@ -63,4 +63,5 @@
</ContentPanel>
</div>
</div>
<Spacer @height="300px" />
</Layout::Section::Body>

View File

@@ -4,7 +4,7 @@
</Layout::Section::Header>
<Layout::Section::Body class="overflow-y-scroll h-full">
<div class="container mx-auto h-screen" {{increase-height-by 1200}}>
<div class="container mx-auto h-screen">
<div class="max-w-3xl my-10 mx-auto space-y-4">
{{#each-in this.groupedNotifications as |groupName notifications|}}
<ContentPanel @title={{concat (smart-humanize groupName) (t "console.admin.notifications.notification-settings") }} @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
@@ -29,4 +29,5 @@
{{/each-in}}
</div>
</div>
<Spacer @height="300px" />
</Layout::Section::Body>

View File

@@ -0,0 +1,34 @@
{{page-title (t "console.admin.schedule-monitor.schedule-monitor")}}
<Layout::Section::Header @title={{t "console.admin.schedule-monitor.schedule-monitor"}} />
<Layout::Section::Body class="overflow-y-scroll h-full">
<div class="next-table-wrapper">
<table>
<thead>
<tr>
<th {{set-width "300px"}}>{{t "console.admin.schedule-monitor.name"}}</th>
<th {{set-width "100px"}}>{{t "console.admin.schedule-monitor.type"}}</th>
<th {{set-width "90px"}}>{{t "console.admin.schedule-monitor.timezone"}}</th>
<th>{{t "console.admin.schedule-monitor.last-started"}}</th>
<th>{{t "console.admin.schedule-monitor.last-finished"}}</th>
<th>{{t "console.admin.schedule-monitor.last-failure"}}</th>
</tr>
</thead>
<tbody>
{{#each @model as |task|}}
<tr>
<td>
<LinkTo @route="console.admin.schedule-monitor.logs" @model={{task}}>{{task.name}}</LinkTo>
</td>
<td>{{task.type}}</td>
<td>{{task.timezone}}</td>
<td>{{n-a task.last_started_at_fmt}}</td>
<td>{{n-a task.last_finished_at_fmt}}</td>
<td>{{n-a task.last_failed_at_fmt}}</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
</Layout::Section::Body>
{{outlet}}

View File

@@ -0,0 +1,34 @@
{{page-title (concat (t "console.admin.schedule-monitor.schedule-monitor") " - " @model.name)}}
<Overlay @isOpen={{true}} @onLoad={{this.setOverlayContext}} @position="right" @noBackdrop={{true}} @fullHeight={{true}} @width="600px" @isResizable={{true}}>
<Overlay::Header @title={{concat (t "console.admin.schedule-monitor.task-logs-for") @model.name}} @titleClass="max-w-400px truncate" @hideStatusDot={{true}} @titleWrapperClass="leading-5">
<div class="flex flex-1 justify-end">
<Button @type="default" @icon="times" @helpText={{t "common.close-and-save"}} @onClick={{this.onPressClose}} />
</div>
</Overlay::Header>
<Overlay::Body>
<div class="p-4">
<div class="flex items-center justify-between mb-4">
<div class="text-sm">{{t "console.admin.schedule-monitor.showing-last-count" count=20}}</div>
<Button @size="xs" @icon="arrows-rotate" @onClick={{perform this.reload @model}} @isLoading={{not this.reload.isIdle}} />
</div>
<div class="space-y-4">
{{#each this.logs as |log|}}
<div class="bg-gray-100 border border-gray-200 dark:border-gray-700 dark:bg-gray-800 rounded-lg p-2 font-mono text-xs">
<div class="font-mono"><span class="font-semibold font-mono">{{t "console.admin.schedule-monitor.date"}}:</span> {{log.created_at_fmt}}</div>
<div class="font-mono"><span class="font-semibold font-mono">{{t "console.admin.schedule-monitor.memory"}}:</span> {{format-bytes log.meta.memory}}</div>
<div class="font-mono"><span class="font-semibold font-mono">{{t "console.admin.schedule-monitor.runtime"}}:</span> {{format-milliseconds log.meta.runtime}}</div>
<div class="font-semibold font-mono mb-2">{{t "console.admin.schedule-monitor.output"}}:</div>
<div class="whitespace-pre-line overflow-hidden bg-black text-green-400 rounded-lg p-2 font-mono text-xs border border-gray-900">
{{#if log.meta.output}}
{{log.meta.output}}
{{else}}
{{t "console.admin.schedule-monitor.no-output"}}
{{/if}}
</div>
</div>
{{/each}}
</div>
</div>
</Overlay::Body>
</Overlay>

View File

@@ -4,7 +4,7 @@
</Layout::Section::Header>
<Layout::Section::Body class="overflow-y-scroll h-full">
<div class="container mx-auto h-screen" {{increase-height-by 1200}}>
<div class="container mx-auto h-screen">
<div class="max-w-3xl my-10 mx-auto space-y-4">
<ContentPanel @title="2FA Config" @open={{true}} @pad={{true}} @panelBodyClass="bg-white dark:bg-gray-800">
{{#if this.loadSystemTwoFaConfig.isIdle}}
@@ -25,4 +25,5 @@
</ContentPanel>
</div>
</div>
<Spacer @height="300px" />
</Layout::Section::Body>

View File

@@ -46,9 +46,13 @@ module.exports = function (environment) {
driverImage: getenv('DEFAULT_DRIVER_IMAGE', 'https://s3.ap-southeast-1.amazonaws.com/flb-assets/static/no-avatar.png'),
userImage: getenv('DEFAULT_USER_IMAGE', 'https://s3.ap-southeast-1.amazonaws.com/flb-assets/static/no-avatar.png'),
contactImage: getenv('DEFAULT_CONTACT_IMAGE', 'https://s3.ap-southeast-1.amazonaws.com/flb-assets/static/no-avatar.png'),
entityImage: getenv('DEFAULT_ENTITY_IMAGE', 'https://flb-assets.s3-ap-southeast-1.amazonaws.com/static/parcels/medium.png'),
vendorImage: getenv('DEFAULT_VENDOR_IMAGE', 'https://s3.ap-southeast-1.amazonaws.com/flb-assets/static/no-avatar.png'),
vehicleImage: getenv('DEFAULT_VEHICLE_IMAGE', 'https://s3.ap-southeast-1.amazonaws.com/flb-assets/static/vehicle-placeholder.png'),
vehicleAvatar: getenv('DEFAUL_VEHICLE_AVATAR', 'https://flb-assets.s3-ap-southeast-1.amazonaws.com/static/vehicle-icons/mini_bus.svg'),
vehicleAvatar: getenv('DEFAULT_VEHICLE_AVATAR', 'https://flb-assets.s3-ap-southeast-1.amazonaws.com/static/vehicle-icons/mini_bus.svg'),
driverAvatar: getenv('DEFAULT_DRIVER_AVATAR', 'https://flb-assets.s3-ap-southeast-1.amazonaws.com/static/driver-icons/moto-driver.png'),
placeAvatar: getenv('DEFAULT_PLACE_AVATAR', 'https://flb-assets.s3-ap-southeast-1.amazonaws.com/static/place-icons/basic-building.png'),
extensionIcon: getenv('DEFAULT_EXTENSION_ICON', 'https://flb-assets.s3.ap-southeast-1.amazonaws.com/static/default-extension-icon.svg'),
},
'ember-simple-auth': {
@@ -60,6 +64,11 @@ module.exports = function (environment) {
keyDelimiter: '/',
includeEmberDataSupport: true,
},
'ember-cli-notifications': {
autoClear: true,
clearDuration: 1000 * 3.5,
},
};
if (environment === 'development') {

View File

@@ -1,6 +1,6 @@
{
"name": "@fleetbase/console",
"version": "0.4.6",
"version": "0.4.15",
"private": true,
"description": "Fleetbase Console",
"repository": "https://github.com/fleetbase/fleetbase",
@@ -29,11 +29,11 @@
"test:ember": "ember test"
},
"dependencies": {
"@fleetbase/ember-core": "^0.2.4",
"@fleetbase/ember-core": "^0.2.8",
"@fleetbase/ember-ui": "^0.2.11",
"@fleetbase/fleetops-engine": "^0.4.13",
"@fleetbase/fleetops-data": "^0.1.9",
"@fleetbase/storefront-engine": "^0.3.1",
"@fleetbase/fleetops-engine": "^0.4.23",
"@fleetbase/fleetops-data": "^0.1.14",
"@fleetbase/storefront-engine": "^0.3.6",
"@fleetbase/dev-engine": "^0.2.1",
"@fleetbase/iam-engine": "^0.0.9",
"@fleetbase/leaflet-routing-machine": "^3.2.16",
@@ -142,9 +142,9 @@
},
"pnpm": {
"overrides": {
"@fleetbase/ember-core": "^0.2.4",
"@fleetbase/ember-core": "^0.2.8",
"@fleetbase/ember-ui": "^0.2.11",
"@fleetbase/fleetops-data": "^0.1.9"
"@fleetbase/fleetops-data": "^0.1.14"
}
},
"prettier": {

596
console/pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -54,6 +54,9 @@ Router.map(function () {
this.route('users', { path: '/:public_id/users' });
});
});
this.route('schedule-monitor', function () {
this.route('logs', { path: '/:id/logs' });
});
});
});
this.route('install');

View File

@@ -0,0 +1,12 @@
import { module, test } from 'qunit';
import { setupTest } from '@fleetbase/console/tests/helpers';
module('Unit | Controller | console/admin/schedule-monitor/logs', function (hooks) {
setupTest(hooks);
// TODO: Replace this with your real tests.
test('it exists', function (assert) {
let controller = this.owner.lookup('controller:console/admin/schedule-monitor/logs');
assert.ok(controller);
});
});

View File

@@ -0,0 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from '@fleetbase/console/tests/helpers';
module('Unit | Model | custom field', function (hooks) {
setupTest(hooks);
// Replace this with your real tests.
test('it exists', function (assert) {
let store = this.owner.lookup('service:store');
let model = store.createRecord('custom-field', {});
assert.ok(model);
});
});

View File

@@ -0,0 +1,14 @@
import { module, test } from 'qunit';
import { setupTest } from '@fleetbase/console/tests/helpers';
module('Unit | Model | custom field value', function (hooks) {
setupTest(hooks);
// Replace this with your real tests.
test('it exists', function (assert) {
let store = this.owner.lookup('service:store');
let model = store.createRecord('custom-field-value', {});
assert.ok(model);
});
});

View File

@@ -0,0 +1,11 @@
import { module, test } from 'qunit';
import { setupTest } from '@fleetbase/console/tests/helpers';
module('Unit | Route | console/admin/schedule-monitor', function (hooks) {
setupTest(hooks);
test('it exists', function (assert) {
let route = this.owner.lookup('route:console/admin/schedule-monitor');
assert.ok(route);
});
});

View File

@@ -0,0 +1,11 @@
import { module, test } from 'qunit';
import { setupTest } from '@fleetbase/console/tests/helpers';
module('Unit | Route | console/admin/schedule-monitor/logs', function (hooks) {
setupTest(hooks);
test('it exists', function (assert) {
let route = this.owner.lookup('route:console/admin/schedule-monitor/logs');
assert.ok(route);
});
});

View File

@@ -16,6 +16,7 @@ common:
confirm: Confirm
edit: Edit
save: Save
save-changes: Save Changes
cancel: Cancel
2fa-config: 2FA Config
account: Account
@@ -59,6 +60,11 @@ common:
users: Users
changelog: Changelog
ok: OK
select-file: Select File
back: Back
next: Next
continue: Continue
done: Done
component:
file:
dropdown-label: File actions
@@ -202,6 +208,22 @@ console:
phone: Your phone number.
photos: photos
admin:
schedule-monitor:
schedule-monitor: Schedule Monitor
task-logs-for: >-
Task Logs For:
showing-last-count: Showing last {count} logs
name: Name
type: Type
timezone: Timezone
last-started: Last Started
last-finished: Last Finished
last-failure: Last Failure
date: Date
memory: Memory
runtime: Runtime
output: Output
no-output: No output
config:
database:
title: Database Configuration

View File

@@ -12,7 +12,32 @@ server {
send_timeout 600;
index index.php;
# tweaks
client_max_body_size 600M;
client_body_buffer_size 1m;
client_header_buffer_size 1k;
large_client_header_buffers 4 16k;
keepalive_timeout 2 2;
#gzip tweaks
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_min_length 1100;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain application/javascript application/json application/x-javascript text/xml text/css;
#open file cache tweaks
open_file_cache max=2000 inactive=20s;
open_file_cache_valid 60s;
open_file_cache_min_uses 5;
open_file_cache_errors off;
location / {
proxy_set_header Host $host;
proxy_pass http://${NGINX_APPLICATION_HOSTNAME}:8000;
}
}

View File

@@ -52,13 +52,13 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- define "helm.commonVariables" -}}
- name: CACHE_URL
value: $(REDIS_SERVICE_PORT)/1
value: tcp://redis-service.{{ .Release.Namespace }}.svc.cluster.local/1
- name: CACHE_DRIVER
value: redis
- name: SOCKETCLUSTER_PORT
value: "80"
- name: SOCKETCLUSTER_HOST
value: $(SOCKETCLUSTER_SERVICE_HOST)
value: socketcluster.{{ .Release.Namespace }}.svc.cluster.local
{{- end }}
{{/*
Create the name of the service account to use

View File

@@ -34,7 +34,11 @@ spec:
- name: {{ .Chart.Name }}-httpd
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
{{- if .Values.gcp }}
image: "{{ .Values.image.repository }}/app-httpd:{{ .Values.image.tag | default .Chart.AppVersion }}"
{{- else }}
image: "{{ .Values.image.repository }}:app-httpd-{{ .Values.image.tag | default .Chart.AppVersion }}"
{{- end }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: NGINX_APPLICATION_HOSTNAME
@@ -56,7 +60,11 @@ spec:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
{{- if .Values.gcp }}
image: "{{ .Values.image.repository }}/app:{{ .Values.image.tag | default .Chart.AppVersion }}"
{{- else }}
image: "{{ .Values.image.repository }}:app-{{ .Values.image.tag | default .Chart.AppVersion }}"
{{- end }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
envFrom:
- secretRef:

View File

@@ -35,7 +35,11 @@ spec:
command: ["php", "artisan", "queue:work"]
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
{{- if .Values.gcp }}
image: "{{ .Values.image.repository }}/events:{{ .Values.image.tag | default .Chart.AppVersion }}"
{{- else }}
image: "{{ .Values.image.repository }}:events-{{ .Values.image.tag | default .Chart.AppVersion }}"
{{- end }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
envFrom:
- secretRef:
@@ -93,7 +97,11 @@ spec:
- name: scheduler
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
{{- if .Values.gcp }}
image: "{{ .Values.image.repository }}/scheduler:{{ .Values.image.tag | default .Chart.AppVersion }}"
{{- else }}
image: "{{ .Values.image.repository }}:scheduler-{{ .Values.image.tag | default .Chart.AppVersion }}"
{{- end }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
envFrom:
- secretRef:

View File

@@ -10,7 +10,7 @@ metadata:
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
annotations:
"helm.sh/hook": pre-install,pre-upgrade
"helm.sh/hook-weight": "0"
"helm.sh/hook-weight": "20"
"helm.sh/hook-delete-policy": before-hook-creation
spec:
template:
@@ -28,8 +28,12 @@ spec:
- name: deployment-job
securityContext:
{{- toYaml .Values.securityContext | nindent 10 }}
{{- if .Values.gcp }}
image: "{{ .Values.image.repository }}/app:{{ .Values.image.tag | default .Chart.AppVersion }}"
command: ["./deploy.sh"]
{{- else }}
image: "{{ .Values.image.repository }}:app-{{ .Values.image.tag | default .Chart.AppVersion }}"
{{- end }}
args: ["./deploy.sh"]
env:
{{- include "helm.commonVariables" . | nindent 12 }}
envFrom:

View File

@@ -44,7 +44,7 @@ spec:
pathType: ImplementationSpecific
backend:
service:
name: fleetbase-app
name: {{ include "helm.fullname" . }}
port:
number: {{ $svcPort }}
- host: {{ .Values.socketcluster_host }}

View File

@@ -30,4 +30,3 @@ spec:
port: 6379
targetPort: 6379
type: ClusterIP

View File

@@ -32,5 +32,4 @@ spec:
- protocol: TCP
port: 80
targetPort: 8000
type: ClusterIP
type: {{ .Values.service.type }}