* helm lib update
* helm handler requires kubernetes deployer to modify helm deployed resources
* AddAppLabels updated to be more generic - support for adding multiple labels using map
* path installed helm release manifest with portainer labels using kubectl
* updated helm handler unit tests to use mock KubernetesDeployer
* adding labels to manifest retrieved from release
* optional namespace support for k8s raw manifest deployment
* - inline postprocessing support when extracting
- get namespace from yaml support
- added and updated tests
* lowercase error wrapping
* updated libhelm dep
* feat(kubeshell) allow overriding default kubeshell
* Add missing error check and struct tag
* Add migrator for kube shell image and add it as a default in the db
* Fix file name to match migrator pattern
* remove default as it's now coming from the db
* remove blank line
* - conflict resolution code update
- logging migration error on migration failures
* - migrateDBVersionTo34 -> migrateDBVersionToDB34 (naming consistency)
Co-authored-by: zees-dev <dev.786zshan@gmail.com>
* backport migration EE code structure
* filesystem copy function
* set db status to updating before migration - reset on completion
* support for auto-backup on version upgrade
* - rollback cli flag support (with confirmation)
- rollback implementation backport from EE
* removed edition as it is not required in CE
* migrated test datastore from bolttest to bolt package to make it usable for testing
* backported failsafe migration
* - backported tests from EE
- refactored tests to use test datastore
* test store implementing datastore interface
* addressed PR issues/improvements
* refactor test
* added backup file removal error logging
* resolved conflicts, updated code
* fixed missing bolttest package - migrated to bolt
* feat(migration): wrap migration errors to provide context for failure EE-1742 (#5711)
* feat(migrator): wrap errors to provide more context to failures EE-1742
* add overall failure back in. diff log file
* updated helm tests pointing to correct teststore
Co-authored-by: Matt Hook <hookenz@gmail.com>
* feat(helm): add helm chart backport to ce EE-1409 (#5425)
* EE-1311 Helm Chart Backport from EE
* backport to ce
Co-authored-by: Matt Hook <hookenz@gmail.com>
* feat(helm): list and configure helm chart (#5431)
* backport and tidyup code
* --amend
* using rocket icon for charts
* helm chart bugfix - clear category button
* added matomo analytics for helm chart install
* fix web editor exit warning without changes
* editor modified exit bugfix
* fixed notifications typo
* updated helm template text
* helper text to convey slow helm templates load
Co-authored-by: zees-dev <dev.786zshan@gmail.com>
* removing redundant time-consuming api call by using prop attribute
* feat(helm) helm chart backport from ee EE-1311 (#5436)
* Add missing defaultHelmRepoUrl and mock testing
* Backport EE-1477
* Backport updates to helm tests from EE
* add https by default changes and ssl to tls renaming from EE
* Port install integration test. Disabled by default to pass CI checks
* merged changes from EE for the integration test
* kube proxy whitelist updated to support internal helm install command
Co-authored-by: zees-dev <dev.786zshan@gmail.com>
* Pull in all changes from tech review in EE-943
* added helm to sidebar after rebase, sync CE with EE
* bugfix: kubectl shell not opening - bearer token bug
* tidy go modules & remove yarn-error.log
* removed redundant handler (not used) - to match EE
* resolved merge conflicts, updated code
* feat(helm/views): helm release and application views EE-1236 (#5529)
* feat(helm): add helm chart backport to ce EE-1409 (#5425)
* EE-1311 Helm Chart Backport from EE
* backport to ce
Co-authored-by: Matt Hook <hookenz@gmail.com>
* Pull in all changes from tech review in EE-943
* added helm to sidebar after rebase, sync CE with EE
* removed redundant handler (not used) - to match EE
* feat(helm) display helm charts - backend EE-1236
* copy over components for new applications view EE-1236
* Add new applications datatable component
* Add more migrated files
* removed test not applicable to CE
* baclkported EE app data table code to CE
* removed redundant helm repo url
* resolved conflicts, updated code
* using endpoint middleware
* PR review fixes
* using constants, openapi updated
Co-authored-by: Richard Wei <54336863+WaysonWei@users.noreply.github.com>
Co-authored-by: zees-dev <dev.786zshan@gmail.com>
* fixed test conflicts, go linted
* feat(helm/templates-add): helm templates add repo for user support EE-1278 (#5514)
* feat(helm): add helm chart backport to ce EE-1409 (#5425)
* EE-1311 Helm Chart Backport from EE
* backport to ce
Co-authored-by: Matt Hook <hookenz@gmail.com>
* feat(helm) helm chart backport from ee EE-1311 (#5436)
* Add missing defaultHelmRepoUrl and mock testing
* Backport EE-1477
* Backport updates to helm tests from EE
* add https by default changes and ssl to tls renaming from EE
* Port install integration test. Disabled by default to pass CI checks
* merged changes from EE for the integration test
* kube proxy whitelist updated to support internal helm install command
Co-authored-by: zees-dev <dev.786zshan@gmail.com>
* Pull in all changes from tech review in EE-943
* feat(helm): add helm chart backport to ce EE-1409 (#5425)
* EE-1311 Helm Chart Backport from EE
* backport to ce
Co-authored-by: Matt Hook <hookenz@gmail.com>
* Pull in all changes from tech review in EE-943
* added helm to sidebar after rebase, sync CE with EE
* backport EE-1278, squashed, diffed, updated
* helm install openapi spec update
* resolved conflicts, updated code
* - matching ee codebase at 0afe57034449ee0e9f333d92c252a13995a93019
- helm install using endpoint middleware
- remove trailing slash from added/persisted helm repo urls
* feat(helm) use libhelm url validator and improved path assembly EE-1554 (#5561)
* feat(helm/userrepos) fix getting global repo for ordinary users EE-1562 (#5567)
* feat(helm/userrepos) fix getting global repo for ordinary users EE-1562
* post review changes and further backported changes from EE
* resolved conflicts, updated code
* fixed helm_install handler unit test
* user cannot add existing repo if suffix is '/' (#5571)
* feat(helm/docs) fix broken swagger docs EE-1278 (#5572)
* Fix swagger docs
* minor correction
* fix(helm): migrating code from user handler to helm handler (#5573)
* - migrated user_helm_repos to helm endpoint handler
- migrated api operations from user factory/service to helm factory/service
- passing endpointId into helm service/factory as endpoint provider is deprecated
* upgrade libhelm to hide secrets
Co-authored-by: Matt Hook <hookenz@gmail.com>
* removed duplicate file - due to merge conflict
* dependency injection in helm factory
Co-authored-by: Richard Wei <54336863+WaysonWei@users.noreply.github.com>
Co-authored-by: Matt Hook <hookenz@gmail.com>
* kubernetes.templates -> kubernetes.templates.helm name conflict fix
* Validate the URL added as a public helm repo (#5579)
* fix(helm): helm app deletion fix EE-1581 (#5582)
* updated helm lib to show correct error on uninstall failure
* passing down helm app namespace on deletion
* fix(k8s): EE-1591 non-admin users cannot deploy charts containing secrets (#5590)
Co-authored-by: Simon Meng <simon.meng@portainer.io>
* fix(helm): helm epic bugfixes EE-1582 EE-1593 (#5585)
* - trim trailing slash and lowercase before persisting helm repo
- browser helm templates url /kubernetes/templates/templates -> /kubernetes/templates/helm
- fix publish url
- fix helm repo add refresh
- semi-fix k8s app expansion
* Tidy up swagger documentation related to helm. Make json consistent
* fixed helm release page for non-default namespaces
* k8s app view table expansion bugfix
* EE-1593: publish url load balancer fallback
Co-authored-by: Matt Hook <hookenz@gmail.com>
* k8s app list fix for charts with deployments containing multiple pods - which use the same label (#5599)
* fix(kubernetes): app list view fix for secrets with long keys or values EE-1600 (#5600)
* k8s app secrets key value text overflow ellipses
* wrapping key value pairs instead of ellipses
* fix(helm): helm apps bundling issue across different namespaces EE-1619 (#5602)
* helm apps bundling issue across different namespaces
* - code comments and indentation to ease reading
- moved namespace calc out of loop
* feat(helm/test) disable slow helm search test by default EE-1599 (#5598)
* skip helm_repo_search as it's an integration test
* switch to portainer built in integration test checker
* make module order match EE
* don't print test struct out when skipping integration test
Co-authored-by: Richard Wei <54336863+WaysonWei@users.noreply.github.com>
Co-authored-by: Matt Hook <hookenz@gmail.com>
Co-authored-by: cong meng <mcpacino@gmail.com>
Co-authored-by: Simon Meng <simon.meng@portainer.io>
* feat(stack): backport changes to CE EE-1189
* feat(stack): front end backport changes to CE EE-1199 (#5455)
* feat(stack): front end backport changes to CE EE-1199
* fix k8s deploy logic
* fixed web editor confirmation message typo. EE-1501
* fix(stack): fixed issue auth detail not remembered EE-1502 (#5459)
* show status in buttons
* removed onChangeRef function.
* moved buttons in git form to its own component
* removed unused variable.
Co-authored-by: ArrisLee <arris_li@hotmail.com>
* moved formvalue to kube app component
* fix(stack): failed to pull and redeploy compose format k8s stack
* fixed form value
* fix(k8s): file content overridden when deployment failed with compose format EE-1548
* updated API response to get IsComposeFormat and show appropriate text.
* error message updates for different file type
* not display creation source for external application
* added confirmation modal to advanced app created by web editor
* stop showing confirmation modal when updating application
* disable rollback button when application type is not applicatiom form
* added analytics-on directive to pull and redeploy button
* fix(kube): don't valide resource control access for kube (#5568)
* added question marks to k8s app confirmation modal
* fix(k8s): Git authentication info not persisted
* removed unused function.
Co-authored-by: Hui <arris_li@hotmail.com>
Co-authored-by: fhanportainer <79428273+fhanportainer@users.noreply.github.com>
Co-authored-by: Felix Han <felix.han@portainer.io>
* - fixed zombie kubectl shell pod issue
- fixed bug with websocket connection error
* exec error if not websocket disconnect
* StartExecProcess updated to write error to channel
* feat(kubeconfig) EE-1153 Introduce the ability to change the expiry of a kubeconfig
* feat(kubeconfig) EE-1153 pr feedback update
* feat(kubeconfig) EE-1153 code cleanup
Co-authored-by: Simon Meng <simon.meng@portainer.io>
* feat(nodes limits)Review the resource assignement when creating a Kubernetes application EE-437
* feat(nodes limits) review feedback EE-437
* feat(nodes limits) workaround for lodash cloneDeep not working in production mode EE-437
* feat(nodes limits) calculate max cpu of slide bar with floor function instead of round function EE-437
* feat(nodes limits) another review feedback EE-437
* feat(nodes limits) cleanup code EE-437
* feat(nodes limits) EE-437 pr feedback update
* feat(nodes limits) EE-437 rebase onto develop branch
* feat(nodes limits) EE-437 another pr feedback update
Co-authored-by: Simon Meng <simon.meng@portainer.io>
* feat(k8s/resource-pool): add the ability to mark/unmark resource pool as system
fix(kube/ns): check label to see if namespace is system
refactor(k8s/namespaces): rename variables
feat(kubernetes): toggle system state in the server (#5361)
fix(app/resource-pool): UI fixes
feat(app/resource-pool): add confirmation modal when unamrking system namespace
* refactor(app): review changes
* feat(app/namespaces): introduce store to retrieve namespace system status without changing all the kubernetes models
refactor(app/namespaces): remove unused code first introduced for system tagging
fix(app/namespaces): cache namespaces to retrieve system status regardless of namespace reference format
refactor(app): migrate namespace store from helper to a separate singleton
refactor(app): remove KubernetesNamespaceHelper from DI cycle
* refactor(app): normalize usage of KubernetesNamespaceHelper functions
* refactor(app/k8s): change namespace store to functions instead of class
Co-authored-by: LP B <xAt0mZ@users.noreply.github.com>
* fix(advance deploy): EE-1141 A standard user can escalate to cluster administrator privileges on Kubernetes
* fix(advance deploy): EE-1141 reuse existing token cache when do deployment
* fix: EE-1141 use user's SA token to exec pod command
* fix: EE-1141 stop advanced-deploy or pod-exec if user's SA token is empty
* fix: EE-1141 resolve merge conflicts
Co-authored-by: Simon Meng <simon.meng@portainer.io>
* EE oauth team memberships feature teaser
* bugfix: deleting a default team should reset default team id to 0
* error wrapping, refactor team deletion code
* intermediate commit
* feat(registry): backport ProGet registry to CE (#954)
* backport EE changes
* label updates and remove auth-toggle
Co-authored-by: Dennis Buduev <dennis.buduev@portainer.io>
* fix(stack) ignore username and password when authentication is disabled EE-161
* fix(stack) ignore username and password when authentication is disabled for stack creation EE-161
Co-authored-by: Simon Meng <simon.meng@portainer.io>
* fix(k8s) cleaning up namespace access policies when removing users or teams from endpoint or endpoint group EE-718
* fix(k8s) minor code cleanup EE-718
Co-authored-by: Simon Meng <simon.meng@portainer.io>
* feat(git): save git config when creating stack (#5048)
* feat(git): save git config when creating stack
* chore(fs): test fileExists
* fix(git): fix tests to use CloneRepository
* refactor(git): move options to new object
* feat(stacks): redeploy git stack api (#5112)
* feat(stacks): redeploy git stacks form
[EE-666]
* feat(stack): show loading after confirmation
* fix(stacks): show same size description
* fix(stacks): reload state when deployed
* feat(stacks): set stopped stacks status to activate when updating
* feat(stacks): backup stack folder before cloning
* feat(stacks): don't accept prune and env on update git
Co-authored-by: Chaim Lev-Ari <chiptus@users.noreply.github.com>
Co-authored-by: Chaim Lev-Ari <chiptus@gmail.com>
* add updateSettingsToDB28 func and test
* update DBversion const
* migration func naming modification
* feat(oauth): add sso, hide internal auth teaser and logout options. (#5039)
* cleanup and make helper func for unit testing
* dbversion update
* feat(publicSettings): public settings response modification for OAuth SSO EE-608 (#5062)
* feat(oauth): updated logout logic with logoutUrl. (#5064)
* add exclusive token generation for OAuth
* swagger annotation revision
* add unit test
* updates based on tech review feedback
* feat(oauth): updated oauth settings model
* feat(oauth): added oauth logout url
* feat(oauth): fixed SSO toggle and logout issue.
* set SSO to ON by default
* update migrator unit test
* set SSO to true by default for new instance
* prevent applying the SSO logout url to the initial admin user
Co-authored-by: fhanportainer <79428273+fhanportainer@users.noreply.github.com>
Co-authored-by: Felix Han <felix.han@portainer.io>
* feat(stack): add the ability for an administrator user to manage orphaned stacks (#4397)
* feat(stack): apply small font size to the information text of associate (#4397)
Co-authored-by: Simon Meng <simon.meng@portainer.io>
* refactor(http/kube): convert compose format
* feat(kube/deploy): deploy to agent
* feat(kube/deploy): show more details about error
* refactor(kube): return string from deploy
* feat(kube/deploy): revert to use local kubectl
* Revert "feat(kube/deploy): revert to use local kubectl"
This reverts commit 7c4a1c70
* feat(kube/deploy): GH#4321 use the v2 version of agent api instead of v3
Co-authored-by: Chaim Lev-Ari <chiptus@gmail.com>
Co-authored-by: Simon Meng <simon.meng@portainer.io>
* feat(dockerhub): introduce local status endpoint
* feat(proxy): rewrite request with dockerhub credentials
* feat(endpoint): check env type
* feat(endpoint): check for local endpoint
* feat(docker): introduce client side service to get limits
* feat(container): add info about rate limits in container
* feat(dockerhub): load rate limits just for specific endpoints
* feat(images): show specific dockerhub messages for admin
* feat(service-create): show docker rate limits
* feat(service-edit): show rate limit messages
* fix(images): fix loading of page
* refactor(images): move rate limits check to container
* feat(kubernetes): proxy agent requests
* feat(kubernetes/apps): show pull limits in application creation
* refactor(image-registry): move warning to end of field
* fix(image-registry): show right message for admin
* fix(images): silently fail when loading rate limits
* fix(kube/apps): use new rate limits comp
* fix(images): move rate warning to end
* fix(registry): move search to right place
* fix(service): remove service warning
* fix(endpoints): check if kube endpoint is local
* feat(k8s): better form validation for configuration keys (#4728) (#4733)
Co-authored-by: Simon Meng <simon.meng@portainer.io>
* feat(home): show edge valid tag
* fix(endpoint): show right heartbeat
* style(endpoints): add some comments
Co-authored-by: cong meng <mcpacino@gmail.com>
Co-authored-by: Simon Meng <simon.meng@portainer.io>
* refactor(stack): create unique name function
* refactor(stack): change stack resource control id
* feat(stacks): validate stack unique name in endpoint
* feat(stacks): prevent name collision with external stacks
* refactor(stacks): move resource id util
* refactor(stacks): supply resource id util with name and endpoint
* fix(docker): calculate swarm resource id
* feat(stack): prevent migration if stack name already exist
* feat(authorization): use stackutils
* feat(custom-templates): switching a template to standalone makes it disappear in swarm mode
* feat(custom-template): disable deploy button and add an error message
* fix(custom-template): invert variable
* fix(custom-templates): put the warning message below the button
* feat(compose): add docker-compose wrapper
ce-187
* fix(compose): pick compose implementation upon startup
* Add static compose build for linux
* Fix wget
* Fix platofrm specific docker-compose download
* Keep amd64 architecture as download parameter
* Add tmp folder for docker-compose
* fix: line endings
* add proxy server
* logs
* Proxy
* Add lite transport for compose
* Fix local deployment
* refactor: pass proxyManager by ref
* fix: string conversion
* refactor: compose wrapper remove unused code
* fix: tests
* Add edge
* Fix merge issue
* refactor: remove unused code
* Move server to proxy implementation
* Cleanup wrapper and manager
* feat: pass max supported compose syntax version with each endpoint
* fix: pick compose syntax version
* fix: store wrapper version in portainer
* Get and show composeSyntaxMaxVersion at stack creation screen
* Get and show composeSyntaxMaxVersion at stack editor screen
* refactor: proxy server
* Fix used tmp
* Bump docker-compose to 1.28.0
* remove message for docker compose limitation
* fix: markup typo
* Rollback docker compose to 1.27.4
* * attempt to fix the windows build issue
* * attempt to debug grunt issue
* * use console log in grunt file
* fix: try to fix windows build by removing indirect deps from go.mod
* Remove tmp folder
* Remove builder stage
* feat(build/windows): add git for Docker Compose
* feat(build/windows): add git for Docker Compose
* feat(build/windows): add git for Docker Compose
* feat(build/windows): add git for Docker Compose
* feat(build/windows): add git for Docker Compose
* feat(build/windows): add git for Docker Compose - fixed verbose output
* refactor: renames
* fix(stack): get endpoint by EndpointProvider
* fix(stack): use margin to add space between line instead of using br tag
Co-authored-by: Stéphane Busso <stephane.busso@gmail.com>
Co-authored-by: Simon Meng <simon.meng@portainer.io>
Co-authored-by: yi-portainer <yi.chen@portainer.io>
Co-authored-by: Steven Kang <skan070@gmail.com>
* feat(docker/stacks): add creation and update dates
* feat(docker/stacks): put ownership column as the last column
* feat(docker/stacks): fix the no stacks message
* refactor(docker/stacks): make external stacks helpers more readable
* feat(docker/stacks): add updated and created by
* feat(docker/stacks): toggle updated column
* refactor(datatable): create column visibility component
Co-authored-by: alice groux <alice.grx@gmail.com>
* feat(docker/stacks): add creation and update dates
* feat(docker/stacks): put ownership column as the last column
* feat(docker/stacks): fix the no stacks message
* refactor(oauth): move oauth client code
* feat(oauth): move extension code into server code
* feat(oauth): enable oauth without extension
* refactor(oauth): make it easier to remove providers
* feat(settings): introduce settings to allow/disable
* feat(settings): update the setting
* feat(docker): prevent user from using caps if disabled
* refactor(stacks): revert file
* style(api): remove portainer ns
* feat(stacks): add a setting to disable the creation of stacks for non-admin users
* feat(settings): introduce a setting to prevent non-admin from stack creation
* feat(settings): update stack creation setting
* feat(settings): fail stack creation if user is non admin
* fix(settings): save preventStackCreation setting to state
* feat(stacks): disable add button when settings is enabled
* format(stacks): remove line
* feat(stacks): setting to hide stacks from users
* feat(settings): rename disable stacks setting
* refactor(settings): rename setting to disableStackManagementForRegularUsers
* feat(settings): hide stacks for non admin when settings is set
* refactor(settings): replace disableDeviceMapping with allow
* feat(dashboard): hide stacks if settings disabled and non admin
* refactor(sidebar): check if user is endpoint admin
* feat(settings): set the default value for stack management
* feat(settings): rename field label
* fix(sidebar): refresh show stacks state
* fix(docker): hide stacks when not admin