Skip to content

Commit

Permalink
feat(kubernetes): support rolling restart operation for deployments (#…
Browse files Browse the repository at this point in the history
…3233)

* feat(kubernetes): support rolling restart operation for deployments

* fix(google): make stage @nonnull
  • Loading branch information
maggieneterval committed Oct 17, 2019
1 parent 31e5229 commit 295a3e9
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Copyright 2019 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.netflix.spinnaker.orca.clouddriver.pipeline.manifest;

import com.netflix.spinnaker.orca.clouddriver.tasks.MonitorKatoTask;
import com.netflix.spinnaker.orca.clouddriver.tasks.manifest.ManifestForceCacheRefreshTask;
import com.netflix.spinnaker.orca.clouddriver.tasks.manifest.RollingRestartManifestTask;
import com.netflix.spinnaker.orca.pipeline.StageDefinitionBuilder;
import com.netflix.spinnaker.orca.pipeline.TaskNode;
import com.netflix.spinnaker.orca.pipeline.model.Stage;
import javax.annotation.Nonnull;
import org.springframework.stereotype.Component;

@Component
public class RollingRestartManifestStage implements StageDefinitionBuilder {
public static final String PIPELINE_CONFIG_TYPE = "rollingRestartManifest";

@Override
public void taskGraph(@Nonnull Stage stage, TaskNode.Builder builder) {
builder
.withTask(RollingRestartManifestTask.TASK_NAME, RollingRestartManifestTask.class)
.withTask("monitorRollingRestart", MonitorKatoTask.class)
.withTask(ManifestForceCacheRefreshTask.TASK_NAME, ManifestForceCacheRefreshTask.class);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright 2019 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.netflix.spinnaker.orca.clouddriver.tasks.manifest;

import org.springframework.stereotype.Component;

@Component
public class RollingRestartManifestTask extends GenericUpdateManifestTask {
public static final String TASK_NAME = "rollingRestartManifest";

@Override
protected String taskName() {
return TASK_NAME;
}
}

0 comments on commit 295a3e9

Please sign in to comment.