Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/controlplane/ops.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func (s *ops) run(ctx context.Context, input cli.Input) error {
})
}

// Start runnning apiKeyLastUsedTime updater.
// Start running apiKeyLastUsedTime updater.
{
updater := apikeylastusedtimeupdater.NewAPIKeyLastUsedTimeUpdater(ds, rd, input.Logger)
group.Go(func() error {
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/ops/deploymentchaincontroller/updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func (u *updater) Run(ctx context.Context) error {

// Note: Only the deployment of the first block (the deployment which trigger this chain)
// is added at the time we created this deployment chain; thus all other deployments
// which be counted as "missng deployments" here are triggered and going to be added under
// which be counted as "missing deployments" here are triggered and going to be added under
// PENDING state, since those deployments are of blocks which have to wait for its previous
// blocks completion. We don't need to care about updating those deployment ref status after
// they been added here in this interval.
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/ops/handler/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func TestHandleResetPassword(t *testing.T) {
},
{
name: "wrong-confirmation-id",
req: buildHandleResetPasswordRequest("POST", id, fmt.Sprintf("%s mis match", id)),
req: buildHandleResetPasswordRequest("POST", id, fmt.Sprintf("%s mismatch", id)),
expectedStatus: http.StatusOK,
expectedBody: "Confirmation ID doesn't match",
extraMocks: func() {
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/ops/mysqlensurer/sqlsensurer.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
)

type SQLEnsurer interface {
// Run calls ensurer package funtions.
// Run calls ensurer package functions.
Run(ctx context.Context) error
// Close closes database connection held by client.
Close() error
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/piped/apistore/applicationstore/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type Lister interface {
List() []*model.Application
// ListByPlatformProvider lists all applications for a given cloud provider name.
ListByPlatformProvider(name string) []*model.Application
// Get retrieves a specifiec deployment for the given id.
// Get retrieves a specific deployment for the given id.
Get(id string) (*model.Application, bool)
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/app/piped/controller/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ func (s *scheduler) Run(ctx context.Context) error {
break
}

s.logger.Info("stop scheduler because of temination signal", zap.String("stage-id", ps.Id))
s.logger.Info("stop scheduler because of termination signal", zap.String("stage-id", ps.Id))
return nil
}

Expand Down Expand Up @@ -882,7 +882,7 @@ func (a appAnalysisResultStore) PutLatestAnalysisResult(ctx context.Context, ana
return a.store.PutLatestAnalysisResult(ctx, a.applicationID, analysisResult)
}

// notifyStageStartEvent sends notification evnet STAGE_STARTED
// notifyStageStartEvent sends notification event STAGE_STARTED
func (s *scheduler) notifyStageStartEvent(stage *model.PipelineStage) {
s.notifier.Notify(model.NotificationEvent{
Type: model.NotificationEventType_EVENT_STAGE_STARTED,
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/piped/deploysource/deploysource.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (p *provider) prepare(ctx context.Context, lw io.Writer) (*DeploySource, er
gac, ok := cfg.GetGenericApplication()
if !ok {
fmt.Fprintf(lw, "Invalid application kind %s\n", cfg.Kind)
return nil, fmt.Errorf("unsupport application kind %s", cfg.Kind)
return nil, fmt.Errorf("unsupported application kind %s", cfg.Kind)
}
fmt.Fprintln(lw, "Successfully loaded the application configuration file")

Expand Down
4 changes: 2 additions & 2 deletions pkg/app/piped/driftdetector/cloudrun/detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ func (d *detector) loadHeadServiceManifest(app *model.Application, repo git.Work

gds, ok := cfg.GetGenericApplication()
if !ok {
return provider.ServiceManifest{}, fmt.Errorf("unsupport application kind %s", cfg.Kind)
return provider.ServiceManifest{}, fmt.Errorf("unsupported application kind %s", cfg.Kind)
}

var (
Expand Down Expand Up @@ -275,7 +275,7 @@ func (d *detector) loadHeadServiceManifest(app *model.Application, repo git.Work
if encryptionUsed {
templProcessors = append(templProcessors, sourceprocesser.NewSecretDecrypterProcessor(gds.Encryption, d.secretDecrypter))
}
// Then attaching configurated files to manifests.
// Then attaching configured files to manifests.
if attachmentUsed {
templProcessors = append(templProcessors, sourceprocesser.NewAttachmentProcessor(gds.Attachment))
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/piped/driftdetector/ecs/detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ func (d *detector) loadConfigs(app *model.Application, repo git.Worktree, headCo
if encryptionUsed {
templProcessors = append(templProcessors, sourceprocesser.NewSecretDecrypterProcessor(gds.Encryption, d.secretDecrypter))
}
// Then attaching configurated files to manifests.
// Then attaching configured files to manifests.
if attachmentUsed {
templProcessors = append(templProcessors, sourceprocesser.NewAttachmentProcessor(gds.Attachment))
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/app/piped/driftdetector/kubernetes/detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ func (d *detector) loadHeadManifests(ctx context.Context, app *model.Application

gds, ok := cfg.GetGenericApplication()
if !ok {
return nil, fmt.Errorf("unsupport application kind %s", cfg.Kind)
return nil, fmt.Errorf("unsupported application kind %s", cfg.Kind)
}

var (
Expand Down Expand Up @@ -300,7 +300,7 @@ func (d *detector) loadHeadManifests(ctx context.Context, app *model.Application
if encryptionUsed {
templProcessors = append(templProcessors, sourceprocesser.NewSecretDecrypterProcessor(gds.Encryption, d.secretDecrypter))
}
// Then attaching configurated files to manifests.
// Then attaching configured files to manifests.
if attachmentUsed {
templProcessors = append(templProcessors, sourceprocesser.NewAttachmentProcessor(gds.Attachment))
}
Expand Down Expand Up @@ -439,7 +439,7 @@ func (d *detector) getDriftDetectionConfig(repoDir string, app *model.Applicatio
}
gds, ok := cfg.GetGenericApplication()
if !ok {
return nil, fmt.Errorf("unsupport application kind %s", cfg.Kind)
return nil, fmt.Errorf("unsupported application kind %s", cfg.Kind)
}

return gds.DriftDetection, nil
Expand Down
6 changes: 3 additions & 3 deletions pkg/app/piped/driftdetector/lambda/detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func (d *detector) checkApplication(ctx context.Context, app *model.Application,
Spec: clonedSpec,
}

// WithIgnoreAddingMapKeys option ignores all of followings:
// WithIgnoreAddingMapKeys option ignores all of the following:
// - default value of Architecture
// - default value of EphemeralStorage
// - environments added in live states
Expand Down Expand Up @@ -291,7 +291,7 @@ func (d *detector) loadHeadFunctionManifest(app *model.Application, repo git.Wor

gds, ok := cfg.GetGenericApplication()
if !ok {
return provider.FunctionManifest{}, fmt.Errorf("unsupport application kind %s", cfg.Kind)
return provider.FunctionManifest{}, fmt.Errorf("unsupported application kind %s", cfg.Kind)
}

var (
Expand Down Expand Up @@ -323,7 +323,7 @@ func (d *detector) loadHeadFunctionManifest(app *model.Application, repo git.Wor
if encryptionUsed {
templProcessors = append(templProcessors, sourceprocesser.NewSecretDecrypterProcessor(gds.Encryption, d.secretDecrypter))
}
// Then attaching configurated files to manifests.
// Then attaching configured files to manifests.
if attachmentUsed {
templProcessors = append(templProcessors, sourceprocesser.NewAttachmentProcessor(gds.Attachment))
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/app/piped/driftdetector/terraform/detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func (d *detector) checkApplication(ctx context.Context, app *model.Application,

gds, ok := cfg.GetGenericApplication()
if !ok {
return fmt.Errorf("unsupport application kind %s", cfg.Kind)
return fmt.Errorf("unsupported application kind %s", cfg.Kind)
}

var (
Expand Down Expand Up @@ -217,7 +217,7 @@ func (d *detector) checkApplication(ctx context.Context, app *model.Application,
if encryptionUsed {
templProcessors = append(templProcessors, sourceprocesser.NewSecretDecrypterProcessor(gds.Encryption, d.secretDecrypter))
}
// Then attaching configurated files to manifests.
// Then attaching configured files to manifests.
if attachmentUsed {
templProcessors = append(templProcessors, sourceprocesser.NewAttachmentProcessor(gds.Attachment))
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/piped/executor/customsync/customsync.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (e *deployExecutor) Execute(sig executor.StopSignal) model.StageStatus {
func (e *deployExecutor) executeCommand() model.StageStatus {
opts := e.StageConfig.CustomSyncOptions

e.LogPersister.Infof("Runnnig commands...")
e.LogPersister.Infof("Running commands...")
for v := range strings.SplitSeq(opts.Run, "\n") {
if v != "" {
e.LogPersister.Infof(" %s", v)
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/piped/executor/customsync/rollback.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (e *rollbackExecutor) ensureRollback(ctx context.Context) model.StageStatus
func (e *rollbackExecutor) executeCommand(config config.PipelineStage) model.StageStatus {
opts := config.CustomSyncOptions

e.LogPersister.Infof("Runnnig commands...")
e.LogPersister.Infof("Running commands...")
for v := range strings.SplitSeq(opts.Run, "\n") {
if v != "" {
e.LogPersister.Infof(" %s", v)
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/piped/executor/kubernetes/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ func annotateConfigHash(manifests []provider.Manifest) error {
}
}

// TODO: Anotate config hash into other workload kinds such as DaemonSet, StatefulSet...
// TODO: Annotate config hash into other workload kinds such as DaemonSet, StatefulSet...
}

return nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/piped/executor/kubernetes/kubernetes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ spec:
expected: fmt.Errorf("require primary but got canary for pipecd.dev/variant key in spec.selector.matchLabels"),
},
{
name: "wrong variant in temlate labels",
name: "wrong variant in template labels",
manifest: `
apiVersion: apps/v1
kind: Deployment
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/piped/executor/kubernetes/primary.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (e *deployExecutor) ensurePrimaryRollout(ctx context.Context) model.StageSt
}

// Load the manifests at the triggered commit.
e.LogPersister.Infof("Loading manifests at trigered commit %s for handling", e.commit)
e.LogPersister.Infof("Loading manifests at triggered commit %s for handling", e.commit)
manifests, err := loadManifests(
ctx,
e.Deployment.ApplicationId,
Expand Down
4 changes: 2 additions & 2 deletions pkg/app/piped/executor/kubernetes/rollback.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func (e *rollbackExecutor) ensureRollback(ctx context.Context) model.StageStatus
}

func (e *rollbackExecutor) ensureScriptRunRollback(ctx context.Context) model.StageStatus {
e.LogPersister.Info("Runnnig commands for rollback...")
e.LogPersister.Info("Running commands for rollback...")

onRollback, ok := e.Stage.Metadata["onRollback"]
if !ok {
Expand Down Expand Up @@ -217,7 +217,7 @@ func (e *rollbackExecutor) ensureScriptRunRollback(ctx context.Context) model.St
ci := scriptrun.NewContextInfo(e.Deployment, true)
ciEnv, err := ci.BuildEnv()
if err != nil {
e.LogPersister.Errorf("failed to build srcipt run context info: %w", err)
e.LogPersister.Errorf("failed to build script run context info: %w", err)
return model.StageStatus_STAGE_FAILURE
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/app/piped/executor/kubernetes/traffic.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func findTrafficRoutingManifests(manifests []provider.Manifest, serviceName stri
return findIstioVirtualServiceManifests(manifests, istioConfig.VirtualService)

default:
return nil, fmt.Errorf("unsupport traffic routing method %v", method)
return nil, fmt.Errorf("unsupported traffic routing method %v", method)
}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/app/piped/executor/kubernetes/traffic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func TestGenerateVirtualServiceManifest(t *testing.T) {
expectedFile: "testdata/generated-virtual-service.yaml",
},
{
name: "apply only speficied routes",
name: "apply only specified routes",
manifestFile: "testdata/virtual-service.yaml",
editableRoutes: []string{"only-primary-destination"},
expectedFile: "testdata/generated-virtual-service-for-editable-routes.yaml",
Expand Down
4 changes: 2 additions & 2 deletions pkg/app/piped/executor/scriptrun/scriptrun.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func (e *Executor) Execute(sig executor.StopSignal) model.StageStatus {
func (e *Executor) executeCommand() model.StageStatus {
opts := e.StageConfig.ScriptRunStageOptions

e.LogPersister.Infof("Runnnig commands...")
e.LogPersister.Infof("Running commands...")
for v := range strings.SplitSeq(opts.Run, "\n") {
if v != "" {
e.LogPersister.Infof(" %s", v)
Expand All @@ -105,7 +105,7 @@ func (e *Executor) executeCommand() model.StageStatus {
ci := NewContextInfo(e.Deployment, false)
ciEnv, err := ci.BuildEnv()
if err != nil {
e.LogPersister.Errorf("failed to build srcipt run context info: %w", err)
e.LogPersister.Errorf("failed to build script run context info: %w", err)
return model.StageStatus_STAGE_FAILURE
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/app/piped/executor/stopsignal.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const (
// StopSignalTimeout means the executor should stop its execution
// because of timeout.
StopSignalTimeout StopSignalType = "timeout"
// StopSignalNone means the excutor can be continuously executed.
// StopSignalNone means the executor can be continuously executed.
StopSignalNone StopSignalType = "none"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/app/piped/livestatestore/kubernetes/reflector.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func (r *reflector) start(_ context.Context) error {
zap.Any("namespacedTargetResources", namespacedTargetResources),
)

// Use dynamic to perform generic operations on arbitrary Kubernets API objects.
// Use dynamic to perform generic operations on arbitrary Kubernetes API objects.
// https://godoc.org/k8s.io/client-go/dynamic
dynamicClient, err := dynamic.NewForConfig(r.kubeConfig)
if err != nil {
Expand Down
10 changes: 5 additions & 5 deletions pkg/app/piped/livestatestore/livestatestore.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ type ecsStore interface {

// store manages a list of particular stores for all cloud providers.
type store struct {
// Map thats contains a list of kubernetesStore where key is the cloud provider name.
// Map that contains a list of kubernetesStore where key is the cloud provider name.
kubernetesStores map[string]kubernetesStore
// Map thats contains a list of terraformStore where key is the cloud provider name.
// Map that contains a list of terraformStore where key is the cloud provider name.
terraformStores map[string]terraformStore
// Map thats contains a list of cloudRunStore where key is the cloud provider name.
// Map that contains a list of cloudRunStore where key is the cloud provider name.
cloudrunStores map[string]cloudRunStore
// Map thats contains a list of lambdaStore where key is the cloud provider name.
// Map that contains a list of lambdaStore where key is the cloud provider name.
lambdaStores map[string]lambdaStore
// Map thats contains a list of ecsStore where key is the cloud provider name.
// Map that contains a list of ecsStore where key is the cloud provider name.
ecsStores map[string]ecsStore

gracePeriod time.Duration
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/piped/logpersister/persister.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ type persister struct {
}

// NewPersister creates a new persister instance for saving the stage logs into server's storage.
// This controls how many concurent api calls should be executed and when to flush the logs.
// This controls how many concurrent api calls should be executed and when to flush the logs.
func NewPersister(apiClient apiClient, logger *zap.Logger) *persister {
return &persister{
apiClient: apiClient,
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/piped/planner/kubernetes/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (p *Planner) Plan(ctx context.Context, in planner.Input) (out planner.Outpu
}

// If the progressive pipeline was not configured
// we have only one choise to do is applying all manifestt.
// we have only one choice to do is applying all manifestt.
if cfg.Pipeline == nil || len(cfg.Pipeline.Stages) == 0 {
out.SyncStrategy = model.SyncStrategy_QUICK_SYNC
out.Stages = buildQuickSyncPipeline(autoRollback, time.Now())
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/piped/planner/kubernetes/kubernetes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func TestDecideStrategy(t *testing.T) {
wantDesc: "Sync progressively because pod template of workload name was changed",
},
{
name: "mutilple workloads: pod template was changed",
name: "multiple workloads: pod template was changed",
olds: func() []provider.Manifest {
m1 := provider.MakeManifest(provider.ResourceKey{
APIVersion: "apps/v1",
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/piped/platformprovider/kubernetes/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const (
LabelSyncReplace = "pipecd.dev/sync-by-replace" // Use replace instead of apply.
LabelForceSyncReplace = "pipecd.dev/force-sync-by-replace" // Use replace --force instead of apply.
LabelServerSideApply = "pipecd.dev/server-side-apply" // Use server side apply instead of client side apply.
AnnotationConfigHash = "pipecd.dev/config-hash" // The hash value of all mouting config resources.
AnnotationConfigHash = "pipecd.dev/config-hash" // The hash value of all mounting config resources.
AnnotationOrder = "pipecd.dev/order" // The order number of resource used to sort them before using.

ManagedByPiped = "piped"
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/piped/platformprovider/kubernetes/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func (l *loader) LoadManifests(ctx context.Context) (manifests []Manifest, err e
manifests, err = LoadPlainYAMLManifests(l.appDir, l.input.Manifests, l.configFileName)

default:
err = fmt.Errorf("unsupport templating method %v", l.templatingMethod)
err = fmt.Errorf("unsupported templating method %v", l.templatingMethod)
}

return
Expand Down
4 changes: 2 additions & 2 deletions pkg/app/piped/platformprovider/kubernetes/resourcekey.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func (k ResourceKey) IsLess(a ResourceKey) bool {
}

// IsLessWithIgnoringNamespace reports whether the key should sort before the given key,
// but this ignores the comparation of the namesapce.
// but this ignores the comparison of the namespace.
func (k ResourceKey) IsLessWithIgnoringNamespace(a ResourceKey) bool {
if k.APIVersion < a.APIVersion {
return true
Expand All @@ -232,7 +232,7 @@ func (k ResourceKey) IsLessWithIgnoringNamespace(a ResourceKey) bool {
}

// IsEqualWithIgnoringNamespace checks whether the key is equal to the given key,
// but this ignores the comparation of the namesapce.
// but this ignores the comparison of the namespace.
func (k ResourceKey) IsEqualWithIgnoringNamespace(a ResourceKey) bool {
if k.APIVersion != a.APIVersion {
return false
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/piped/sourceprocesser/sourceprocesser.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (p *processor) Process() error {
}

for _, tp := range p.templateProcessors {
// Rebuid the data for the template to get up to date
// Rebuild the data for the template to get up to date
// data after previous template processing.
pdata, err := tp.BuildTemplateData(p.appDir)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/piped/sourceprocesser/sourceprocesser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func TestSourceProcessor(t *testing.T) {
},
},
{
name: "secret decryption combined attachement",
name: "secret decryption combined attachment",
fileData: map[string]string{
"config.yaml": "{{ .encryptedSecrets.secret }}",
"resource.yaml": "echo {{ .attachment.config }}",
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/piped/trigger/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (t *Trigger) triggerDeployment(
if _, err := t.apiClient.CreateDeployment(ctx, &pipedservice.CreateDeploymentRequest{
Deployment: deployment,
}); err != nil {
return fmt.Errorf("cound not register a new deployment to control-plane: %w", err)
return fmt.Errorf("could not register a new deployment to control-plane: %w", err)
}
return nil
}
Expand Down
Loading