2016-12-18 05:21:29 +00:00
package portainer
2020-05-20 05:23:15 +00:00
import (
2021-08-05 03:02:06 +00:00
"context"
2020-07-05 23:21:03 +00:00
"io"
2020-05-20 05:23:15 +00:00
"time"
2021-06-15 21:11:35 +00:00
gittypes "github.com/portainer/portainer/api/git/types"
2021-08-05 03:02:06 +00:00
v1 "k8s.io/api/core/v1"
2020-05-20 05:23:15 +00:00
)
2019-07-25 22:38:07 +00:00
2016-12-18 05:21:29 +00:00
type (
2020-04-08 21:26:11 +00:00
// AccessPolicy represent a policy that can be associated to a user or team
AccessPolicy struct {
2021-02-23 03:21:39 +00:00
// Role identifier. Reference the role that will be associated to this access policy
RoleID RoleID ` json:"RoleId" example:"1" `
2020-04-08 21:26:11 +00:00
}
2020-08-04 00:44:17 +00:00
// AgentPlatform represents a platform type for an Agent
AgentPlatform int
2020-04-08 21:26:11 +00:00
// AuthenticationMethod represents the authentication method used to authenticate a user
AuthenticationMethod int
// Authorization represents an authorization associated to an operation
Authorization string
// Authorizations represents a set of authorizations associated to a role
Authorizations map [ Authorization ] bool
// AzureCredentials represents the credentials used to connect to an Azure
2021-09-20 00:14:22 +00:00
// environment(endpoint).
2020-04-08 21:26:11 +00:00
AzureCredentials struct {
2021-02-23 03:21:39 +00:00
// Azure application ID
ApplicationID string ` json:"ApplicationID" example:"eag7cdo9-o09l-9i83-9dO9-f0b23oe78db4" `
// Azure tenant ID
TenantID string ` json:"TenantID" example:"34ddc78d-4fel-2358-8cc1-df84c8o839f5" `
// Azure authentication key
AuthenticationKey string ` json:"AuthenticationKey" example:"cOrXoK/1D35w8YQ8nH1/8ZGwzz45JIYD5jxHKXEQknk=" `
2016-12-18 05:21:29 +00:00
}
2021-11-29 13:06:50 +00:00
// OpenAMTConfiguration represents the credentials and configurations used to connect to an OpenAMT MPS server
OpenAMTConfiguration struct {
Enabled bool ` json:"Enabled" `
2021-11-30 23:35:47 +00:00
MPSServer string ` json:"MPSServer" `
2021-11-29 13:06:50 +00:00
Credentials MPSCredentials ` json:"Credentials" `
DomainConfiguration DomainConfiguration ` json:"DomainConfiguration" `
WirelessConfiguration * WirelessConfiguration ` json:"WirelessConfiguration" `
}
MPSCredentials struct {
MPSUser string ` json:"MPSUser" `
MPSPassword string ` json:"MPSPassword" `
MPSToken string ` json:"MPSToken" ` // retrieved from API
}
DomainConfiguration struct {
CertFileText string ` json:"CertFileText" `
CertPassword string ` json:"CertPassword" `
DomainName string ` json:"DomainName" `
}
WirelessConfiguration struct {
AuthenticationMethod string ` json:"AuthenticationMethod" `
EncryptionMethod string ` json:"EncryptionMethod" `
SSID string ` json:"SSID" `
PskPass string ` json:"PskPass" `
}
2018-08-21 18:40:42 +00:00
// CLIFlags represents the available flags on the CLI
2016-12-18 05:21:29 +00:00
CLIFlags struct {
2020-06-16 07:55:45 +00:00
Addr * string
2021-08-10 04:59:47 +00:00
AddrHTTPS * string
2020-06-16 07:55:45 +00:00
TunnelAddr * string
TunnelPort * string
AdminPassword * string
AdminPasswordFile * string
Assets * string
Data * string
2021-11-11 18:49:50 +00:00
FeatureFlags * [ ] Pair
2020-06-16 07:55:45 +00:00
EnableEdgeComputeFeatures * bool
EndpointURL * string
Labels * [ ] Pair
Logo * string
NoAnalytics * bool
Templates * string
TLS * bool
TLSSkipVerify * bool
TLSCacert * string
TLSCert * string
TLSKey * string
2021-08-10 04:59:47 +00:00
HTTPDisabled * bool
2021-12-14 00:40:44 +00:00
HTTPEnabled * bool
2020-06-16 07:55:45 +00:00
SSL * bool
SSLCert * string
SSLKey * string
2021-09-27 00:52:50 +00:00
Rollback * bool
2020-06-16 07:55:45 +00:00
SnapshotInterval * string
2021-12-03 01:34:45 +00:00
BaseURL * string
2017-06-01 08:14:55 +00:00
}
2020-07-06 23:18:39 +00:00
// CustomTemplate represents a custom template
CustomTemplate struct {
2021-02-23 03:21:39 +00:00
// CustomTemplate Identifier
ID CustomTemplateID ` json:"Id" example:"1" `
// Title of the template
Title string ` json:"Title" example:"Nginx" `
// Description of the template
Description string ` json:"Description" example:"High performance web server" `
// Path on disk to the repository hosting the Stack file
ProjectPath string ` json:"ProjectPath" example:"/data/custom_template/3" `
// Path to the Stack file
EntryPoint string ` json:"EntryPoint" example:"docker-compose.yml" `
// User identifier who created this template
CreatedByUserID UserID ` json:"CreatedByUserId" example:"3" `
// A note that will be displayed in the UI. Supports HTML content
Note string ` json:"Note" example:"This is my <b>custom</b> template" `
// Platform associated to the template.
// Valid values are: 1 - 'linux', 2 - 'windows'
Platform CustomTemplatePlatform ` json:"Platform" example:"1" enums:"1,2" `
// URL of the template's logo
Logo string ` json:"Logo" example:"https://cloudinovasi.id/assets/img/logos/nginx.png" `
// Type of created stack (1 - swarm, 2 - compose)
Type StackType ` json:"Type" example:"1" `
ResourceControl * ResourceControl ` json:"ResourceControl" `
2020-07-06 23:18:39 +00:00
}
// CustomTemplateID represents a custom template identifier
CustomTemplateID int
// CustomTemplatePlatform represents a custom template platform
CustomTemplatePlatform int
2020-04-08 21:26:11 +00:00
// DockerHub represents all the required information to connect and use the
// Docker Hub
DockerHub struct {
2021-02-23 03:21:39 +00:00
// Is authentication against DockerHub enabled
Authentication bool ` json:"Authentication" example:"true" `
// Username used to authenticate against the DockerHub
Username string ` json:"Username" example:"user" `
// Password used to authenticate against the DockerHub
Password string ` json:"Password,omitempty" example:"passwd" `
2018-12-30 16:02:22 +00:00
}
2021-09-20 00:14:22 +00:00
// DockerSnapshot represents a snapshot of a specific Docker environment(endpoint) at a specific time
2020-07-05 23:21:03 +00:00
DockerSnapshot struct {
Time int64 ` json:"Time" `
DockerVersion string ` json:"DockerVersion" `
Swarm bool ` json:"Swarm" `
TotalCPU int ` json:"TotalCPU" `
TotalMemory int64 ` json:"TotalMemory" `
RunningContainerCount int ` json:"RunningContainerCount" `
StoppedContainerCount int ` json:"StoppedContainerCount" `
HealthyContainerCount int ` json:"HealthyContainerCount" `
UnhealthyContainerCount int ` json:"UnhealthyContainerCount" `
VolumeCount int ` json:"VolumeCount" `
ImageCount int ` json:"ImageCount" `
ServiceCount int ` json:"ServiceCount" `
StackCount int ` json:"StackCount" `
SnapshotRaw DockerSnapshotRaw ` json:"DockerSnapshotRaw" `
2021-12-01 00:18:57 +00:00
NodeCount int ` json:"NodeCount" `
2020-07-05 23:21:03 +00:00
}
// DockerSnapshotRaw represents all the information related to a snapshot as returned by the Docker API
DockerSnapshotRaw struct {
Containers interface { } ` json:"Containers" `
Volumes interface { } ` json:"Volumes" `
Networks interface { } ` json:"Networks" `
Images interface { } ` json:"Images" `
Info interface { } ` json:"Info" `
Version interface { } ` json:"Version" `
}
2020-05-14 02:14:28 +00:00
// EdgeGroup represents an Edge group
EdgeGroup struct {
2021-02-23 03:21:39 +00:00
// EdgeGroup Identifier
ID EdgeGroupID ` json:"Id" example:"1" `
2020-05-14 02:14:28 +00:00
Name string ` json:"Name" `
Dynamic bool ` json:"Dynamic" `
TagIDs [ ] TagID ` json:"TagIds" `
2021-09-21 05:41:27 +00:00
Endpoints [ ] EndpointID ` json:"Endpoints" `
2020-05-14 02:14:28 +00:00
PartialMatch bool ` json:"PartialMatch" `
}
// EdgeGroupID represents an Edge group identifier
EdgeGroupID int
2021-09-20 00:14:22 +00:00
// EdgeJob represents a job that can run on Edge environments(endpoints).
2020-06-25 03:25:51 +00:00
EdgeJob struct {
2021-02-23 03:21:39 +00:00
// EdgeJob Identifier
ID EdgeJobID ` json:"Id" example:"1" `
2020-06-25 03:25:51 +00:00
Created int64 ` json:"Created" `
CronExpression string ` json:"CronExpression" `
2021-09-21 05:41:27 +00:00
Endpoints map [ EndpointID ] EdgeJobEndpointMeta ` json:"Endpoints" `
2020-06-25 03:25:51 +00:00
Name string ` json:"Name" `
ScriptPath string ` json:"ScriptPath" `
Recurring bool ` json:"Recurring" `
Version int ` json:"Version" `
}
2021-09-20 00:14:22 +00:00
// EdgeJobEndpointMeta represents a meta data object for an Edge job and Environment(Endpoint) relation
2020-06-25 03:25:51 +00:00
EdgeJobEndpointMeta struct {
LogsStatus EdgeJobLogsStatus
CollectLogs bool
}
// EdgeJobID represents an Edge job identifier
EdgeJobID int
// EdgeJobLogsStatus represent status of logs collection job
EdgeJobLogsStatus int
2021-09-20 00:14:22 +00:00
// EdgeSchedule represents a scheduled job that can run on Edge environments(endpoints).
2020-06-25 03:25:51 +00:00
// Deprecated in favor of EdgeJob
2020-04-08 21:26:11 +00:00
EdgeSchedule struct {
2021-02-23 03:21:39 +00:00
// EdgeSchedule Identifier
ID ScheduleID ` json:"Id" example:"1" `
2020-04-08 21:26:11 +00:00
CronExpression string ` json:"CronExpression" `
Script string ` json:"Script" `
Version int ` json:"Version" `
2021-09-21 05:41:27 +00:00
Endpoints [ ] EndpointID ` json:"Endpoints" `
2020-04-08 21:26:11 +00:00
}
2020-05-14 02:14:28 +00:00
//EdgeStack represents an edge stack
EdgeStack struct {
2021-02-23 03:21:39 +00:00
// EdgeStack Identifier
2021-09-09 08:38:34 +00:00
ID EdgeStackID ` json:"Id" example:"1" `
Name string ` json:"Name" `
Status map [ EndpointID ] EdgeStackStatus ` json:"Status" `
CreationDate int64 ` json:"CreationDate" `
EdgeGroups [ ] EdgeGroupID ` json:"EdgeGroups" `
ProjectPath string ` json:"ProjectPath" `
EntryPoint string ` json:"EntryPoint" `
Version int ` json:"Version" `
ManifestPath string
DeploymentType EdgeStackDeploymentType
// Deprecated
Prune bool ` json:"Prune" `
2020-05-14 02:14:28 +00:00
}
2021-09-09 08:38:34 +00:00
EdgeStackDeploymentType int
2020-05-14 02:14:28 +00:00
//EdgeStackID represents an edge stack id
EdgeStackID int
//EdgeStackStatus represents an edge stack status
EdgeStackStatus struct {
Type EdgeStackStatusType ` json:"Type" `
Error string ` json:"Error" `
EndpointID EndpointID ` json:"EndpointID" `
}
//EdgeStackStatusType represents an edge stack status type
EdgeStackStatusType int
2021-09-20 00:14:22 +00:00
// Environment(Endpoint) represents a Docker environment(endpoint) with all the info required
2020-04-08 21:26:11 +00:00
// to connect to it
Endpoint struct {
2021-09-20 00:14:22 +00:00
// Environment(Endpoint) Identifier
2021-02-23 03:21:39 +00:00
ID EndpointID ` json:"Id" example:"1" `
2021-09-20 00:14:22 +00:00
// Environment(Endpoint) name
Name string ` json:"Name" example:"my-environment" `
// Environment(Endpoint) environment(endpoint) type. 1 for a Docker environment(endpoint), 2 for an agent on Docker environment(endpoint) or 3 for an Azure environment(endpoint).
2021-02-23 03:21:39 +00:00
Type EndpointType ` json:"Type" example:"1" `
2021-09-20 00:14:22 +00:00
// URL or IP address of the Docker host associated to this environment(endpoint)
2021-02-23 03:21:39 +00:00
URL string ` json:"URL" example:"docker.mydomain.tld:2375" `
2021-09-20 00:14:22 +00:00
// Environment(Endpoint) group identifier
2021-02-23 03:21:39 +00:00
GroupID EndpointGroupID ` json:"GroupId" example:"1" `
// URL or IP address where exposed containers will be reachable
PublicURL string ` json:"PublicURL" example:"docker.mydomain.tld:2375" `
TLSConfig TLSConfiguration ` json:"TLSConfig" `
Extensions [ ] EndpointExtension ` json:"Extensions" example:"" `
AzureCredentials AzureCredentials ` json:"AzureCredentials,omitempty" example:"" `
2021-09-20 00:14:22 +00:00
// List of tag identifiers to which this environment(endpoint) is associated
2021-02-23 03:21:39 +00:00
TagIDs [ ] TagID ` json:"TagIds" `
2021-09-20 00:14:22 +00:00
// The status of the environment(endpoint) (1 - up, 2 - down)
2021-02-23 03:21:39 +00:00
Status EndpointStatus ` json:"Status" example:"1" `
// List of snapshots
Snapshots [ ] DockerSnapshot ` json:"Snapshots" example:"" `
2021-09-20 00:14:22 +00:00
// List of user identifiers authorized to connect to this environment(endpoint)
2021-02-23 03:21:39 +00:00
UserAccessPolicies UserAccessPolicies ` json:"UserAccessPolicies" `
2021-09-20 00:14:22 +00:00
// List of team identifiers authorized to connect to this environment(endpoint)
2021-02-23 03:21:39 +00:00
TeamAccessPolicies TeamAccessPolicies ` json:"TeamAccessPolicies" example:"" `
2021-09-20 00:14:22 +00:00
// The identifier of the edge agent associated with this environment(endpoint)
2021-02-23 03:21:39 +00:00
EdgeID string ` json:"EdgeID,omitempty" example:"" `
// The key which is used to map the agent to Portainer
EdgeKey string ` json:"EdgeKey" example:"" `
// The check in interval for edge agent (in seconds)
EdgeCheckinInterval int ` json:"EdgeCheckinInterval" example:"5" `
// Associated Kubernetes data
Kubernetes KubernetesData ` json:"Kubernetes" example:"" `
// Maximum version of docker-compose
ComposeSyntaxMaxVersion string ` json:"ComposeSyntaxMaxVersion" example:"3.8" `
2021-09-20 00:14:22 +00:00
// Environment(Endpoint) specific security settings
2021-02-23 03:21:39 +00:00
SecuritySettings EndpointSecuritySettings
2021-03-01 00:43:47 +00:00
// LastCheckInDate mark last check-in date on checkin
LastCheckInDate int64
2020-06-04 05:35:09 +00:00
2020-04-08 21:26:11 +00:00
// Deprecated fields
// Deprecated in DBVersion == 4
TLS bool ` json:"TLS,omitempty" `
2017-08-10 08:35:23 +00:00
TLSCACertPath string ` json:"TLSCACert,omitempty" `
TLSCertPath string ` json:"TLSCert,omitempty" `
TLSKeyPath string ` json:"TLSKey,omitempty" `
2020-04-08 21:26:11 +00:00
// Deprecated in DBVersion == 18
AuthorizedUsers [ ] UserID ` json:"AuthorizedUsers" `
AuthorizedTeams [ ] TeamID ` json:"AuthorizedTeams" `
// Deprecated in DBVersion == 22
Tags [ ] string ` json:"Tags" `
2017-08-10 08:35:23 +00:00
}
2021-09-20 00:14:22 +00:00
// EndpointAuthorizations represents the authorizations associated to a set of environments(endpoints)
2020-04-08 21:26:11 +00:00
EndpointAuthorizations map [ EndpointID ] Authorizations
// EndpointExtension represents a deprecated form of Portainer extension
// TODO: legacy extension management
EndpointExtension struct {
Type EndpointExtensionType ` json:"Type" `
URL string ` json:"URL" `
2018-07-23 04:57:38 +00:00
}
2021-09-20 00:14:22 +00:00
// EndpointExtensionType represents the type of an environment(endpoint) extension. Only
// one extension of each type can be associated to an environment(endpoint)
2020-04-08 21:26:11 +00:00
EndpointExtensionType int
2021-09-20 00:14:22 +00:00
// EndpointGroup represents a group of environments(endpoints)
2020-04-08 21:26:11 +00:00
EndpointGroup struct {
2021-09-20 00:14:22 +00:00
// Environment(Endpoint) group Identifier
2021-02-23 03:21:39 +00:00
ID EndpointGroupID ` json:"Id" example:"1" `
2021-09-20 00:14:22 +00:00
// Environment(Endpoint) group name
Name string ` json:"Name" example:"my-environment-group" `
// Description associated to the environment(endpoint) group
Description string ` json:"Description" example:"Environment(Endpoint) group description" `
2021-02-23 03:21:39 +00:00
UserAccessPolicies UserAccessPolicies ` json:"UserAccessPolicies" example:"" `
TeamAccessPolicies TeamAccessPolicies ` json:"TeamAccessPolicies" example:"" `
2021-09-20 00:14:22 +00:00
// List of tags associated to this environment(endpoint) group
2021-02-23 03:21:39 +00:00
TagIDs [ ] TagID ` json:"TagIds" `
2018-07-11 08:39:20 +00:00
2018-05-28 14:40:59 +00:00
// Deprecated fields
2020-04-08 21:26:11 +00:00
Labels [ ] Pair ` json:"Labels" `
2016-12-18 05:21:29 +00:00
2020-04-08 21:26:11 +00:00
// Deprecated in DBVersion == 18
AuthorizedUsers [ ] UserID ` json:"AuthorizedUsers" `
AuthorizedTeams [ ] TeamID ` json:"AuthorizedTeams" `
// Deprecated in DBVersion == 22
Tags [ ] string ` json:"Tags" `
2016-12-18 05:21:29 +00:00
}
2021-09-20 00:14:22 +00:00
// EndpointGroupID represents an environment(endpoint) group identifier
2020-04-08 21:26:11 +00:00
EndpointGroupID int
2017-03-12 16:24:15 +00:00
2021-09-20 00:14:22 +00:00
// EndpointID represents an environment(endpoint) identifier
2020-04-08 21:26:11 +00:00
EndpointID int
2017-03-12 16:24:15 +00:00
2021-09-20 00:14:22 +00:00
// EndpointStatus represents the status of an environment(endpoint)
2020-04-08 21:26:11 +00:00
EndpointStatus int
2017-08-10 08:35:23 +00:00
2021-09-20 00:14:22 +00:00
// EndpointSyncJob represents a scheduled job that synchronize environments(endpoints) based on an external file
2020-05-18 08:29:37 +00:00
// Deprecated
2020-04-08 21:26:11 +00:00
EndpointSyncJob struct { }
2017-05-23 18:56:10 +00:00
2021-09-20 00:14:22 +00:00
// EndpointSecuritySettings represents settings for an environment(endpoint)
2021-02-09 08:09:06 +00:00
EndpointSecuritySettings struct {
2021-02-23 03:21:39 +00:00
// Whether non-administrator should be able to use bind mounts when creating containers
2021-03-22 19:58:11 +00:00
AllowBindMountsForRegularUsers bool ` json:"allowBindMountsForRegularUsers" example:"false" `
2021-02-23 03:21:39 +00:00
// Whether non-administrator should be able to use privileged mode when creating containers
2021-03-22 19:58:11 +00:00
AllowPrivilegedModeForRegularUsers bool ` json:"allowPrivilegedModeForRegularUsers" example:"false" `
2021-02-23 03:21:39 +00:00
// Whether non-administrator should be able to browse volumes
2021-03-22 19:58:11 +00:00
AllowVolumeBrowserForRegularUsers bool ` json:"allowVolumeBrowserForRegularUsers" example:"true" `
2021-02-23 03:21:39 +00:00
// Whether non-administrator should be able to use the host pid
2021-03-22 19:58:11 +00:00
AllowHostNamespaceForRegularUsers bool ` json:"allowHostNamespaceForRegularUsers" example:"true" `
2021-02-23 03:21:39 +00:00
// Whether non-administrator should be able to use device mapping
2021-03-22 19:58:11 +00:00
AllowDeviceMappingForRegularUsers bool ` json:"allowDeviceMappingForRegularUsers" example:"true" `
2021-02-23 03:21:39 +00:00
// Whether non-administrator should be able to manage stacks
2021-03-22 19:58:11 +00:00
AllowStackManagementForRegularUsers bool ` json:"allowStackManagementForRegularUsers" example:"true" `
2021-02-23 03:21:39 +00:00
// Whether non-administrator should be able to use container capabilities
2021-03-22 19:58:11 +00:00
AllowContainerCapabilitiesForRegularUsers bool ` json:"allowContainerCapabilitiesForRegularUsers" example:"true" `
2021-04-12 07:40:45 +00:00
// Whether non-administrator should be able to use sysctl settings
2021-05-12 00:29:35 +00:00
AllowSysctlSettingForRegularUsers bool ` json:"allowSysctlSettingForRegularUsers" example:"true" `
2021-02-23 03:21:39 +00:00
// Whether host management features are enabled
2021-03-22 19:58:11 +00:00
EnableHostManagementFeatures bool ` json:"enableHostManagementFeatures" example:"true" `
2021-02-09 08:09:06 +00:00
}
2021-09-20 00:14:22 +00:00
// EndpointType represents the type of an environment(endpoint)
2020-04-08 21:26:11 +00:00
EndpointType int
2017-05-23 18:56:10 +00:00
2021-09-20 00:14:22 +00:00
// EndpointRelation represents a environment(endpoint) relation object
2020-05-14 02:14:28 +00:00
EndpointRelation struct {
EndpointID EndpointID
EdgeStacks map [ EdgeStackID ] bool
}
2020-08-11 05:41:37 +00:00
// Extension represents a deprecated Portainer extension
2020-04-08 21:26:11 +00:00
Extension struct {
2021-02-23 03:21:39 +00:00
// Extension Identifier
ID ExtensionID ` json:"Id" example:"1" `
2020-04-08 21:26:11 +00:00
Enabled bool ` json:"Enabled" `
Name string ` json:"Name,omitempty" `
ShortDescription string ` json:"ShortDescription,omitempty" `
Description string ` json:"Description,omitempty" `
DescriptionURL string ` json:"DescriptionURL,omitempty" `
Price string ` json:"Price,omitempty" `
PriceDescription string ` json:"PriceDescription,omitempty" `
Deal bool ` json:"Deal,omitempty" `
Available bool ` json:"Available,omitempty" `
License LicenseInformation ` json:"License,omitempty" `
Version string ` json:"Version" `
UpdateAvailable bool ` json:"UpdateAvailable" `
ShopURL string ` json:"ShopURL,omitempty" `
Images [ ] string ` json:"Images,omitempty" `
Logo string ` json:"Logo,omitempty" `
2017-05-23 18:56:10 +00:00
}
2020-04-08 21:26:11 +00:00
// ExtensionID represents a extension identifier
ExtensionID int
2017-05-23 18:56:10 +00:00
2021-11-11 18:49:50 +00:00
// Feature represents a feature that can be enabled or disabled via feature flags
Feature string
2020-04-08 21:26:11 +00:00
// GitlabRegistryData represents data required for gitlab registry to work
GitlabRegistryData struct {
ProjectID int ` json:"ProjectId" `
InstanceURL string ` json:"InstanceURL" `
ProjectPath string ` json:"ProjectPath" `
}
2017-05-23 18:56:10 +00:00
feat(helm/templates): helm app templates EE-943 (#5449)
* 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>
2021-09-10 02:06:57 +00:00
HelmUserRepositoryID int
// HelmUserRepositories stores a Helm repository URL for the given user
HelmUserRepository struct {
// Membership Identifier
ID HelmUserRepositoryID ` json:"Id" example:"1" `
// User identifier
UserID UserID ` json:"UserId" example:"1" `
// Helm repository URL
URL string ` json:"URL" example:"https://charts.bitnami.com/bitnami" `
}
2021-03-12 23:47:35 +00:00
// QuayRegistryData represents data required for Quay registry to work
QuayRegistryData struct {
2021-04-06 10:08:43 +00:00
UseOrganisation bool ` json:"UseOrganisation" `
OrganisationName string ` json:"OrganisationName" `
2021-03-12 23:47:35 +00:00
}
2021-12-01 00:18:57 +00:00
// EcrData represents data required for ECR registry
EcrData struct {
Region string ` json:"Region" example:"ap-southeast-2" `
}
2020-04-08 21:26:11 +00:00
// JobType represents a job type
JobType int
2021-08-31 21:08:01 +00:00
K8sNodeLimits struct {
CPU int64 ` json:"CPU" `
Memory int64 ` json:"Memory" `
}
K8sNodesLimits map [ string ] * K8sNodeLimits
2021-06-16 08:15:29 +00:00
K8sNamespaceAccessPolicy struct {
UserAccessPolicies UserAccessPolicies ` json:"UserAccessPolicies" `
TeamAccessPolicies TeamAccessPolicies ` json:"TeamAccessPolicies" `
}
2021-09-20 00:14:22 +00:00
// KubernetesData contains all the Kubernetes related environment(endpoint) information
2020-07-05 23:21:03 +00:00
KubernetesData struct {
Snapshots [ ] KubernetesSnapshot ` json:"Snapshots" `
Configuration KubernetesConfiguration ` json:"Configuration" `
}
2021-09-20 00:14:22 +00:00
// KubernetesSnapshot represents a snapshot of a specific Kubernetes environment(endpoint) at a specific time
2020-07-05 23:21:03 +00:00
KubernetesSnapshot struct {
Time int64 ` json:"Time" `
KubernetesVersion string ` json:"KubernetesVersion" `
NodeCount int ` json:"NodeCount" `
TotalCPU int64 ` json:"TotalCPU" `
TotalMemory int64 ` json:"TotalMemory" `
}
2021-09-20 00:14:22 +00:00
// KubernetesConfiguration represents the configuration of a Kubernetes environment(endpoint)
2020-07-05 23:21:03 +00:00
KubernetesConfiguration struct {
2021-07-23 05:10:46 +00:00
UseLoadBalancer bool ` json:"UseLoadBalancer" `
UseServerMetrics bool ` json:"UseServerMetrics" `
StorageClasses [ ] KubernetesStorageClassConfig ` json:"StorageClasses" `
IngressClasses [ ] KubernetesIngressClassConfig ` json:"IngressClasses" `
RestrictDefaultNamespace bool ` json:"RestrictDefaultNamespace" `
2020-07-05 23:21:03 +00:00
}
// KubernetesStorageClassConfig represents a Kubernetes Storage Class configuration
KubernetesStorageClassConfig struct {
2020-08-07 04:40:24 +00:00
Name string ` json:"Name" `
AccessModes [ ] string ` json:"AccessModes" `
Provisioner string ` json:"Provisioner" `
AllowVolumeExpansion bool ` json:"AllowVolumeExpansion" `
2020-07-05 23:21:03 +00:00
}
2020-08-20 00:51:14 +00:00
// KubernetesIngressClassConfig represents a Kubernetes Ingress Class configuration
KubernetesIngressClassConfig struct {
Name string ` json:"Name" `
Type string ` json:"Type" `
}
2021-08-05 03:02:06 +00:00
// KubernetesShellPod represents a Kubectl Shell details to facilitate pod exec functionality
KubernetesShellPod struct {
Namespace string
PodName string
ContainerName string
ShellExecCommand string
}
2020-04-08 21:26:11 +00:00
// LDAPGroupSearchSettings represents settings used to search for groups in a LDAP server
LDAPGroupSearchSettings struct {
2021-02-23 03:21:39 +00:00
// The distinguished name of the element from which the LDAP server will search for groups
GroupBaseDN string ` json:"GroupBaseDN" example:"dc=ldap,dc=domain,dc=tld" `
// The LDAP search filter used to select group elements, optional
GroupFilter string ` json:"GroupFilter" example:"(objectClass=account" `
// LDAP attribute which denotes the group membership
GroupAttribute string ` json:"GroupAttribute" example:"member" `
2016-12-18 05:21:29 +00:00
}
2020-04-08 21:26:11 +00:00
// LDAPSearchSettings represents settings used to search for users in a LDAP server
LDAPSearchSettings struct {
2021-02-23 03:21:39 +00:00
// The distinguished name of the element from which the LDAP server will search for users
BaseDN string ` json:"BaseDN" example:"dc=ldap,dc=domain,dc=tld" `
// Optional LDAP search filter used to select user elements
Filter string ` json:"Filter" example:"(objectClass=account)" `
// LDAP attribute which denotes the username
UserNameAttribute string ` json:"UserNameAttribute" example:"uid" `
2020-04-08 21:26:11 +00:00
}
2017-10-15 17:24:40 +00:00
2020-04-08 21:26:11 +00:00
// LDAPSettings represents the settings used to connect to a LDAP server
LDAPSettings struct {
2021-02-23 03:21:39 +00:00
// Enable this option if the server is configured for Anonymous access. When enabled, ReaderDN and Password will not be used
AnonymousMode bool ` json:"AnonymousMode" example:"true" `
// Account that will be used to search for users
ReaderDN string ` json:"ReaderDN" example:"cn=readonly-account,dc=ldap,dc=domain,dc=tld" `
// Password of the account that will be used to search users
Password string ` json:"Password,omitempty" example:"readonly-password" `
// URL or IP address of the LDAP server
URL string ` json:"URL" example:"myldap.domain.tld:389" `
TLSConfig TLSConfiguration ` json:"TLSConfig" `
// Whether LDAP connection should use StartTLS
StartTLS bool ` json:"StartTLS" example:"true" `
2020-04-08 21:26:11 +00:00
SearchSettings [ ] LDAPSearchSettings ` json:"SearchSettings" `
GroupSearchSettings [ ] LDAPGroupSearchSettings ` json:"GroupSearchSettings" `
2021-02-23 03:21:39 +00:00
// Automatically provision users and assign them to matching LDAP group names
AutoCreateUsers bool ` json:"AutoCreateUsers" example:"true" `
2020-04-08 21:26:11 +00:00
}
2018-06-11 13:13:19 +00:00
2021-10-06 06:24:26 +00:00
// LDAPUser represents a LDAP user
LDAPUser struct {
Name string
Groups [ ] string
}
2020-04-08 21:26:11 +00:00
// LicenseInformation represents information about an extension license
LicenseInformation struct {
LicenseKey string ` json:"LicenseKey,omitempty" `
Company string ` json:"Company,omitempty" `
Expiration string ` json:"Expiration,omitempty" `
Valid bool ` json:"Valid,omitempty" `
2017-10-15 17:24:40 +00:00
}
2020-04-08 21:26:11 +00:00
// MembershipRole represents the role of a user within a team
MembershipRole int
2017-06-20 11:00:32 +00:00
2020-04-08 21:26:11 +00:00
// OAuthSettings represents the settings used to authorize with an authorization server
OAuthSettings struct {
ClientID string ` json:"ClientID" `
ClientSecret string ` json:"ClientSecret,omitempty" `
AccessTokenURI string ` json:"AccessTokenURI" `
AuthorizationURI string ` json:"AuthorizationURI" `
ResourceURI string ` json:"ResourceURI" `
RedirectURI string ` json:"RedirectURI" `
UserIdentifier string ` json:"UserIdentifier" `
Scopes string ` json:"Scopes" `
OAuthAutoCreateUsers bool ` json:"OAuthAutoCreateUsers" `
DefaultTeamID TeamID ` json:"DefaultTeamID" `
2021-06-10 22:09:04 +00:00
SSO bool ` json:"SSO" `
LogoutURI string ` json:"LogoutURI" `
2021-11-15 21:45:20 +00:00
KubeSecretKey [ ] byte ` json:"KubeSecretKey" `
2020-04-08 21:26:11 +00:00
}
2018-12-09 03:49:27 +00:00
2020-04-08 21:26:11 +00:00
// Pair defines a key/value string pair
Pair struct {
2021-02-23 03:21:39 +00:00
Name string ` json:"name" example:"name" `
Value string ` json:"value" example:"value" `
2019-11-12 03:28:31 +00:00
}
2017-06-20 11:00:32 +00:00
// Registry represents a Docker registry with all the info required
2018-08-21 18:40:42 +00:00
// to connect to it
2017-06-20 11:00:32 +00:00
Registry struct {
2021-02-23 03:21:39 +00:00
// Registry Identifier
ID RegistryID ` json:"Id" example:"1" `
2021-12-01 00:18:57 +00:00
// Registry Type (1 - Quay, 2 - Azure, 3 - Custom, 4 - Gitlab, 5 - ProGet, 6 - DockerHub, 7 - ECR)
Type RegistryType ` json:"Type" enums:"1,2,3,4,5,6,7" `
2021-02-23 03:21:39 +00:00
// Registry Name
Name string ` json:"Name" example:"my-registry" `
// URL or IP address of the Docker registry
URL string ` json:"URL" example:"registry.mydomain.tld:2375" `
2021-07-01 02:57:15 +00:00
// Base URL, introduced for ProGet registry
BaseURL string ` json:"BaseURL" example:"registry.mydomain.tld:2375" `
2021-02-23 03:21:39 +00:00
// Is authentication against this registry enabled
Authentication bool ` json:"Authentication" example:"true" `
2021-12-01 00:18:57 +00:00
// Username or AccessKeyID used to authenticate against this registry
2021-02-23 03:21:39 +00:00
Username string ` json:"Username" example:"registry user" `
2021-12-01 00:18:57 +00:00
// Password or SecretAccessKey used to authenticate against this registry
2021-02-23 03:21:39 +00:00
Password string ` json:"Password,omitempty" example:"registry_password" `
2018-12-09 03:49:27 +00:00
ManagementConfiguration * RegistryManagementConfiguration ` json:"ManagementConfiguration" `
2019-11-12 03:28:31 +00:00
Gitlab GitlabRegistryData ` json:"Gitlab" `
2021-03-12 23:47:35 +00:00
Quay QuayRegistryData ` json:"Quay" `
2021-12-14 00:40:44 +00:00
Ecr EcrData ` json:"Ecr" `
2021-07-14 09:15:21 +00:00
RegistryAccesses RegistryAccesses ` json:"RegistryAccesses" `
2019-05-24 06:04:58 +00:00
// Deprecated fields
2021-07-14 09:15:21 +00:00
// Deprecated in DBVersion == 31
UserAccessPolicies UserAccessPolicies ` json:"UserAccessPolicies" `
// Deprecated in DBVersion == 31
TeamAccessPolicies TeamAccessPolicies ` json:"TeamAccessPolicies" `
2019-05-24 06:04:58 +00:00
// Deprecated in DBVersion == 18
AuthorizedUsers [ ] UserID ` json:"AuthorizedUsers" `
2021-07-14 09:15:21 +00:00
// Deprecated in DBVersion == 18
2019-05-24 06:04:58 +00:00
AuthorizedTeams [ ] TeamID ` json:"AuthorizedTeams" `
2021-12-01 00:18:57 +00:00
// Stores temporary access token
AccessToken string ` json:"AccessToken,omitempty" `
AccessTokenExpiry int64 ` json:"AccessTokenExpiry,omitempty" `
2018-12-09 03:49:27 +00:00
}
2021-07-14 09:15:21 +00:00
RegistryAccesses map [ EndpointID ] RegistryAccessPolicies
RegistryAccessPolicies struct {
UserAccessPolicies UserAccessPolicies ` json:"UserAccessPolicies" `
TeamAccessPolicies TeamAccessPolicies ` json:"TeamAccessPolicies" `
Namespaces [ ] string ` json:"Namespaces" `
}
2020-04-08 21:26:11 +00:00
// RegistryID represents a registry identifier
RegistryID int
2018-12-09 03:49:27 +00:00
// RegistryManagementConfiguration represents a configuration that can be used to query
// the registry API via the registry management extension.
RegistryManagementConfiguration struct {
2021-12-01 00:18:57 +00:00
Type RegistryType ` json:"Type" `
Authentication bool ` json:"Authentication" `
Username string ` json:"Username" `
Password string ` json:"Password" `
TLSConfig TLSConfiguration ` json:"TLSConfig" `
Ecr EcrData ` json:"Ecr" `
AccessToken string ` json:"AccessToken,omitempty" `
AccessTokenExpiry int64 ` json:"AccessTokenExpiry,omitempty" `
2017-06-20 11:00:32 +00:00
}
2020-04-08 21:26:11 +00:00
// RegistryType represents a type of registry
RegistryType int
2016-12-25 20:34:02 +00:00
2020-04-08 21:26:11 +00:00
// ResourceAccessLevel represents the level of control associated to a resource
ResourceAccessLevel int
2018-05-06 07:15:57 +00:00
2020-04-08 21:26:11 +00:00
// ResourceControl represent a reference to a Docker resource with specific access controls
ResourceControl struct {
2021-02-23 03:21:39 +00:00
// ResourceControl Identifier
ID ResourceControlID ` json:"Id" example:"1" `
// Docker resource identifier on which access control will be applied.\
// In the case of a resource control applied to a stack, use the stack name as identifier
ResourceID string ` json:"ResourceId" example:"617c5f22bb9b023d6daab7cba43a57576f83492867bc767d1c59416b065e5f08" `
// List of Docker resources that will inherit this access control
SubResourceIDs [ ] string ` json:"SubResourceIds" example:"617c5f22bb9b023d6daab7cba43a57576f83492867bc767d1c59416b065e5f08" `
// Type of Docker resource. Valid values are: 1- container, 2 -service
// 3 - volume, 4 - secret, 5 - stack, 6 - config or 7 - custom template
Type ResourceControlType ` json:"Type" example:"1" `
UserAccesses [ ] UserResourceAccess ` json:"UserAccesses" example:"" `
TeamAccesses [ ] TeamResourceAccess ` json:"TeamAccesses" example:"" `
// Permit access to the associated resource to any user
Public bool ` json:"Public" example:"true" `
// Permit access to resource only to admins
AdministratorsOnly bool ` json:"AdministratorsOnly" example:"true" `
System bool ` json:"System" example:"" `
2018-07-11 08:39:20 +00:00
2017-09-14 06:08:37 +00:00
// Deprecated fields
2020-04-08 21:26:11 +00:00
// Deprecated in DBVersion == 2
OwnerID UserID ` json:"OwnerId,omitempty" `
AccessLevel ResourceAccessLevel ` json:"AccessLevel,omitempty" `
2019-05-24 06:04:58 +00:00
}
2020-04-08 21:26:11 +00:00
// ResourceControlID represents a resource control identifier
ResourceControlID int
2019-05-24 06:04:58 +00:00
2020-04-08 21:26:11 +00:00
// ResourceControlType represents the type of resource associated to the resource control (volume, container, service...)
ResourceControlType int
2019-05-24 06:04:58 +00:00
// Role represents a set of authorizations that can be associated to a user or
// to a team.
Role struct {
2021-02-23 03:21:39 +00:00
// Role Identifier
ID RoleID ` json:"Id" example:"1" `
// Role name
Name string ` json:"Name" example:"HelpDesk" `
// Role description
2021-09-20 00:14:22 +00:00
Description string ` json:"Description" example:"Read-only access of all resources in an environment(endpoint)" `
2021-02-23 03:21:39 +00:00
// Authorizations associated to a role
2019-05-24 06:04:58 +00:00
Authorizations Authorizations ` json:"Authorizations" `
2019-11-18 08:22:47 +00:00
Priority int ` json:"Priority" `
2019-05-24 06:04:58 +00:00
}
2020-04-08 21:26:11 +00:00
// RoleID represents a role identifier
RoleID int
2018-11-06 09:49:48 +00:00
2021-11-30 02:31:16 +00:00
// APIKeyID represents an API key identifier
APIKeyID int
// APIKey represents an API key
APIKey struct {
ID APIKeyID ` json:"id" example:"1" `
UserID UserID ` json:"userId" example:"1" `
Description string ` json:"description" example:"portainer-api-key" `
Prefix string ` json:"prefix" ` // API key identifier (7 char prefix)
DateCreated int64 ` json:"dateCreated" ` // Unix timestamp (UTC) when the API key was created
LastUsed int64 ` json:"lastUsed" ` // Unix timestamp (UTC) when the API key was last used
Digest [ ] byte ` json:"digest,omitempty" ` // Digest represents SHA256 hash of the raw API key
}
2018-11-06 09:49:48 +00:00
// Schedule represents a scheduled job.
// It only contains a pointer to one of the JobRunner implementations
2018-12-06 19:53:23 +00:00
// based on the JobType.
// NOTE: The Recurring option is only used by ScriptExecutionJob at the moment
2020-06-25 03:25:51 +00:00
// Deprecated in favor of EdgeJob
2018-11-05 20:58:15 +00:00
Schedule struct {
2021-02-23 03:21:39 +00:00
// Schedule Identifier
ID ScheduleID ` json:"Id" example:"1" `
2020-06-25 03:25:51 +00:00
Name string
CronExpression string
Recurring bool
Created int64
JobType JobType
EdgeSchedule * EdgeSchedule
2018-11-05 20:58:15 +00:00
}
2020-04-08 21:26:11 +00:00
// ScheduleID represents a schedule identifier.
2020-06-25 03:25:51 +00:00
// Deprecated in favor of EdgeJob
2020-04-08 21:26:11 +00:00
ScheduleID int
2018-09-03 10:08:03 +00:00
2020-04-08 21:26:11 +00:00
// ScriptExecutionJob represents a scheduled job that can execute a script via a privileged container
ScriptExecutionJob struct {
Endpoints [ ] EndpointID
Image string
ScriptPath string
RetryCount int
RetryInterval int
2018-09-03 10:08:03 +00:00
}
2020-04-08 21:26:11 +00:00
// Settings represents the application settings
Settings struct {
2021-02-23 03:21:39 +00:00
// URL to a logo that will be displayed on the login page as well as on top of the sidebar. Will use default Portainer logo when value is empty string
LogoURL string ` json:"LogoURL" example:"https://mycompany.mydomain.tld/logo.png" `
// A list of label name & value that will be used to hide containers when querying containers
BlackListedLabels [ ] Pair ` json:"BlackListedLabels" `
// Active authentication method for the Portainer instance. Valid values are: 1 for internal, 2 for LDAP, or 3 for oauth
AuthenticationMethod AuthenticationMethod ` json:"AuthenticationMethod" example:"1" `
LDAPSettings LDAPSettings ` json:"LDAPSettings" example:"" `
OAuthSettings OAuthSettings ` json:"OAuthSettings" example:"" `
2021-11-29 13:06:50 +00:00
OpenAMTConfiguration OpenAMTConfiguration ` json:"OpenAMTConfiguration" example:"" `
2021-11-11 18:49:50 +00:00
FeatureFlagSettings map [ Feature ] bool ` json:"FeatureFlagSettings" example:"" `
2021-09-20 00:14:22 +00:00
// The interval in which environment(endpoint) snapshots are created
2021-02-23 03:21:39 +00:00
SnapshotInterval string ` json:"SnapshotInterval" example:"5m" `
// URL to the templates that will be displayed in the UI when navigating to App Templates
TemplatesURL string ` json:"TemplatesURL" example:"https://raw.githubusercontent.com/portainer/templates/master/templates.json" `
// The default check in interval for edge agent (in seconds)
EdgeAgentCheckinInterval int ` json:"EdgeAgentCheckinInterval" example:"5" `
// Whether edge compute features are enabled
EnableEdgeComputeFeatures bool ` json:"EnableEdgeComputeFeatures" example:"" `
// The duration of a user session
UserSessionTimeout string ` json:"UserSessionTimeout" example:"5m" `
2021-08-31 21:23:21 +00:00
// The expiry of a Kubeconfig
KubeconfigExpiry string ` json:"KubeconfigExpiry" example:"24h" `
2021-02-23 03:21:39 +00:00
// Whether telemetry is enabled
EnableTelemetry bool ` json:"EnableTelemetry" example:"false" `
feat(helm/templates): helm app templates EE-943 (#5449)
* 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>
2021-09-10 02:06:57 +00:00
// Helm repository URL, defaults to "https://charts.bitnami.com/bitnami"
HelmRepositoryURL string ` json:"HelmRepositoryURL" example:"https://charts.bitnami.com/bitnami" `
2021-09-28 22:39:45 +00:00
// KubectlImage, defaults to portainer/kubectl-shell
KubectlShellImage string ` json:"KubectlShellImage" example:"portainer/kubectl-shell" `
2020-04-08 21:26:11 +00:00
// Deprecated fields
DisplayDonationHeader bool
DisplayExternalContributors bool
2021-02-09 08:09:06 +00:00
// Deprecated fields v26
EnableHostManagementFeatures bool ` json:"EnableHostManagementFeatures" `
AllowVolumeBrowserForRegularUsers bool ` json:"AllowVolumeBrowserForRegularUsers" `
AllowBindMountsForRegularUsers bool ` json:"AllowBindMountsForRegularUsers" `
AllowPrivilegedModeForRegularUsers bool ` json:"AllowPrivilegedModeForRegularUsers" `
AllowHostNamespaceForRegularUsers bool ` json:"AllowHostNamespaceForRegularUsers" `
AllowStackManagementForRegularUsers bool ` json:"AllowStackManagementForRegularUsers" `
AllowDeviceMappingForRegularUsers bool ` json:"AllowDeviceMappingForRegularUsers" `
AllowContainerCapabilitiesForRegularUsers bool ` json:"AllowContainerCapabilitiesForRegularUsers" `
2018-05-28 14:40:33 +00:00
}
2021-09-20 00:14:22 +00:00
// SnapshotJob represents a scheduled job that can create environment(endpoint) snapshots
2020-07-05 23:21:03 +00:00
SnapshotJob struct { }
2018-07-11 08:39:20 +00:00
2021-02-22 22:14:52 +00:00
// SoftwareEdition represents an edition of Portainer
SoftwareEdition int
2021-08-10 04:59:47 +00:00
// SSLSettings represents a pair of SSL certificate and key
SSLSettings struct {
CertPath string ` json:"certPath" `
KeyPath string ` json:"keyPath" `
SelfSigned bool ` json:"selfSigned" `
HTTPEnabled bool ` json:"httpEnabled" `
}
2020-04-08 21:26:11 +00:00
// Stack represents a Docker stack created via docker stack deploy
Stack struct {
2021-02-23 03:21:39 +00:00
// Stack Identifier
ID StackID ` json:"Id" example:"1" `
// Stack name
Name string ` json:"Name" example:"myStack" `
// Stack type. 1 for a Swarm stack, 2 for a Compose stack
Type StackType ` json:"Type" example:"2" `
2021-09-20 00:14:22 +00:00
// Environment(Endpoint) identifier. Reference the environment(endpoint) that will be used for deployment
2021-02-23 03:21:39 +00:00
EndpointID EndpointID ` json:"EndpointId" example:"1" `
// Cluster identifier of the Swarm cluster where the stack is deployed
SwarmID string ` json:"SwarmId" example:"jpofkc0i9uo9wtx1zesuk649w" `
// Path to the Stack file
EntryPoint string ` json:"EntryPoint" example:"docker-compose.yml" `
2021-09-20 00:14:22 +00:00
// A list of environment(endpoint) variables used during stack deployment
2021-02-23 03:21:39 +00:00
Env [ ] Pair ` json:"Env" example:"" `
//
ResourceControl * ResourceControl ` json:"ResourceControl" example:"" `
// Stack status (1 - active, 2 - inactive)
Status StackStatus ` json:"Status" example:"1" `
// Path on disk to the repository hosting the Stack file
ProjectPath string ` example:"/data/compose/myStack_jpofkc0i9uo9wtx1zesuk649w" `
// The date in unix time when stack was created
CreationDate int64 ` example:"1587399600" `
// The username which created this stack
CreatedBy string ` example:"admin" `
// The date in unix time when stack was last updated
UpdateDate int64 ` example:"1587399600" `
// The username which last updated this stack
UpdatedBy string ` example:"bob" `
2021-08-17 01:12:07 +00:00
// Only applies when deploying stack with multiple files
AdditionalFiles [ ] string ` json:"AdditionalFiles" `
// The auto update settings of a git stack
AutoUpdate * StackAutoUpdate ` json:"AutoUpdate" `
2021-06-15 21:11:35 +00:00
// The git config of this stack
GitConfig * gittypes . RepoConfig
2021-12-07 11:46:58 +00:00
// Whether the stack is from a app template
FromAppTemplate bool ` example:"false" `
2021-09-07 00:37:26 +00:00
// Kubernetes namespace if stack is a kube application
Namespace string ` example:"default" `
// IsComposeFormat indicates if the Kubernetes stack is created from a Docker Compose file
IsComposeFormat bool ` example:"false" `
2020-04-08 21:26:11 +00:00
}
2018-06-15 07:18:25 +00:00
2021-08-17 01:12:07 +00:00
//StackAutoUpdate represents the git auto sync config for stack deployment
StackAutoUpdate struct {
// Auto update interval
Interval string ` example:"1m30s" `
// A UUID generated from client
Webhook string ` example:"05de31a2-79fa-4644-9c12-faa67e5c49f0" `
// Autoupdate job id
JobID string ` example:"15" `
}
2020-04-08 21:26:11 +00:00
// StackID represents a stack identifier (it must be composed of Name + "_" + SwarmID to create a unique identifier)
StackID int
2019-05-24 06:04:58 +00:00
2020-08-03 22:18:53 +00:00
// StackStatus represent a status for a stack
StackStatus int
2020-04-08 21:26:11 +00:00
// StackType represents the type of the stack (compose v2, stack deploy v3)
StackType int
2020-03-29 09:54:14 +00:00
2020-04-08 21:26:11 +00:00
// Status represents the application status
Status struct {
2021-02-23 03:21:39 +00:00
// Portainer API version
Version string ` json:"Version" example:"2.0.0" `
2021-08-10 22:45:53 +00:00
// Server Instance ID
InstanceID string ` example:"299ab403-70a8-4c05-92f7-bf7a994d50df" `
2018-04-26 16:08:46 +00:00
}
2020-04-08 21:26:11 +00:00
// Tag represents a tag that can be associated to a resource
Tag struct {
2021-02-23 03:21:39 +00:00
// Tag identifier
ID TagID ` example:"1" `
// Tag name
Name string ` json:"Name" example:"org/acme" `
2021-09-20 00:14:22 +00:00
// A set of environment(endpoint) ids that have this tag
2021-02-23 03:21:39 +00:00
Endpoints map [ EndpointID ] bool ` json:"Endpoints" `
2021-09-20 00:14:22 +00:00
// A set of environment(endpoint) group ids that have this tag
2020-05-14 02:14:28 +00:00
EndpointGroups map [ EndpointGroupID ] bool ` json:"EndpointGroups" `
2018-02-23 02:10:26 +00:00
}
2020-04-08 21:26:11 +00:00
// TagID represents a tag identifier
TagID int
2017-05-23 18:56:10 +00:00
2020-04-08 21:26:11 +00:00
// Team represents a list of user accounts
Team struct {
2021-02-23 03:21:39 +00:00
// Team Identifier
ID TeamID ` json:"Id" example:"1" `
// Team name
Name string ` json:"Name" example:"developers" `
2017-03-12 16:24:15 +00:00
}
2020-04-08 21:26:11 +00:00
// TeamAccessPolicies represent the association of an access policy and a team
TeamAccessPolicies map [ TeamID ] AccessPolicy
2017-03-12 16:24:15 +00:00
2020-04-08 21:26:11 +00:00
// TeamID represents a team identifier
TeamID int
// TeamMembership represents a membership association between a user and a team
TeamMembership struct {
2021-02-23 03:21:39 +00:00
// Membership Identifier
ID TeamMembershipID ` json:"Id" example:"1" `
// User identifier
UserID UserID ` json:"UserID" example:"1" `
// Team identifier
TeamID TeamID ` json:"TeamID" example:"1" `
// Team role (1 for team leader and 2 for team member)
Role MembershipRole ` json:"Role" example:"1" `
2017-05-23 18:56:10 +00:00
}
2020-04-08 21:26:11 +00:00
// TeamMembershipID represents a team membership identifier
TeamMembershipID int
2018-08-21 18:40:42 +00:00
// TeamResourceAccess represents the level of control on a resource for a specific team
2017-05-23 18:56:10 +00:00
TeamResourceAccess struct {
TeamID TeamID ` json:"TeamId" `
AccessLevel ResourceAccessLevel ` json:"AccessLevel" `
}
2020-04-15 05:49:34 +00:00
// Template represents an application template that can be used as an App Template
// or an Edge template
2018-07-03 18:31:02 +00:00
Template struct {
// Mandatory container/stack fields
2021-02-23 03:21:39 +00:00
// Template Identifier
ID TemplateID ` json:"Id" example:"1" `
// Template type. Valid values are: 1 (container), 2 (Swarm stack) or 3 (Compose stack)
Type TemplateType ` json:"type" example:"1" `
// Title of the template
Title string ` json:"title" example:"Nginx" `
// Description of the template
Description string ` json:"description" example:"High performance web server" `
// Whether the template should be available to administrators only
AdministratorOnly bool ` json:"administrator_only" example:"true" `
2018-07-03 18:31:02 +00:00
// Mandatory container fields
2021-02-23 03:21:39 +00:00
// Image associated to a container template. Mandatory for a container template
Image string ` json:"image" example:"nginx:latest" `
2018-07-03 18:31:02 +00:00
// Mandatory stack fields
Repository TemplateRepository ` json:"repository" `
2020-04-15 05:49:34 +00:00
// Mandatory Edge stack fields
2021-02-23 03:21:39 +00:00
// Stack file used for this template
2020-05-14 02:14:28 +00:00
StackFile string ` json:"stackFile" `
2018-07-03 18:31:02 +00:00
// Optional stack/container fields
2021-02-23 03:21:39 +00:00
// Default name for the stack/container to be used on deployment
Name string ` json:"name,omitempty" example:"mystackname" `
// URL of the template's logo
Logo string ` json:"logo,omitempty" example:"https://cloudinovasi.id/assets/img/logos/nginx.png" `
2021-09-20 00:14:22 +00:00
// A list of environment(endpoint) variables used during the template deployment
2021-02-23 03:21:39 +00:00
Env [ ] TemplateEnv ` json:"env,omitempty" `
// A note that will be displayed in the UI. Supports HTML content
Note string ` json:"note,omitempty" example:"This is my <b>custom</b> template" `
// Platform associated to the template.
// Valid values are: 'linux', 'windows' or leave empty for multi-platform
Platform string ` json:"platform,omitempty" example:"linux" `
// A list of categories associated to the template
Categories [ ] string ` json:"categories,omitempty" example:"database" `
2018-07-03 18:31:02 +00:00
// Optional container fields
2021-02-23 03:21:39 +00:00
// The URL of a registry associated to the image for a container template
Registry string ` json:"registry,omitempty" example:"quay.io" `
// The command that will be executed in a container template
Command string ` json:"command,omitempty" example:"ls -lah" `
2021-09-20 00:14:22 +00:00
// Name of a network that will be used on container deployment if it exists inside the environment(endpoint)
2021-02-23 03:21:39 +00:00
Network string ` json:"network,omitempty" example:"mynet" `
// A list of volumes used during the container template deployment
Volumes [ ] TemplateVolume ` json:"volumes,omitempty" `
// A list of ports exposed by the container
Ports [ ] string ` json:"ports,omitempty" example:"8080:80/tcp" `
// Container labels
Labels [ ] Pair ` json:"labels,omitempty" example:"" `
// Whether the container should be started in privileged mode
Privileged bool ` json:"privileged,omitempty" example:"true" `
// Whether the container should be started in
// interactive mode (-i -t equivalent on the CLI)
Interactive bool ` json:"interactive,omitempty" example:"true" `
// Container restart policy
RestartPolicy string ` json:"restart_policy,omitempty" example:"on-failure" `
// Container hostname
Hostname string ` json:"hostname,omitempty" example:"mycontainer" `
2018-07-03 18:31:02 +00:00
}
2021-09-20 00:14:22 +00:00
// TemplateEnv represents a template environment(endpoint) variable configuration
2018-07-03 18:31:02 +00:00
TemplateEnv struct {
2021-09-20 00:14:22 +00:00
// name of the environment(endpoint) variable
2021-02-23 03:21:39 +00:00
Name string ` json:"name" example:"MYSQL_ROOT_PASSWORD" `
// Text for the label that will be generated in the UI
Label string ` json:"label,omitempty" example:"Root password" `
// Content of the tooltip that will be generated in the UI
Description string ` json:"description,omitempty" example:"MySQL root account password" `
// Default value that will be set for the variable
Default string ` json:"default,omitempty" example:"default_value" `
// If set to true, will not generate any input for this variable in the UI
Preset bool ` json:"preset,omitempty" example:"false" `
// A list of name/value that will be used to generate a dropdown in the UI
Select [ ] TemplateEnvSelect ` json:"select,omitempty" `
2018-07-03 18:31:02 +00:00
}
2020-04-08 21:26:11 +00:00
// TemplateEnvSelect represents text/value pair that will be displayed as a choice for the
// template user
TemplateEnvSelect struct {
2021-02-23 03:21:39 +00:00
// Some text that will displayed as a choice
Text string ` json:"text" example:"text value" `
// A value that will be associated to the choice
Value string ` json:"value" example:"value" `
// Will set this choice as the default choice
Default bool ` json:"default" example:"false" `
2018-07-03 18:31:02 +00:00
}
2020-04-08 21:26:11 +00:00
// TemplateID represents a template identifier
TemplateID int
2018-08-21 18:40:42 +00:00
// TemplateRepository represents the git repository configuration for a template
2018-07-03 18:31:02 +00:00
TemplateRepository struct {
2021-02-23 03:21:39 +00:00
// URL of a git repository used to deploy a stack template. Mandatory for a Swarm/Compose stack template
URL string ` json:"url" example:"https://github.com/portainer/portainer-compose" `
// Path to the stack file inside the git repository
StackFile string ` json:"stackfile" example:"./subfolder/docker-compose.yml" `
2018-07-03 18:31:02 +00:00
}
2020-04-08 21:26:11 +00:00
// TemplateType represents the type of a template
TemplateType int
// TemplateVolume represents a template volume configuration
TemplateVolume struct {
2021-02-23 03:21:39 +00:00
// Path inside the container
Container string ` json:"container" example:"/data" `
// Path on the host
Bind string ` json:"bind,omitempty" example:"/tmp" `
// Whether the volume used should be readonly
ReadOnly bool ` json:"readonly,omitempty" example:"true" `
2018-07-03 18:31:02 +00:00
}
2020-04-08 21:26:11 +00:00
// TLSConfiguration represents a TLS configuration
TLSConfiguration struct {
2021-02-23 03:21:39 +00:00
// Use TLS
TLS bool ` json:"TLS" example:"true" `
// Skip the verification of the server TLS certificate
TLSSkipVerify bool ` json:"TLSSkipVerify" example:"false" `
// Path to the TLS CA certificate file
TLSCACertPath string ` json:"TLSCACert,omitempty" example:"/data/tls/ca.pem" `
// Path to the TLS client certificate file
TLSCertPath string ` json:"TLSCert,omitempty" example:"/data/tls/cert.pem" `
// Path to the TLS client key file
TLSKeyPath string ` json:"TLSKey,omitempty" example:"/data/tls/key.pem" `
2020-04-08 21:26:11 +00:00
}
2017-03-12 16:24:15 +00:00
2021-09-20 00:14:22 +00:00
// TLSFileType represents a type of TLS file required to connect to a Docker environment(endpoint).
2018-08-21 18:40:42 +00:00
// It can be either a TLS CA file, a TLS certificate file or a TLS key file
2016-12-25 20:34:02 +00:00
TLSFileType int
2020-04-08 21:26:11 +00:00
// TokenData represents the data embedded in a JWT token
TokenData struct {
ID UserID
Username string
Role UserRole
2018-12-09 03:49:27 +00:00
}
2019-07-25 22:38:07 +00:00
// TunnelDetails represents information associated to a tunnel
TunnelDetails struct {
Status string
LastActivity time . Time
Port int
2020-06-25 03:25:51 +00:00
Jobs [ ] EdgeJob
2019-07-25 22:38:07 +00:00
Credentials string
}
// TunnelServerInfo represents information associated to the tunnel server
TunnelServerInfo struct {
PrivateKeySeed string ` json:"PrivateKeySeed" `
}
2020-04-08 21:26:11 +00:00
// User represents a user account
User struct {
2021-02-23 03:21:39 +00:00
// User Identifier
ID UserID ` json:"Id" example:"1" `
Username string ` json:"Username" example:"bob" `
2021-09-27 04:00:04 +00:00
Password string ` json:"Password,omitempty" swaggerignore:"true" `
2021-09-07 23:06:18 +00:00
// User Theme
UserTheme string ` example:"dark" `
2021-02-23 03:21:39 +00:00
// User role (1 for administrator account and 2 for regular account)
Role UserRole ` json:"Role" example:"1" `
2020-08-11 05:41:37 +00:00
// Deprecated fields
// Deprecated in DBVersion == 25
2020-04-08 21:26:11 +00:00
PortainerAuthorizations Authorizations ` json:"PortainerAuthorizations" `
EndpointAuthorizations EndpointAuthorizations ` json:"EndpointAuthorizations" `
2016-12-18 05:21:29 +00:00
}
2020-04-08 21:26:11 +00:00
// UserAccessPolicies represent the association of an access policy and a user
UserAccessPolicies map [ UserID ] AccessPolicy
2016-12-18 05:21:29 +00:00
2020-04-08 21:26:11 +00:00
// UserID represents a user identifier
UserID int
// UserResourceAccess represents the level of control on a resource for a specific user
UserResourceAccess struct {
UserID UserID ` json:"UserId" `
AccessLevel ResourceAccessLevel ` json:"AccessLevel" `
2016-12-18 05:21:29 +00:00
}
2020-04-08 21:26:11 +00:00
// UserRole represents the role of a user. It can be either an administrator
// or a regular user
UserRole int
// Webhook represents a url webhook that can be used to update a service
Webhook struct {
2021-02-23 03:21:39 +00:00
// Webhook Identifier
ID WebhookID ` json:"Id" example:"1" `
2020-04-08 21:26:11 +00:00
Token string ` json:"Token" `
ResourceID string ` json:"ResourceId" `
EndpointID EndpointID ` json:"EndpointId" `
2021-12-06 20:11:44 +00:00
RegistryID RegistryID ` json:"RegistryId" `
2020-04-08 21:26:11 +00:00
WebhookType WebhookType ` json:"Type" `
2016-12-18 05:21:29 +00:00
}
2020-04-08 21:26:11 +00:00
// WebhookID represents a webhook identifier.
WebhookID int
// WebhookType represents the type of resource a webhook is related to
WebhookType int
2020-07-05 23:21:03 +00:00
// CLIService represents a service for managing CLI
CLIService interface {
ParseFlags ( version string ) ( * CLIFlags , error )
ValidateFlags ( flags * CLIFlags ) error
}
2020-04-08 21:26:11 +00:00
// ComposeStackManager represents a service to manage Compose stacks
ComposeStackManager interface {
2021-01-25 19:16:53 +00:00
ComposeSyntaxMaxVersion ( ) string
2021-03-14 19:08:31 +00:00
NormalizeStackName ( name string ) string
2021-09-06 07:58:26 +00:00
Up ( ctx context . Context , stack * Stack , endpoint * Endpoint ) error
Down ( ctx context . Context , stack * Stack , endpoint * Endpoint ) error
2019-05-24 06:04:58 +00:00
}
2020-04-08 21:26:11 +00:00
// CryptoService represents a service for encrypting/hashing data
CryptoService interface {
Hash ( data string ) ( string , error )
CompareHashAndData ( hash string , data string ) error
2017-05-23 18:56:10 +00:00
}
2020-07-06 23:18:39 +00:00
// CustomTemplateService represents a service to manage custom templates
CustomTemplateService interface {
GetNextIdentifier ( ) int
CustomTemplates ( ) ( [ ] CustomTemplate , error )
CustomTemplate ( ID CustomTemplateID ) ( * CustomTemplate , error )
CreateCustomTemplate ( customTemplate * CustomTemplate ) error
UpdateCustomTemplate ( ID CustomTemplateID , customTemplate * CustomTemplate ) error
DeleteCustomTemplate ( ID CustomTemplateID ) error
}
2020-07-05 23:21:03 +00:00
// DataStore defines the interface to manage the data
DataStore interface {
Open ( ) error
Init ( ) error
Close ( ) error
IsNew ( ) bool
2021-04-06 10:08:43 +00:00
MigrateData ( force bool ) error
2021-09-27 00:52:50 +00:00
Rollback ( force bool ) error
2021-02-22 22:14:52 +00:00
CheckCurrentEdition ( ) error
2021-04-06 10:08:43 +00:00
BackupTo ( w io . Writer ) error
2020-07-05 23:21:03 +00:00
2020-07-06 23:18:39 +00:00
CustomTemplate ( ) CustomTemplateService
2020-07-05 23:21:03 +00:00
EdgeGroup ( ) EdgeGroupService
EdgeJob ( ) EdgeJobService
EdgeStack ( ) EdgeStackService
Endpoint ( ) EndpointService
EndpointGroup ( ) EndpointGroupService
EndpointRelation ( ) EndpointRelationService
feat(helm/templates): helm app templates EE-943 (#5449)
* 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>
2021-09-10 02:06:57 +00:00
HelmUserRepository ( ) HelmUserRepositoryService
2020-07-05 23:21:03 +00:00
Registry ( ) RegistryService
ResourceControl ( ) ResourceControlService
Role ( ) RoleService
2021-11-30 02:31:16 +00:00
APIKeyRepository ( ) APIKeyRepository
2020-07-05 23:21:03 +00:00
Settings ( ) SettingsService
2021-08-10 04:59:47 +00:00
SSLSettings ( ) SSLSettingsService
2020-07-05 23:21:03 +00:00
Stack ( ) StackService
Tag ( ) TagService
TeamMembership ( ) TeamMembershipService
Team ( ) TeamService
TunnelServer ( ) TunnelServerService
User ( ) UserService
Version ( ) VersionService
Webhook ( ) WebhookService
}
2020-04-08 21:26:11 +00:00
// DigitalSignatureService represents a service to manage digital signatures
DigitalSignatureService interface {
ParseKeyPair ( private , public [ ] byte ) error
GenerateKeyPair ( ) ( [ ] byte , [ ] byte , error )
EncodedPublicKey ( ) string
PEMHeaders ( ) ( string , string )
CreateSignature ( message string ) ( string , error )
}
2021-09-20 00:14:22 +00:00
// DockerSnapshotter represents a service used to create Docker environment(endpoint) snapshots
2020-07-05 23:21:03 +00:00
DockerSnapshotter interface {
CreateSnapshot ( endpoint * Endpoint ) ( * DockerSnapshot , error )
}
2020-06-25 03:25:51 +00:00
// EdgeGroupService represents a service to manage Edge groups
EdgeGroupService interface {
EdgeGroups ( ) ( [ ] EdgeGroup , error )
EdgeGroup ( ID EdgeGroupID ) ( * EdgeGroup , error )
CreateEdgeGroup ( group * EdgeGroup ) error
UpdateEdgeGroup ( ID EdgeGroupID , group * EdgeGroup ) error
DeleteEdgeGroup ( ID EdgeGroupID ) error
}
// EdgeJobService represents a service to manage Edge jobs
EdgeJobService interface {
EdgeJobs ( ) ( [ ] EdgeJob , error )
EdgeJob ( ID EdgeJobID ) ( * EdgeJob , error )
CreateEdgeJob ( edgeJob * EdgeJob ) error
UpdateEdgeJob ( ID EdgeJobID , edgeJob * EdgeJob ) error
DeleteEdgeJob ( ID EdgeJobID ) error
GetNextIdentifier ( ) int
}
// EdgeStackService represents a service to manage Edge stacks
EdgeStackService interface {
EdgeStacks ( ) ( [ ] EdgeStack , error )
EdgeStack ( ID EdgeStackID ) ( * EdgeStack , error )
CreateEdgeStack ( edgeStack * EdgeStack ) error
UpdateEdgeStack ( ID EdgeStackID , edgeStack * EdgeStack ) error
DeleteEdgeStack ( ID EdgeStackID ) error
GetNextIdentifier ( ) int
}
2021-09-20 00:14:22 +00:00
// EndpointService represents a service for managing environment(endpoint) data
2016-12-25 20:34:02 +00:00
EndpointService interface {
Endpoint ( ID EndpointID ) ( * Endpoint , error )
Endpoints ( ) ( [ ] Endpoint , error )
CreateEndpoint ( endpoint * Endpoint ) error
UpdateEndpoint ( ID EndpointID , endpoint * Endpoint ) error
DeleteEndpoint ( ID EndpointID ) error
2017-02-06 05:29:34 +00:00
Synchronize ( toCreate , toUpdate , toDelete [ ] * Endpoint ) error
2018-07-24 12:47:19 +00:00
GetNextIdentifier ( ) int
2016-12-25 20:34:02 +00:00
}
2021-09-20 00:14:22 +00:00
// EndpointGroupService represents a service for managing environment(endpoint) group data
2018-04-26 16:08:46 +00:00
EndpointGroupService interface {
EndpointGroup ( ID EndpointGroupID ) ( * EndpointGroup , error )
EndpointGroups ( ) ( [ ] EndpointGroup , error )
CreateEndpointGroup ( group * EndpointGroup ) error
UpdateEndpointGroup ( ID EndpointGroupID , group * EndpointGroup ) error
DeleteEndpointGroup ( ID EndpointGroupID ) error
}
2021-09-20 00:14:22 +00:00
// EndpointRelationService represents a service for managing environment(endpoint) relations data
2020-05-14 02:14:28 +00:00
EndpointRelationService interface {
EndpointRelation ( EndpointID EndpointID ) ( * EndpointRelation , error )
CreateEndpointRelation ( endpointRelation * EndpointRelation ) error
UpdateEndpointRelation ( EndpointID EndpointID , endpointRelation * EndpointRelation ) error
DeleteEndpointRelation ( EndpointID EndpointID ) error
}
2018-08-21 18:40:42 +00:00
// FileService represents a service for managing files
2016-12-25 20:34:02 +00:00
FileService interface {
2021-09-06 07:58:26 +00:00
GetDockerConfigPath ( ) string
2021-11-01 11:01:03 +00:00
GetFileContent ( trustedRootPath , filePath string ) ( [ ] byte , error )
2021-09-27 00:52:50 +00:00
Copy ( fromFilePath string , toFilePath string , deleteIfExists bool ) error
2018-06-18 10:07:56 +00:00
Rename ( oldPath , newPath string ) error
2017-10-15 17:24:40 +00:00
RemoveDirectory ( directoryPath string ) error
2018-06-11 13:13:19 +00:00
StoreTLSFileFromBytes ( folder string , fileType TLSFileType , data [ ] byte ) ( string , error )
2017-08-10 08:35:23 +00:00
GetPathForTLSFile ( folder string , fileType TLSFileType ) ( string , error )
2017-09-14 06:08:37 +00:00
DeleteTLSFile ( folder string , fileType TLSFileType ) error
2017-08-10 08:35:23 +00:00
DeleteTLSFiles ( folder string ) error
2017-10-15 17:24:40 +00:00
GetStackProjectPath ( stackIdentifier string ) string
2018-06-11 13:13:19 +00:00
StoreStackFileFromBytes ( stackIdentifier , fileName string , data [ ] byte ) ( string , error )
2020-05-14 02:14:28 +00:00
GetEdgeStackProjectPath ( edgeStackIdentifier string ) string
StoreEdgeStackFileFromBytes ( edgeStackIdentifier , fileName string , data [ ] byte ) ( string , error )
2018-12-09 03:49:27 +00:00
StoreRegistryManagementFileFromBytes ( folder , fileName string , data [ ] byte ) ( string , error )
2018-05-06 07:15:57 +00:00
KeyPairFilesExist ( ) ( bool , error )
StoreKeyPair ( private , public [ ] byte , privatePEMHeader , publicPEMHeader string ) error
LoadKeyPair ( ) ( [ ] byte , [ ] byte , error )
WriteJSONToFile ( path string , content interface { } ) error
2018-06-19 11:15:10 +00:00
FileExists ( path string ) ( bool , error )
2020-06-25 03:25:51 +00:00
StoreEdgeJobFileFromBytes ( identifier string , data [ ] byte ) ( string , error )
GetEdgeJobFolder ( identifier string ) string
ClearEdgeJobTaskLogs ( edgeJobID , taskID string ) error
GetEdgeJobTaskLogFileContent ( edgeJobID , taskID string ) ( string , error )
StoreEdgeJobTaskLogFileFromBytes ( edgeJobID , taskID string , data [ ] byte ) error
2018-12-09 03:49:27 +00:00
GetBinaryFolder ( ) string
2020-07-06 23:18:39 +00:00
StoreCustomTemplateFileFromBytes ( identifier , fileName string , data [ ] byte ) ( string , error )
GetCustomTemplateProjectPath ( identifier string ) string
GetTemporaryPath ( ) ( string , error )
2021-04-06 10:08:43 +00:00
GetDatastorePath ( ) string
2021-08-10 04:59:47 +00:00
GetDefaultSSLCertsPath ( ) ( string , string )
StoreSSLCertPair ( cert , key [ ] byte ) ( string , string , error )
CopySSLCertPair ( certPath , keyPath string ) ( string , string , error )
2017-10-15 17:24:40 +00:00
}
2018-08-21 18:40:42 +00:00
// GitService represents a service for managing Git
2017-10-15 17:24:40 +00:00
GitService interface {
2021-06-15 21:11:35 +00:00
CloneRepository ( destination string , repositoryURL , referenceName , username , password string ) error
2021-08-17 01:12:07 +00:00
LatestCommitID ( repositoryURL , referenceName , username , password string ) ( string , error )
2016-12-25 20:34:02 +00:00
}
2017-02-06 05:29:34 +00:00
2021-11-29 13:06:50 +00:00
// OpenAMTService represents a service for managing OpenAMT
OpenAMTService interface {
ConfigureDefault ( configuration OpenAMTConfiguration ) error
}
feat(helm/templates): helm app templates EE-943 (#5449)
* 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>
2021-09-10 02:06:57 +00:00
// HelmUserRepositoryService represents a service to manage HelmUserRepositories
HelmUserRepositoryService interface {
HelmUserRepositoryByUserID ( userID UserID ) ( [ ] HelmUserRepository , error )
CreateHelmUserRepository ( record * HelmUserRepository ) error
}
2020-04-08 21:26:11 +00:00
// JWTService represents a service for managing JWT tokens
JWTService interface {
GenerateToken ( data * TokenData ) ( string , error )
2021-06-10 22:09:04 +00:00
GenerateTokenForOAuth ( data * TokenData , expiryTime * time . Time ) ( string , error )
2021-08-31 21:23:21 +00:00
GenerateTokenForKubeconfig ( data * TokenData ) ( string , error )
2020-04-08 21:26:11 +00:00
ParseAndVerifyToken ( token string ) ( * TokenData , error )
2020-06-09 09:55:36 +00:00
SetUserSessionDuration ( userSessionDuration time . Duration )
2017-02-06 05:29:34 +00:00
}
2017-08-10 08:35:23 +00:00
2021-09-20 00:14:22 +00:00
// KubeClient represents a service used to query a Kubernetes environment(endpoint)
2020-07-05 23:21:03 +00:00
KubeClient interface {
2021-07-23 05:10:46 +00:00
SetupUserServiceAccount ( userID int , teamIDs [ ] int , restrictDefaultNamespace bool ) error
2021-08-30 22:07:50 +00:00
GetServiceAccount ( tokendata * TokenData ) ( * v1 . ServiceAccount , error )
2020-08-04 04:01:15 +00:00
GetServiceAccountBearerToken ( userID int ) ( string , error )
2021-09-28 22:39:45 +00:00
CreateUserShellPod ( ctx context . Context , serviceAccountName , shellPodImage string ) ( * KubernetesShellPod , error )
2021-09-03 01:11:11 +00:00
StartExecProcess ( token string , useAdminToken bool , namespace , podName , containerName string , command [ ] string , stdin io . Reader , stdout io . Writer , errChan chan error )
2021-07-20 02:05:31 +00:00
NamespaceAccessPoliciesDeleteNamespace ( namespace string ) error
2021-08-31 21:08:01 +00:00
GetNodesLimits ( ) ( K8sNodesLimits , error )
2021-06-16 08:15:29 +00:00
GetNamespaceAccessPolicies ( ) ( map [ string ] K8sNamespaceAccessPolicy , error )
UpdateNamespaceAccessPolicies ( accessPolicies map [ string ] K8sNamespaceAccessPolicy ) error
2021-07-14 09:15:21 +00:00
DeleteRegistrySecret ( registry * Registry , namespace string ) error
CreateRegistrySecret ( registry * Registry , namespace string ) error
IsRegistrySecret ( namespace , secretName string ) ( bool , error )
2021-08-26 14:00:59 +00:00
ToggleSystemState ( namespace string , isSystem bool ) error
2020-07-05 23:21:03 +00:00
}
2021-09-20 00:14:22 +00:00
// KubernetesDeployer represents a service to deploy a manifest inside a Kubernetes environment(endpoint)
2020-07-05 23:21:03 +00:00
KubernetesDeployer interface {
2021-09-29 23:58:10 +00:00
Deploy ( userID UserID , endpoint * Endpoint , manifestFiles [ ] string , namespace string ) ( string , error )
Remove ( userID UserID , endpoint * Endpoint , manifestFiles [ ] string , namespace string ) ( string , error )
2021-09-02 05:28:51 +00:00
ConvertCompose ( data [ ] byte ) ( [ ] byte , error )
2020-07-05 23:21:03 +00:00
}
2021-09-20 00:14:22 +00:00
// KubernetesSnapshotter represents a service used to create Kubernetes environment(endpoint) snapshots
2020-07-05 23:21:03 +00:00
KubernetesSnapshotter interface {
CreateSnapshot ( endpoint * Endpoint ) ( * KubernetesSnapshot , error )
}
2018-08-21 18:40:42 +00:00
// LDAPService represents a service used to authenticate users against a LDAP/AD
2017-08-10 08:35:23 +00:00
LDAPService interface {
AuthenticateUser ( username , password string , settings * LDAPSettings ) error
TestConnectivity ( settings * LDAPSettings ) error
2018-07-23 04:57:38 +00:00
GetUserGroups ( username string , settings * LDAPSettings ) ( [ ] string , error )
2021-10-06 06:24:26 +00:00
SearchGroups ( settings * LDAPSettings ) ( [ ] LDAPUser , error )
SearchUsers ( settings * LDAPSettings ) ( [ ] string , error )
2017-08-10 08:35:23 +00:00
}
2017-10-15 17:24:40 +00:00
2020-08-05 08:36:46 +00:00
// OAuthService represents a service used to authenticate users using OAuth
OAuthService interface {
2021-08-05 12:54:38 +00:00
Authenticate ( code string , configuration * OAuthSettings ) ( string , error )
2020-08-05 08:36:46 +00:00
}
2020-04-08 21:26:11 +00:00
// RegistryService represents a service for managing registry data
RegistryService interface {
Registry ( ID RegistryID ) ( * Registry , error )
Registries ( ) ( [ ] Registry , error )
CreateRegistry ( registry * Registry ) error
UpdateRegistry ( ID RegistryID , registry * Registry ) error
DeleteRegistry ( ID RegistryID ) error
}
// ResourceControlService represents a service for managing resource control data
ResourceControlService interface {
ResourceControl ( ID ResourceControlID ) ( * ResourceControl , error )
ResourceControlByResourceIDAndType ( resourceID string , resourceType ResourceControlType ) ( * ResourceControl , error )
ResourceControls ( ) ( [ ] ResourceControl , error )
CreateResourceControl ( rc * ResourceControl ) error
UpdateResourceControl ( ID ResourceControlID , resourceControl * ResourceControl ) error
DeleteResourceControl ( ID ResourceControlID ) error
}
2021-03-01 00:43:47 +00:00
// ReverseTunnelService represents a service used to manage reverse tunnel connections.
2020-04-08 21:26:11 +00:00
ReverseTunnelService interface {
2020-07-05 23:21:03 +00:00
StartTunnelServer ( addr , port string , snapshotService SnapshotService ) error
2021-04-06 10:08:43 +00:00
StopTunnelServer ( ) error
2020-04-08 21:26:11 +00:00
GenerateEdgeKey ( url , host string , endpointIdentifier int ) string
SetTunnelStatusToActive ( endpointID EndpointID )
SetTunnelStatusToRequired ( endpointID EndpointID ) error
SetTunnelStatusToIdle ( endpointID EndpointID )
2021-09-21 01:12:31 +00:00
KeepTunnelAlive ( endpointID EndpointID , ctx context . Context , maxKeepAlive time . Duration )
2020-04-08 21:26:11 +00:00
GetTunnelDetails ( endpointID EndpointID ) * TunnelDetails
2021-09-24 04:56:22 +00:00
GetActiveTunnel ( endpoint * Endpoint ) ( * TunnelDetails , error )
2020-06-25 03:25:51 +00:00
AddEdgeJob ( endpointID EndpointID , edgeJob * EdgeJob )
RemoveEdgeJob ( edgeJobID EdgeJobID )
2020-04-08 21:26:11 +00:00
}
// RoleService represents a service for managing user roles
RoleService interface {
Role ( ID RoleID ) ( * Role , error )
Roles ( ) ( [ ] Role , error )
CreateRole ( role * Role ) error
UpdateRole ( ID RoleID , role * Role ) error
}
2021-11-30 02:31:16 +00:00
// APIKeyRepositoryService
APIKeyRepository interface {
CreateAPIKey ( key * APIKey ) error
GetAPIKey ( keyID APIKeyID ) ( * APIKey , error )
UpdateAPIKey ( key * APIKey ) error
DeleteAPIKey ( ID APIKeyID ) error
GetAPIKeysByUserID ( userID UserID ) ( [ ] APIKey , error )
GetAPIKeyByDigest ( digest [ ] byte ) ( * APIKey , error )
}
2020-04-08 21:26:11 +00:00
// SettingsService represents a service for managing application settings
SettingsService interface {
Settings ( ) ( * Settings , error )
UpdateSettings ( settings * Settings ) error
2021-11-29 13:06:50 +00:00
IsFeatureFlagEnabled ( feature Feature ) bool
2020-04-08 21:26:11 +00:00
}
// Server defines the interface to serve the API
Server interface {
Start ( ) error
}
2021-08-10 04:59:47 +00:00
// SSLSettingsService represents a service for managing application settings
SSLSettingsService interface {
Settings ( ) ( * SSLSettings , error )
UpdateSettings ( settings * SSLSettings ) error
}
2020-04-08 21:26:11 +00:00
// StackService represents a service for managing stack data
StackService interface {
Stack ( ID StackID ) ( * Stack , error )
StackByName ( name string ) ( * Stack , error )
2021-11-22 04:23:56 +00:00
StacksByName ( name string ) ( [ ] Stack , error )
2020-04-08 21:26:11 +00:00
Stacks ( ) ( [ ] Stack , error )
CreateStack ( stack * Stack ) error
UpdateStack ( ID StackID , stack * Stack ) error
DeleteStack ( ID StackID ) error
GetNextIdentifier ( ) int
2021-08-17 01:12:07 +00:00
StackByWebhookID ( ID string ) ( * Stack , error )
RefreshableStacks ( ) ( [ ] Stack , error )
2020-04-08 21:26:11 +00:00
}
2021-09-20 00:14:22 +00:00
// SnapshotService represents a service for managing environment(endpoint) snapshots
2020-07-05 23:21:03 +00:00
SnapshotService interface {
Start ( )
2021-04-06 10:08:43 +00:00
Stop ( )
2020-07-05 23:21:03 +00:00
SetSnapshotInterval ( snapshotInterval string ) error
SnapshotEndpoint ( endpoint * Endpoint ) error
}
2018-08-21 18:40:42 +00:00
// SwarmStackManager represents a service to manage Swarm stacks
2018-06-11 13:13:19 +00:00
SwarmStackManager interface {
2021-10-15 05:13:20 +00:00
Login ( registries [ ] Registry , endpoint * Endpoint ) error
2017-10-26 12:22:09 +00:00
Logout ( endpoint * Endpoint ) error
2018-01-20 17:05:01 +00:00
Deploy ( stack * Stack , prune bool , endpoint * Endpoint ) error
2017-10-15 17:24:40 +00:00
Remove ( stack * Stack , endpoint * Endpoint ) error
2021-07-22 21:53:42 +00:00
NormalizeStackName ( name string ) string
2017-10-15 17:24:40 +00:00
}
2018-06-11 13:13:19 +00:00
2020-04-08 21:26:11 +00:00
// TagService represents a service for managing tag data
TagService interface {
Tags ( ) ( [ ] Tag , error )
Tag ( ID TagID ) ( * Tag , error )
CreateTag ( tag * Tag ) error
2020-05-14 02:14:28 +00:00
UpdateTag ( ID TagID , tag * Tag ) error
2020-04-08 21:26:11 +00:00
DeleteTag ( ID TagID ) error
2018-06-11 13:13:19 +00:00
}
2018-10-22 21:03:30 +00:00
2020-04-08 21:26:11 +00:00
// TeamService represents a service for managing user data
TeamService interface {
Team ( ID TeamID ) ( * Team , error )
TeamByName ( name string ) ( * Team , error )
Teams ( ) ( [ ] Team , error )
CreateTeam ( team * Team ) error
UpdateTeam ( ID TeamID , team * Team ) error
DeleteTeam ( ID TeamID ) error
2018-10-22 21:03:30 +00:00
}
2018-12-09 03:49:27 +00:00
2020-04-08 21:26:11 +00:00
// TeamMembershipService represents a service for managing team membership data
TeamMembershipService interface {
TeamMembership ( ID TeamMembershipID ) ( * TeamMembership , error )
TeamMemberships ( ) ( [ ] TeamMembership , error )
TeamMembershipsByUserID ( userID UserID ) ( [ ] TeamMembership , error )
TeamMembershipsByTeamID ( teamID TeamID ) ( [ ] TeamMembership , error )
CreateTeamMembership ( membership * TeamMembership ) error
UpdateTeamMembership ( ID TeamMembershipID , membership * TeamMembership ) error
DeleteTeamMembership ( ID TeamMembershipID ) error
DeleteTeamMembershipByUserID ( userID UserID ) error
DeleteTeamMembershipByTeamID ( teamID TeamID ) error
2018-12-09 03:49:27 +00:00
}
2019-07-25 22:38:07 +00:00
2020-04-08 21:26:11 +00:00
// TunnelServerService represents a service for managing data associated to the tunnel server
TunnelServerService interface {
Info ( ) ( * TunnelServerInfo , error )
UpdateInfo ( info * TunnelServerInfo ) error
}
// UserService represents a service for managing user data
UserService interface {
User ( ID UserID ) ( * User , error )
UserByUsername ( username string ) ( * User , error )
Users ( ) ( [ ] User , error )
UsersByRole ( role UserRole ) ( [ ] User , error )
CreateUser ( user * User ) error
UpdateUser ( ID UserID , user * User ) error
DeleteUser ( ID UserID ) error
}
// VersionService represents a service for managing version data
VersionService interface {
DBVersion ( ) ( int , error )
2021-02-22 22:14:52 +00:00
Edition ( ) ( SoftwareEdition , error )
2020-08-12 05:10:28 +00:00
InstanceID ( ) ( string , error )
2021-02-22 22:14:52 +00:00
StoreDBVersion ( version int ) error
2020-08-12 05:10:28 +00:00
StoreInstanceID ( ID string ) error
2020-04-08 21:26:11 +00:00
}
// WebhookService represents a service for managing webhook data.
WebhookService interface {
Webhooks ( ) ( [ ] Webhook , error )
Webhook ( ID WebhookID ) ( * Webhook , error )
CreateWebhook ( portainer * Webhook ) error
2021-12-06 20:11:44 +00:00
UpdateWebhook ( ID WebhookID , webhook * Webhook ) error
2020-04-08 21:26:11 +00:00
WebhookByResourceID ( resourceID string ) ( * Webhook , error )
WebhookByToken ( token string ) ( * Webhook , error )
DeleteWebhook ( serviceID WebhookID ) error
2019-07-25 22:38:07 +00:00
}
2016-12-18 05:21:29 +00:00
)
const (
2018-08-21 18:40:42 +00:00
// APIVersion is the version number of the Portainer API
2021-11-01 00:27:06 +00:00
APIVersion = "2.9.3"
2018-08-21 18:40:42 +00:00
// DBVersion is the version number of the Portainer database
2021-11-17 00:21:09 +00:00
DBVersion = 35
2021-01-25 19:16:53 +00:00
// ComposeSyntaxMaxVersion is a maximum supported version of the docker compose syntax
ComposeSyntaxMaxVersion = "3.9"
2018-12-11 20:46:05 +00:00
// AssetsServerURL represents the URL of the Portainer asset server
AssetsServerURL = "https://portainer-io-assets.sfo2.digitaloceanspaces.com"
2018-08-21 18:40:42 +00:00
// MessageOfTheDayURL represents the URL where Portainer MOTD message can be retrieved
2019-06-02 06:16:43 +00:00
MessageOfTheDayURL = AssetsServerURL + "/motd.json"
2019-09-25 20:38:11 +00:00
// VersionCheckURL represents the URL used to retrieve the latest version of Portainer
VersionCheckURL = "https://api.github.com/repos/portainer/portainer/releases/latest"
2018-05-06 07:15:57 +00:00
// PortainerAgentHeader represents the name of the header available in any agent response
PortainerAgentHeader = "Portainer-Agent"
2019-07-25 22:38:07 +00:00
// PortainerAgentEdgeIDHeader represent the name of the header containing the Edge ID associated to an agent/agent cluster
PortainerAgentEdgeIDHeader = "X-PortainerAgent-EdgeID"
2020-08-04 00:44:17 +00:00
// HTTPResponseAgentPlatform represents the name of the header containing the Agent platform
HTTPResponseAgentPlatform = "Portainer-Agent-Platform"
2018-08-21 18:40:42 +00:00
// PortainerAgentTargetHeader represent the name of the header containing the target node name
2018-05-06 07:15:57 +00:00
PortainerAgentTargetHeader = "X-PortainerAgent-Target"
// PortainerAgentSignatureHeader represent the name of the header containing the digital signature
PortainerAgentSignatureHeader = "X-PortainerAgent-Signature"
// PortainerAgentPublicKeyHeader represent the name of the header containing the public key
PortainerAgentPublicKeyHeader = "X-PortainerAgent-PublicKey"
2020-07-05 23:21:03 +00:00
// PortainerAgentKubernetesSATokenHeader represent the name of the header containing a Kubernetes SA token
PortainerAgentKubernetesSATokenHeader = "X-PortainerAgent-SA-Token"
2018-05-06 07:15:57 +00:00
// PortainerAgentSignatureMessage represents the message used to create a digital signature
// to be used when communicating with an agent
PortainerAgentSignatureMessage = "Portainer-App"
2019-07-25 22:38:07 +00:00
// DefaultEdgeAgentCheckinIntervalInSeconds represents the default interval (in seconds) used by Edge agents to checkin with the Portainer instance
DefaultEdgeAgentCheckinIntervalInSeconds = 5
2020-04-15 05:49:34 +00:00
// DefaultTemplatesURL represents the URL to the official templates supported by Portainer
DefaultTemplatesURL = "https://raw.githubusercontent.com/portainer/templates/master/templates-2.0.json"
feat(helm/templates): helm app templates EE-943 (#5449)
* 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>
2021-09-10 02:06:57 +00:00
// DefaultHelmrepositoryURL represents the URL to the official templates supported by Bitnami
DefaultHelmRepositoryURL = "https://charts.bitnami.com/bitnami"
2020-06-09 09:55:36 +00:00
// DefaultUserSessionTimeout represents the default timeout after which the user session is cleared
DefaultUserSessionTimeout = "8h"
2021-08-31 21:23:21 +00:00
// DefaultUserSessionTimeout represents the default timeout after which the user session is cleared
DefaultKubeconfigExpiry = "0"
2021-09-28 22:39:45 +00:00
// DefaultKubectlShellImage represents the default image and tag for the kubectl shell
DefaultKubectlShellImage = "portainer/kubectl-shell"
2021-09-21 01:12:31 +00:00
// WebSocketKeepAlive web socket keep alive for edge environments
WebSocketKeepAlive = 1 * time . Hour
2016-12-18 05:21:29 +00:00
)
2016-12-25 20:34:02 +00:00
2021-11-11 18:49:50 +00:00
// Supported feature flags
const (
FeatOpenAMT Feature = "open-amt"
FeatFDO Feature = "fdo"
)
// List of supported features
var SupportedFeatureFlags = [ ] Feature {
FeatOpenAMT ,
FeatFDO ,
}
2016-12-25 20:34:02 +00:00
const (
2020-04-08 21:26:11 +00:00
_ AuthenticationMethod = iota
// AuthenticationInternal represents the internal authentication method (authentication against Portainer API)
AuthenticationInternal
// AuthenticationLDAP represents the LDAP authentication method (authentication against a LDAP server)
AuthenticationLDAP
//AuthenticationOAuth represents the OAuth authentication method (authentication against a authorization server)
AuthenticationOAuth
)
2020-08-04 00:44:17 +00:00
const (
_ AgentPlatform = iota
// AgentPlatformDocker represent the Docker platform (Standalone/Swarm)
AgentPlatformDocker
// AgentPlatformKubernetes represent the Kubernetes platform
AgentPlatformKubernetes
)
2020-06-25 03:25:51 +00:00
const (
_ EdgeJobLogsStatus = iota
// EdgeJobLogsStatusIdle represents an idle log collection job
EdgeJobLogsStatusIdle
// EdgeJobLogsStatusPending represents a pending log collection job
EdgeJobLogsStatusPending
// EdgeJobLogsStatusCollected represents a completed log collection job
EdgeJobLogsStatusCollected
)
2020-07-06 23:18:39 +00:00
const (
_ CustomTemplatePlatform = iota
// CustomTemplatePlatformLinux represents a custom template for linux
CustomTemplatePlatformLinux
// CustomTemplatePlatformWindows represents a custom template for windows
CustomTemplatePlatformWindows
)
2021-09-09 08:38:34 +00:00
const (
// EdgeStackDeploymentCompose represent an edge stack deployed using a compose file
EdgeStackDeploymentCompose EdgeStackDeploymentType = iota
// EdgeStackDeploymentKubernetes represent an edge stack deployed using a kubernetes manifest file
EdgeStackDeploymentKubernetes
)
2020-05-14 02:14:28 +00:00
const (
_ EdgeStackStatusType = iota
//StatusOk represents a successfully deployed edge stack
StatusOk
2021-09-20 00:14:22 +00:00
//StatusError represents an edge environment(endpoint) which failed to deploy its edge stack
2020-05-14 02:14:28 +00:00
StatusError
//StatusAcknowledged represents an acknowledged edge stack
StatusAcknowledged
)
2020-04-08 21:26:11 +00:00
const (
_ EndpointExtensionType = iota
// StoridgeEndpointExtension represents the Storidge extension
StoridgeEndpointExtension
)
const (
_ EndpointStatus = iota
2021-09-20 00:14:22 +00:00
// EndpointStatusUp is used to represent an available environment(endpoint)
2020-04-08 21:26:11 +00:00
EndpointStatusUp
2021-09-20 00:14:22 +00:00
// EndpointStatusDown is used to represent an unavailable environment(endpoint)
2020-04-08 21:26:11 +00:00
EndpointStatusDown
)
const (
_ EndpointType = iota
2021-09-20 00:14:22 +00:00
// DockerEnvironment represents an environment(endpoint) connected to a Docker environment(endpoint)
2020-04-08 21:26:11 +00:00
DockerEnvironment
2021-09-20 00:14:22 +00:00
// AgentOnDockerEnvironment represents an environment(endpoint) connected to a Portainer agent deployed on a Docker environment(endpoint)
2020-04-08 21:26:11 +00:00
AgentOnDockerEnvironment
2021-09-20 00:14:22 +00:00
// AzureEnvironment represents an environment(endpoint) connected to an Azure environment(endpoint)
2020-04-08 21:26:11 +00:00
AzureEnvironment
2021-09-20 00:14:22 +00:00
// EdgeAgentOnDockerEnvironment represents an environment(endpoint) connected to an Edge agent deployed on a Docker environment(endpoint)
2020-07-05 23:21:03 +00:00
EdgeAgentOnDockerEnvironment
2021-09-20 00:14:22 +00:00
// KubernetesLocalEnvironment represents an environment(endpoint) connected to a local Kubernetes environment(endpoint)
2020-07-05 23:21:03 +00:00
KubernetesLocalEnvironment
2021-09-20 00:14:22 +00:00
// AgentOnKubernetesEnvironment represents an environment(endpoint) connected to a Portainer agent deployed on a Kubernetes environment(endpoint)
2020-07-05 23:21:03 +00:00
AgentOnKubernetesEnvironment
2021-09-20 00:14:22 +00:00
// EdgeAgentOnKubernetesEnvironment represents an environment(endpoint) connected to an Edge agent deployed on a Kubernetes environment(endpoint)
2020-07-05 23:21:03 +00:00
EdgeAgentOnKubernetesEnvironment
2020-04-08 21:26:11 +00:00
)
const (
_ JobType = iota
2021-09-20 00:14:22 +00:00
// SnapshotJobType is a system job used to create environment(endpoint) snapshots
2020-06-25 03:25:51 +00:00
SnapshotJobType = 2
2016-12-25 20:34:02 +00:00
)
2017-03-12 16:24:15 +00:00
2017-05-23 18:56:10 +00:00
const (
_ MembershipRole = iota
// TeamLeader represents a leader role inside a team
TeamLeader
// TeamMember represents a member role inside a team
TeamMember
)
2021-02-22 22:14:52 +00:00
const (
_ SoftwareEdition = iota
// PortainerCE represents the community edition of Portainer
PortainerCE
// PortainerBE represents the business edition of Portainer
PortainerBE
// PortainerEE represents the business edition of Portainer
PortainerEE
)
2017-03-12 16:24:15 +00:00
const (
2020-04-08 21:26:11 +00:00
_ RegistryType = iota
// QuayRegistry represents a Quay.io registry
QuayRegistry
// AzureRegistry represents an ACR registry
AzureRegistry
// CustomRegistry represents a custom registry
CustomRegistry
// GitlabRegistry represents a gitlab registry
GitlabRegistry
2021-07-01 02:57:15 +00:00
// ProGetRegistry represents a proget registry
ProGetRegistry
2021-07-14 09:15:21 +00:00
// DockerHubRegistry represents a dockerhub registry
DockerHubRegistry
2021-12-01 00:18:57 +00:00
// EcrRegistry represents an ECR registry
EcrRegistry
2017-08-10 08:35:23 +00:00
)
2017-05-23 18:56:10 +00:00
const (
_ ResourceAccessLevel = iota
// ReadWriteAccessLevel represents an access level with read-write permissions on a resource
ReadWriteAccessLevel
)
2017-03-12 16:24:15 +00:00
const (
_ ResourceControlType = iota
2017-05-23 18:56:10 +00:00
// ContainerResourceControl represents a resource control associated to a Docker container
2017-03-12 16:24:15 +00:00
ContainerResourceControl
2017-05-23 18:56:10 +00:00
// ServiceResourceControl represents a resource control associated to a Docker service
2017-03-12 16:24:15 +00:00
ServiceResourceControl
2017-05-23 18:56:10 +00:00
// VolumeResourceControl represents a resource control associated to a Docker volume
2017-03-12 16:24:15 +00:00
VolumeResourceControl
2017-09-19 14:58:30 +00:00
// NetworkResourceControl represents a resource control associated to a Docker network
NetworkResourceControl
2017-09-19 15:10:15 +00:00
// SecretResourceControl represents a resource control associated to a Docker secret
SecretResourceControl
2017-10-15 17:24:40 +00:00
// StackResourceControl represents a resource control associated to a stack composed of Docker services
StackResourceControl
2017-11-06 08:47:31 +00:00
// ConfigResourceControl represents a resource control associated to a Docker config
ConfigResourceControl
2021-02-23 03:21:39 +00:00
// CustomTemplateResourceControl represents a resource control associated to a custom template
2020-07-06 23:18:39 +00:00
CustomTemplateResourceControl
2021-03-29 21:58:56 +00:00
// ContainerGroupResourceControl represents a resource control associated to an Azure container group
ContainerGroupResourceControl
2017-03-12 16:24:15 +00:00
)
2018-02-23 02:10:26 +00:00
2018-06-11 13:13:19 +00:00
const (
_ StackType = iota
// DockerSwarmStack represents a stack managed via docker stack
DockerSwarmStack
// DockerComposeStack represents a stack managed via docker-compose
DockerComposeStack
2020-07-05 23:21:03 +00:00
// KubernetesStack represents a stack managed via kubectl
KubernetesStack
2018-06-11 13:13:19 +00:00
)
2018-07-03 18:31:02 +00:00
2020-08-03 22:18:53 +00:00
// StackStatus represents a status for a stack
const (
_ StackStatus = iota
StackStatusActive
StackStatusInactive
)
2018-07-03 18:31:02 +00:00
const (
_ TemplateType = iota
// ContainerTemplate represents a container template
ContainerTemplate
// SwarmStackTemplate represents a template used to deploy a Swarm stack
SwarmStackTemplate
// ComposeStackTemplate represents a template used to deploy a Compose stack
ComposeStackTemplate
2020-05-14 02:14:28 +00:00
// EdgeStackTemplate represents a template used to deploy an Edge stack
EdgeStackTemplate
2018-07-03 18:31:02 +00:00
)
2018-07-11 08:39:20 +00:00
const (
2020-04-08 21:26:11 +00:00
// TLSFileCA represents a TLS CA certificate file
TLSFileCA TLSFileType = iota
// TLSFileCert represents a TLS certificate file
TLSFileCert
// TLSFileKey represents a TLS key file
TLSFileKey
2018-12-09 03:49:27 +00:00
)
2018-11-06 09:49:48 +00:00
const (
2020-04-08 21:26:11 +00:00
_ UserRole = iota
// AdministratorRole represents an administrator user role
AdministratorRole
// StandardUserRole represents a regular user role
StandardUserRole
2018-11-06 09:49:48 +00:00
)
2018-12-09 03:49:27 +00:00
const (
2020-04-08 21:26:11 +00:00
_ WebhookType = iota
// ServiceWebhook is a webhook for restarting a docker service
ServiceWebhook
2018-12-09 03:49:27 +00:00
)
2019-05-24 06:04:58 +00:00
2019-07-25 22:38:07 +00:00
const (
2021-09-20 00:14:22 +00:00
// EdgeAgentIdle represents an idle state for a tunnel connected to an Edge environment(endpoint).
2019-07-25 22:38:07 +00:00
EdgeAgentIdle string = "IDLE"
2021-09-20 00:14:22 +00:00
// EdgeAgentManagementRequired represents a required state for a tunnel connected to an Edge environment(endpoint)
2019-07-25 22:38:07 +00:00
EdgeAgentManagementRequired string = "REQUIRED"
2021-09-20 00:14:22 +00:00
// EdgeAgentActive represents an active state for a tunnel connected to an Edge environment(endpoint)
2019-07-25 22:38:07 +00:00
EdgeAgentActive string = "ACTIVE"
)
2021-03-01 00:43:47 +00:00
// represents an authorization type
2019-05-24 06:04:58 +00:00
const (
OperationDockerContainerArchiveInfo Authorization = "DockerContainerArchiveInfo"
OperationDockerContainerList Authorization = "DockerContainerList"
OperationDockerContainerExport Authorization = "DockerContainerExport"
OperationDockerContainerChanges Authorization = "DockerContainerChanges"
OperationDockerContainerInspect Authorization = "DockerContainerInspect"
OperationDockerContainerTop Authorization = "DockerContainerTop"
OperationDockerContainerLogs Authorization = "DockerContainerLogs"
OperationDockerContainerStats Authorization = "DockerContainerStats"
OperationDockerContainerAttachWebsocket Authorization = "DockerContainerAttachWebsocket"
OperationDockerContainerArchive Authorization = "DockerContainerArchive"
OperationDockerContainerCreate Authorization = "DockerContainerCreate"
OperationDockerContainerPrune Authorization = "DockerContainerPrune"
OperationDockerContainerKill Authorization = "DockerContainerKill"
OperationDockerContainerPause Authorization = "DockerContainerPause"
OperationDockerContainerUnpause Authorization = "DockerContainerUnpause"
OperationDockerContainerRestart Authorization = "DockerContainerRestart"
OperationDockerContainerStart Authorization = "DockerContainerStart"
OperationDockerContainerStop Authorization = "DockerContainerStop"
OperationDockerContainerWait Authorization = "DockerContainerWait"
OperationDockerContainerResize Authorization = "DockerContainerResize"
OperationDockerContainerAttach Authorization = "DockerContainerAttach"
OperationDockerContainerExec Authorization = "DockerContainerExec"
OperationDockerContainerRename Authorization = "DockerContainerRename"
OperationDockerContainerUpdate Authorization = "DockerContainerUpdate"
OperationDockerContainerPutContainerArchive Authorization = "DockerContainerPutContainerArchive"
OperationDockerContainerDelete Authorization = "DockerContainerDelete"
OperationDockerImageList Authorization = "DockerImageList"
OperationDockerImageSearch Authorization = "DockerImageSearch"
OperationDockerImageGetAll Authorization = "DockerImageGetAll"
OperationDockerImageGet Authorization = "DockerImageGet"
OperationDockerImageHistory Authorization = "DockerImageHistory"
OperationDockerImageInspect Authorization = "DockerImageInspect"
OperationDockerImageLoad Authorization = "DockerImageLoad"
OperationDockerImageCreate Authorization = "DockerImageCreate"
OperationDockerImagePrune Authorization = "DockerImagePrune"
OperationDockerImagePush Authorization = "DockerImagePush"
OperationDockerImageTag Authorization = "DockerImageTag"
OperationDockerImageDelete Authorization = "DockerImageDelete"
OperationDockerImageCommit Authorization = "DockerImageCommit"
OperationDockerImageBuild Authorization = "DockerImageBuild"
OperationDockerNetworkList Authorization = "DockerNetworkList"
OperationDockerNetworkInspect Authorization = "DockerNetworkInspect"
OperationDockerNetworkCreate Authorization = "DockerNetworkCreate"
OperationDockerNetworkConnect Authorization = "DockerNetworkConnect"
OperationDockerNetworkDisconnect Authorization = "DockerNetworkDisconnect"
OperationDockerNetworkPrune Authorization = "DockerNetworkPrune"
OperationDockerNetworkDelete Authorization = "DockerNetworkDelete"
OperationDockerVolumeList Authorization = "DockerVolumeList"
OperationDockerVolumeInspect Authorization = "DockerVolumeInspect"
OperationDockerVolumeCreate Authorization = "DockerVolumeCreate"
OperationDockerVolumePrune Authorization = "DockerVolumePrune"
OperationDockerVolumeDelete Authorization = "DockerVolumeDelete"
OperationDockerExecInspect Authorization = "DockerExecInspect"
OperationDockerExecStart Authorization = "DockerExecStart"
OperationDockerExecResize Authorization = "DockerExecResize"
OperationDockerSwarmInspect Authorization = "DockerSwarmInspect"
OperationDockerSwarmUnlockKey Authorization = "DockerSwarmUnlockKey"
OperationDockerSwarmInit Authorization = "DockerSwarmInit"
OperationDockerSwarmJoin Authorization = "DockerSwarmJoin"
OperationDockerSwarmLeave Authorization = "DockerSwarmLeave"
OperationDockerSwarmUpdate Authorization = "DockerSwarmUpdate"
OperationDockerSwarmUnlock Authorization = "DockerSwarmUnlock"
OperationDockerNodeList Authorization = "DockerNodeList"
OperationDockerNodeInspect Authorization = "DockerNodeInspect"
OperationDockerNodeUpdate Authorization = "DockerNodeUpdate"
OperationDockerNodeDelete Authorization = "DockerNodeDelete"
OperationDockerServiceList Authorization = "DockerServiceList"
OperationDockerServiceInspect Authorization = "DockerServiceInspect"
OperationDockerServiceLogs Authorization = "DockerServiceLogs"
OperationDockerServiceCreate Authorization = "DockerServiceCreate"
OperationDockerServiceUpdate Authorization = "DockerServiceUpdate"
OperationDockerServiceDelete Authorization = "DockerServiceDelete"
OperationDockerSecretList Authorization = "DockerSecretList"
OperationDockerSecretInspect Authorization = "DockerSecretInspect"
OperationDockerSecretCreate Authorization = "DockerSecretCreate"
OperationDockerSecretUpdate Authorization = "DockerSecretUpdate"
OperationDockerSecretDelete Authorization = "DockerSecretDelete"
OperationDockerConfigList Authorization = "DockerConfigList"
OperationDockerConfigInspect Authorization = "DockerConfigInspect"
OperationDockerConfigCreate Authorization = "DockerConfigCreate"
OperationDockerConfigUpdate Authorization = "DockerConfigUpdate"
OperationDockerConfigDelete Authorization = "DockerConfigDelete"
OperationDockerTaskList Authorization = "DockerTaskList"
OperationDockerTaskInspect Authorization = "DockerTaskInspect"
OperationDockerTaskLogs Authorization = "DockerTaskLogs"
OperationDockerPluginList Authorization = "DockerPluginList"
OperationDockerPluginPrivileges Authorization = "DockerPluginPrivileges"
OperationDockerPluginInspect Authorization = "DockerPluginInspect"
OperationDockerPluginPull Authorization = "DockerPluginPull"
OperationDockerPluginCreate Authorization = "DockerPluginCreate"
OperationDockerPluginEnable Authorization = "DockerPluginEnable"
OperationDockerPluginDisable Authorization = "DockerPluginDisable"
OperationDockerPluginPush Authorization = "DockerPluginPush"
OperationDockerPluginUpgrade Authorization = "DockerPluginUpgrade"
OperationDockerPluginSet Authorization = "DockerPluginSet"
OperationDockerPluginDelete Authorization = "DockerPluginDelete"
OperationDockerSessionStart Authorization = "DockerSessionStart"
OperationDockerDistributionInspect Authorization = "DockerDistributionInspect"
OperationDockerBuildPrune Authorization = "DockerBuildPrune"
OperationDockerBuildCancel Authorization = "DockerBuildCancel"
OperationDockerPing Authorization = "DockerPing"
OperationDockerInfo Authorization = "DockerInfo"
OperationDockerEvents Authorization = "DockerEvents"
OperationDockerSystem Authorization = "DockerSystem"
OperationDockerVersion Authorization = "DockerVersion"
OperationDockerAgentPing Authorization = "DockerAgentPing"
OperationDockerAgentList Authorization = "DockerAgentList"
OperationDockerAgentHostInfo Authorization = "DockerAgentHostInfo"
OperationDockerAgentBrowseDelete Authorization = "DockerAgentBrowseDelete"
OperationDockerAgentBrowseGet Authorization = "DockerAgentBrowseGet"
OperationDockerAgentBrowseList Authorization = "DockerAgentBrowseList"
OperationDockerAgentBrowsePut Authorization = "DockerAgentBrowsePut"
OperationDockerAgentBrowseRename Authorization = "DockerAgentBrowseRename"
OperationPortainerDockerHubInspect Authorization = "PortainerDockerHubInspect"
OperationPortainerDockerHubUpdate Authorization = "PortainerDockerHubUpdate"
OperationPortainerEndpointGroupCreate Authorization = "PortainerEndpointGroupCreate"
OperationPortainerEndpointGroupList Authorization = "PortainerEndpointGroupList"
OperationPortainerEndpointGroupDelete Authorization = "PortainerEndpointGroupDelete"
OperationPortainerEndpointGroupInspect Authorization = "PortainerEndpointGroupInspect"
OperationPortainerEndpointGroupUpdate Authorization = "PortainerEndpointGroupEdit"
OperationPortainerEndpointGroupAccess Authorization = "PortainerEndpointGroupAccess "
OperationPortainerEndpointList Authorization = "PortainerEndpointList"
OperationPortainerEndpointInspect Authorization = "PortainerEndpointInspect"
OperationPortainerEndpointCreate Authorization = "PortainerEndpointCreate"
OperationPortainerEndpointExtensionAdd Authorization = "PortainerEndpointExtensionAdd"
OperationPortainerEndpointJob Authorization = "PortainerEndpointJob"
OperationPortainerEndpointSnapshots Authorization = "PortainerEndpointSnapshots"
OperationPortainerEndpointSnapshot Authorization = "PortainerEndpointSnapshot"
OperationPortainerEndpointUpdate Authorization = "PortainerEndpointUpdate"
OperationPortainerEndpointUpdateAccess Authorization = "PortainerEndpointUpdateAccess"
OperationPortainerEndpointDelete Authorization = "PortainerEndpointDelete"
OperationPortainerEndpointExtensionRemove Authorization = "PortainerEndpointExtensionRemove"
OperationPortainerExtensionList Authorization = "PortainerExtensionList"
OperationPortainerExtensionInspect Authorization = "PortainerExtensionInspect"
OperationPortainerExtensionCreate Authorization = "PortainerExtensionCreate"
OperationPortainerExtensionUpdate Authorization = "PortainerExtensionUpdate"
OperationPortainerExtensionDelete Authorization = "PortainerExtensionDelete"
OperationPortainerMOTD Authorization = "PortainerMOTD"
OperationPortainerRegistryList Authorization = "PortainerRegistryList"
OperationPortainerRegistryInspect Authorization = "PortainerRegistryInspect"
OperationPortainerRegistryCreate Authorization = "PortainerRegistryCreate"
OperationPortainerRegistryConfigure Authorization = "PortainerRegistryConfigure"
OperationPortainerRegistryUpdate Authorization = "PortainerRegistryUpdate"
OperationPortainerRegistryUpdateAccess Authorization = "PortainerRegistryUpdateAccess"
OperationPortainerRegistryDelete Authorization = "PortainerRegistryDelete"
OperationPortainerResourceControlCreate Authorization = "PortainerResourceControlCreate"
OperationPortainerResourceControlUpdate Authorization = "PortainerResourceControlUpdate"
OperationPortainerResourceControlDelete Authorization = "PortainerResourceControlDelete"
OperationPortainerRoleList Authorization = "PortainerRoleList"
OperationPortainerRoleInspect Authorization = "PortainerRoleInspect"
OperationPortainerRoleCreate Authorization = "PortainerRoleCreate"
OperationPortainerRoleUpdate Authorization = "PortainerRoleUpdate"
OperationPortainerRoleDelete Authorization = "PortainerRoleDelete"
OperationPortainerScheduleList Authorization = "PortainerScheduleList"
OperationPortainerScheduleInspect Authorization = "PortainerScheduleInspect"
OperationPortainerScheduleFile Authorization = "PortainerScheduleFile"
OperationPortainerScheduleTasks Authorization = "PortainerScheduleTasks"
OperationPortainerScheduleCreate Authorization = "PortainerScheduleCreate"
OperationPortainerScheduleUpdate Authorization = "PortainerScheduleUpdate"
OperationPortainerScheduleDelete Authorization = "PortainerScheduleDelete"
OperationPortainerSettingsInspect Authorization = "PortainerSettingsInspect"
OperationPortainerSettingsUpdate Authorization = "PortainerSettingsUpdate"
OperationPortainerSettingsLDAPCheck Authorization = "PortainerSettingsLDAPCheck"
OperationPortainerStackList Authorization = "PortainerStackList"
OperationPortainerStackInspect Authorization = "PortainerStackInspect"
OperationPortainerStackFile Authorization = "PortainerStackFile"
OperationPortainerStackCreate Authorization = "PortainerStackCreate"
OperationPortainerStackMigrate Authorization = "PortainerStackMigrate"
OperationPortainerStackUpdate Authorization = "PortainerStackUpdate"
OperationPortainerStackDelete Authorization = "PortainerStackDelete"
OperationPortainerTagList Authorization = "PortainerTagList"
OperationPortainerTagCreate Authorization = "PortainerTagCreate"
OperationPortainerTagDelete Authorization = "PortainerTagDelete"
OperationPortainerTeamMembershipList Authorization = "PortainerTeamMembershipList"
OperationPortainerTeamMembershipCreate Authorization = "PortainerTeamMembershipCreate"
OperationPortainerTeamMembershipUpdate Authorization = "PortainerTeamMembershipUpdate"
OperationPortainerTeamMembershipDelete Authorization = "PortainerTeamMembershipDelete"
OperationPortainerTeamList Authorization = "PortainerTeamList"
OperationPortainerTeamInspect Authorization = "PortainerTeamInspect"
OperationPortainerTeamMemberships Authorization = "PortainerTeamMemberships"
OperationPortainerTeamCreate Authorization = "PortainerTeamCreate"
OperationPortainerTeamUpdate Authorization = "PortainerTeamUpdate"
OperationPortainerTeamDelete Authorization = "PortainerTeamDelete"
OperationPortainerTemplateList Authorization = "PortainerTemplateList"
OperationPortainerTemplateInspect Authorization = "PortainerTemplateInspect"
OperationPortainerTemplateCreate Authorization = "PortainerTemplateCreate"
OperationPortainerTemplateUpdate Authorization = "PortainerTemplateUpdate"
OperationPortainerTemplateDelete Authorization = "PortainerTemplateDelete"
OperationPortainerUploadTLS Authorization = "PortainerUploadTLS"
OperationPortainerUserList Authorization = "PortainerUserList"
OperationPortainerUserInspect Authorization = "PortainerUserInspect"
OperationPortainerUserMemberships Authorization = "PortainerUserMemberships"
OperationPortainerUserCreate Authorization = "PortainerUserCreate"
OperationPortainerUserUpdate Authorization = "PortainerUserUpdate"
OperationPortainerUserUpdatePassword Authorization = "PortainerUserUpdatePassword"
OperationPortainerUserDelete Authorization = "PortainerUserDelete"
OperationPortainerWebsocketExec Authorization = "PortainerWebsocketExec"
OperationPortainerWebhookList Authorization = "PortainerWebhookList"
OperationPortainerWebhookCreate Authorization = "PortainerWebhookCreate"
OperationPortainerWebhookDelete Authorization = "PortainerWebhookDelete"
2019-05-26 22:41:12 +00:00
OperationIntegrationStoridgeAdmin Authorization = "IntegrationStoridgeAdmin"
2019-05-24 06:04:58 +00:00
OperationDockerUndefined Authorization = "DockerUndefined"
OperationDockerAgentUndefined Authorization = "DockerAgentUndefined"
OperationPortainerUndefined Authorization = "PortainerUndefined"
EndpointResourcesAccess Authorization = "EndpointResourcesAccess"
)
2021-03-29 21:58:56 +00:00
const (
AzurePathContainerGroups = "/subscriptions/*/providers/Microsoft.ContainerInstance/containerGroups"
AzurePathContainerGroup = "/subscriptions/*/resourceGroups/*/providers/Microsoft.ContainerInstance/containerGroups/*"
)