Skip to content

Lysenko/ocd 3171 om installation#33

Open
konstantin-lysenko-netapp wants to merge 25 commits intomainfrom
lysenko/OCD-3171-om-installation
Open

Lysenko/ocd 3171 om installation#33
konstantin-lysenko-netapp wants to merge 25 commits intomainfrom
lysenko/OCD-3171-om-installation

Conversation

@konstantin-lysenko-netapp
Copy link
Copy Markdown
Contributor

This is the default pull request template. You can customize it by adding a pull_request_template.md at the root of your repo or inside the .github folder.

Jira Ticket

Include a link to your Jira Ticket
Example: JIRAISS-1234

Demo

Please add a recording of the feature/bug fix in work. if you added new routes, the recording should show the request and response for each new/changed route

Checklist:

  • I have filled relevant self assessment (NodeJS, Frontend, Backend)
  • I have run ESlint on my changes and fixed all warnings and errors (NodeJS & Frontend Services)
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have validated all the requirements in the Jira task were answered
  • I have all neccessary approvals for the design/mini design of this task
  • I have approved the API changes and granular permission patterns (documentation subtask) (For public services only)

@konstantin-lysenko-netapp konstantin-lysenko-netapp force-pushed the lysenko/OCD-3171-om-installation branch from 604f086 to 49497ff Compare September 21, 2023 14:42
Comment thread cmd/operator_upgrade.go Outdated
Comment thread cmd/operator_upgrade.go Outdated
Comment thread cmd/operator_upgrade.go Outdated
Comment thread cmd/operator_install.go
Comment thread cmd/operator_upgrade.go Outdated
Comment thread cmd/operator_install.go Outdated
Comment thread cmd/operator_install.go Outdated
Comment thread cmd/operator_install.go Outdated
Comment thread pkg/oceancd/api.go Outdated
return rolloutDefinition, nil
}

func InstallOperator(_ context.Context, payload operator.InstallationPayload) (*operator.InstallationOutput, error) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to getOMInstallationManifests

Comment thread cmd/operator_install.go Outdated
Comment thread cmd/operator_install.go Outdated
Comment thread cmd/operator_install.go Outdated
Comment thread cmd/operator_install.go
Comment thread cmd/operator_install.go Outdated
Comment thread pkg/oceancd/model/operator/install.go Outdated
Comment thread pkg/oceancd/model/operator/install.go Outdated
Comment thread pkg/oceancd/model/operator/install.go Outdated
Comment thread pkg/utils/confighandlers.go Outdated
type Config struct {
Filename string
Filename string
SingleOnly bool
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to SingleResource

Comment thread cmd/operator_install.go Outdated
applyHandler := cluster.BaseApplyHandler{}
for _, resource := range resources {
if err := applyHandler.Apply(resource); err != nil {
return fmt.Errorf("failed to apply operator manager ConfigMap: %w", err)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the error message has typo, you can apply other resources and not only ConfigMap

Comment thread pkg/oceancd/model/operator/install.go Outdated
"spot-oceancd-operator-commons/component_configs"
)

type InstallationConfig struct {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to OperatorManagerConfig

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already have OperatorManagerConfigthat stores argoRollouts and operator's configs that then converted into ConfigMap

the InstallationConfig also contains info about the operator manager, the config is used only for the installation of OM

I suggest leave it as it is

Comment thread pkg/oceancd/model/operator/install.go Outdated
ArgoRolloutsConfig component_configs.ArgoRolloutsConfig `json:"argo"`
}

func (c *InstallationConfig) GetData() map[string]interface{} {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No one is using this method, please remove

Comment thread pkg/oceancd/model/operator/install.go Outdated
return data
}

func (c *InstallationConfig) GetOperatorManagerConfig() *component_configs.OperatorManagerConfig {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No one is using this method, please remove

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is used by buildOperatorManagerConfigMap method

Comment thread pkg/oceancd/model/operator/install.go Outdated
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets"`
}

func NewInstallationConfig(data map[string]interface{}) (*InstallationConfig, error) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to NewOperatorManagerConfig

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already have OperatorManagerConfigthat stores argoRollouts and operator's configs that then converted into ConfigMap

the InstallationConfig also contains info about the operator manager, the config is used only for the installation of OM

I suggest leave it as it is

Comment thread pkg/oceancd/model/operator/install.go Outdated
return &config, nil
}

func DefaultInstallationConfig() InstallationConfig {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to DefaultOperatorManagerConfig

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already have OperatorManagerConfigthat stores argoRollouts and operator's configs that then converted into ConfigMap

the InstallationConfig also contains info about the operator manager, the config is used only for the installation of OM

I suggest leave it as it is

Comment thread pkg/oceancd/model/operator/install.go Outdated
Manager ManagerConfig `json:"manager"`
}

func NewInstallationPayload(config *InstallationConfig) OMManifestsRequest {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to NewOMManfiestsRequest

OM OM `json:"om"`
}

type OM struct {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to OMManifestsItemsResponse

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but this structure will be inside the items field

the om field is redundant IMHO

we’re trying to put it on crutches

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants