profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/maciaszczykm/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Marcin Maciaszczyk maciaszczykm @kubermatic Poland Kubernetes, JavaScript and Go

maciaszczykm/go-algorithms 2

Go implementation of well-known algorithms

maciaszczykm/sample-k8s-resources 1

Sample Kubernetes resources that can be used for testing

maciaszczykm/currency-exchange 0

Currency exchange webservice

maciaszczykm/docs 0

Documentation for Kubermatic projects

maciaszczykm/java-algorithms 0

Java implementation of well-known algorithms

maciaszczykm/kubermatic 0

The Central Kubernetes Management Platform For Any Infrastructure

maciaszczykm/kubermatic-dashboard 0

Dashboard For The Kubermatic Kubernetes Platform

maciaszczykm/kubernetes 0

Production-Grade Container Scheduling and Management

maciaszczykm/kubernetes-dashboard 0

General-purpose web UI for Kubernetes clusters

pull request commentkubermatic/dashboard

Skip provider tests in community edition

/retest

maciaszczykm

comment created time in 4 hours

pull request commentkubermatic/dashboard

Expose CNI config in wizard

/lgtm /approve

wozniakjan

comment created time in 4 hours

pull request commentkubermatic/dashboard

Skip provider tests in community edition

/retest

maciaszczykm

comment created time in 6 hours

pull request commentkubermatic/dashboard

Expose CNI config in wizard

I've tested in manually. Works fine. Last thing that seems to be missing is entry in the wizard summary:

Zrzut ekranu 2021-09-23 o 11 50 20

wozniakjan

comment created time in 6 hours

PullRequestReviewEvent

Pull request review commentkubermatic/dashboard

Expose CNI config in wizard

 export class ClusterStepComponent extends StepBase implements OnInit, ControlVal       [Controls.ProxyMode]: this._builder.control(''),       [Controls.PodsCIDR]: new FormControl('', [CIDR_PATTERN_VALIDATOR]),       [Controls.ServicesCIDR]: new FormControl('', [CIDR_PATTERN_VALIDATOR]),+      [Controls.CNIPlugin]: new FormControl(''),

Should it be required value?

wozniakjan

comment created time in 6 hours

Pull request review commentkubermatic/dashboard

Expose CNI config in wizard

 export class ClusterStepComponent extends StepBase implements OnInit, ControlVal       .valueChanges.pipe(takeUntil(this._unsubscribe))       .subscribe(() => (this._clusterSpecService.admissionPlugins = this.form.get(Controls.AdmissionPlugins).value)); -    this.control(Controls.CNIPlugin).valueChanges.subscribe(() => {-      this.updateCNIPluginOptions();-    });+    this.control(Controls.CNIPlugin)+      .valueChanges.pipe(takeUntil(this._unsubscribe))+      .subscribe(_ => {

You can also remove the {}.

wozniakjan

comment created time in 7 hours

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentkubermatic/dashboard

Expose CNI config in wizard

 export class ClusterStepComponent extends StepBase implements OnInit, ControlVal   }    updateCNIPluginOptions() {-    if (this.controlValue(Controls.CNIPlugin) === 'cilium') {+    if (this.controlValue(Controls.CNIPlugin) === CNIPlugin.cilium) {

Please also change the enum keys to use upper case. The internal value can be the same as now.

wozniakjan

comment created time in 7 hours

Pull request review commentkubermatic/dashboard

Expose CNI config in wizard

         <mat-card-title>Network Configuration</mat-card-title>       </mat-card-header>       <div fxLayout="column">+        <mat-form-field class="km-dropdown-with-suffix">+          <mat-label>CNI Plugin</mat-label>+          <mat-select [formControlName]="Controls.CNIPlugin"+                      class="km-select-ellipsis"+                      disableOptionCentering>+            <mat-option [value]="cniPlugin.canal">canal</mat-option>

No, the IPVS was not intentional I think. Let's use official names.

wozniakjan

comment created time in 7 hours

PullRequestReviewEvent

Pull request review commentkubermatic/dashboard

Expose CNI config in wizard

 export enum ProxyMode {   iptables = 'iptables', } +export enum CNIPlugins {

I didn't notice the class name. Renaming sounds good but it can also stay as it is. It's minor thing.

wozniakjan

comment created time in 7 hours

PullRequestReviewEvent

pull request commentkubermatic/kubermatic

Add ebpf proxy mode support for Cilium CNI

/approve

rastislavs

comment created time in 7 hours

pull request commentkubermatic/dashboard

Support EnabledOperatingSystems for Datacenters

/test pre-dashboard-check-static /test pre-dashboard-test-unit /test pre-dashboard-build-image

Happy2C0de

comment created time in 7 hours

PullRequestReviewEvent

Pull request review commentkubermatic/dashboard

Support EnabledOperatingSystems for Datacenters

 export class NodeDataComponent extends BaseFormValidator implements OnInit, OnDe   }    isOperatingSystemSupported(os: OperatingSystem): boolean {-    // If VSphere is selected enable OS only if it is also defined in the datacenter spec-    if (this._hasSystemTemplate(NodeProvider.VSPHERE, os)) {-      return true;-    }+    if (this._datacenterSpec.spec.enabledOperatingSystems.length > 0) {

enabledOperatingSystems is optional, if it will be undefined then the line above will produce errors.

Happy2C0de

comment created time in 7 hours

Pull request review commentkubermatic/dashboard

Support EnabledOperatingSystems for Datacenters

 export class NodeDataComponent extends BaseFormValidator implements OnInit, OnDe   }    isOperatingSystemSupported(os: OperatingSystem): boolean {-    // If VSphere is selected enable OS only if it is also defined in the datacenter spec-    if (this._hasSystemTemplate(NodeProvider.VSPHERE, os)) {-      return true;-    }+    if (this._datacenterSpec.spec.enabledOperatingSystems.length > 0) {+      for (const enabledOS of this._datacenterSpec.spec.enabledOperatingSystems) {+        if (enabledOS as OperatingSystem == os ) {

Use === instead of ==. Run the checks like npm run check locally to detects issues like this automatically.

Happy2C0de

comment created time in 7 hours

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentkubermatic/dashboard

Support EnabledOperatingSystems for Datacenters

 export class NodeDataComponent extends BaseFormValidator implements OnInit, OnDe   }    isOperatingSystemSupported(os: OperatingSystem): boolean {-    // If VSphere is selected enable OS only if it is also defined in the datacenter spec-    if (this._hasSystemTemplate(NodeProvider.VSPHERE, os)) {-      return true;-    }+    if (this._datacenterSpec.spec.enabledOperatingSystems.length > 0) {+      for (const enabledOS of this._datacenterSpec.spec.enabledOperatingSystems) {+        if (enabledOS as OperatingSystem == os ) {+          return true

Please add the ;.

Happy2C0de

comment created time in 7 hours

pull request commentkubermatic/dashboard

Expose CNI config in wizard

I've added some remarks. Really good job for a first thing done in frontend :)

I'll test it later.

wozniakjan

comment created time in 7 hours

Pull request review commentkubermatic/dashboard

Expose CNI config in wizard

         <mat-card-title>Network Configuration</mat-card-title>       </mat-card-header>       <div fxLayout="column">+        <mat-form-field class="km-dropdown-with-suffix">+          <mat-label>CNI Plugin</mat-label>+          <mat-select [formControlName]="Controls.CNIPlugin"+                      class="km-select-ellipsis"+                      disableOptionCentering>+            <mat-option [value]="cniPlugin.canal">canal</mat-option>

On official pages both Canal and Cilium are starting with upper letters. Can we follow that in the UI?

wozniakjan

comment created time in 8 hours

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentkubermatic/dashboard

Expose CNI config in wizard

 export class ClusterStepComponent extends StepBase implements OnInit, ControlVal   private _getClusterEntity(): Cluster {     const pods = this.controlValue(Controls.PodsCIDR);     const services = this.controlValue(Controls.ServicesCIDR);+    const cniPluginType = this.controlValue(Controls.CNIPlugin);+    let cniPlugin = null;+    if (cniPluginType !== '') {+      cniPlugin = {type: cniPluginType};+    }

Short form:

const cniPlugin = cniPluginType !== '' ? {type: cniPluginType} : null;
wozniakjan

comment created time in 8 hours

Pull request review commentkubermatic/dashboard

Expose CNI config in wizard

 export class ClusterStepComponent extends StepBase implements OnInit, ControlVal     return AdmissionPluginUtils.getPluginName(name);   } +  updateCNIPluginOptions() {+    if (this.controlValue(Controls.CNIPlugin) === 'cilium') {

Use enum in comparision instead of the string value.

wozniakjan

comment created time in 8 hours

PullRequestReviewEvent

Pull request review commentkubermatic/dashboard

Expose CNI config in wizard

 export class ClusterStepComponent extends StepBase implements OnInit, ControlVal       .valueChanges.pipe(takeUntil(this._unsubscribe))       .subscribe(() => (this._clusterSpecService.admissionPlugins = this.form.get(Controls.AdmissionPlugins).value)); +    this.control(Controls.CNIPlugin).valueChanges.subscribe(() => {+      this.updateCNIPluginOptions();+    });

Please change to one-liner:

this.control(Controls.CNIPlugin).valueChanges.subscribe(_ => this.updateCNIPluginOptions());

Also, add unsubscribe (see other subscriptions for examples).

wozniakjan

comment created time in 8 hours