Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(provider/k8s): Prepare these new fileds or files for the statefu… #1853

Merged
merged 4 commits into from
Aug 29, 2017

Conversation

chlung
Copy link
Contributor

@chlung chlung commented Aug 29, 2017

This PR will allow to deploy a new statefulset. In this commit, it mainly to update miscellaneous files for preparing for next commit deploy operation.

  • Add a new file for transform between k8s client object to fabric8 object
  • Add extra fields for supporting statefulset
  • Add pre-defined string

***Note: this is re-submit due to my previous PR in wrong branch.

Thanks.

We prefer small, well tested pull requests.

Please refer to Contributing to Spinnaker.

When filling out a pull request, please consider the following:

  • Follow the commit message conventions found here.
  • Provide a descriptive summary for your changes.
  • If it fixes a bug or resolves a feature request, be sure to link to that issue.
  • Add inline code comments to changes that might not be obvious.
  • Squash your commits as you keep adding changes.
  • Add a comment to @spinnaker/reviewers for review if your issue has been outstanding for more than 3 days.

Note that we are unlikely to accept pull requests that add features without prior discussion. The best way to propose a feature is to open an issue first and discuss your ideas there before implementing them.

@chlung
Copy link
Contributor Author

chlung commented Aug 29, 2017

@lwander Please review. This PR is mainly to address my previous issues. I did remove customeTempateMetadataLabels per you feedback.

Thanks.

@@ -39,8 +39,9 @@ class DeployKubernetesAtomicOperationDescription extends KubernetesAtomicOperati
List<KubernetesVolumeSource> volumeSources
Capacity capacity
KubernetesScalingPolicy scalingPolicy
Map<String, String> replicaSetAnnotations
Map<String, String> controllerAnnotations
Copy link
Member

Choose a reason for hiding this comment

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

This will break existing users. They expect the field replicaSetAnnotations

ObjectMeta mdata = new ObjectMeta()
mdata.name = metadata.name
mdata.namespace = metadata.namespace
setMetadata(mdata)
Copy link
Member

Choose a reason for hiding this comment

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

It looks like you are just setting these fields twice here. Once above with this.metadata... and again here by creating a new object and assigning it.

@chlung
Copy link
Contributor Author

chlung commented Aug 29, 2017

@lwander Update per your feedback. I retain controllerAnnotations that name is more generic for these new controllers. Please let me know if you see any issues. I will make code adjustment.

@lwander lwander merged commit f648c17 into spinnaker:k8s-client-staging Aug 29, 2017
@chlung
Copy link
Contributor Author

chlung commented Aug 29, 2017

@lwander thanks

@chlung chlung deleted the k8s-client-staging branch August 29, 2017 18:49
chlung added a commit to chlung/clouddriver that referenced this pull request Sep 14, 2017
# This is the 1st commit message:

feat(provider/kubernetes): Add a new k8s client java api client. (spinnaker#1779)

* feat(provider/kubernetes): Add a new k8s client java api client.

* feat(provider/kubernetes): Create a new api adapter file and other changes.

* feat(provider/kubernetes): Fixed constructor change in unit test mock up object.

* feat(provider/kubernetes): Fixed null checking.

* feat(provider/kubernetes): Fixed license header.

K8s client staging (spinnaker#1831)

* feature(provider/kubernetes) : Adding support for Stateful set for new Caching agent using new java client library (splited the code)

* feature(provider/kubernetes) : Adding support for Stateful set for new Caching agent using new java client library (Statefulset Part 1)

* feature(provider/kubernetes) : Adding support for Stateful set for new Caching agent using new java client library (Statefulset Part 1)

* feature(provider/kubernetes) : Adding support for Stateful set for new Caching agent using new java client library (Statefulset Part 1) Removed Unwanted code

* feature(provider/kubernetes) : Indentation Issue Fixed

* feature(provider/kubernetes) : Adding support for Stateful set for new Caching agent using new java client library (Statefulset Part 2)

* feature(provider/kubernetes) : Adding support for Stateful set for new Caching agent using new java client library (Statefulset Part 2)

* feature(provider/kubernetes) : Adding support for Stateful set for new Caching agent using new java client library (Statefulset Part 2)

* feature(provider/kubernetes) : In order to see Statefulset in Spinnaker UI we need to have loadbalancer details also as its throw null pointer at com.netflix.spinnaker.clouddriver.controllers.ApplicationsController on line no: 101 (result.clusters[account] << new ApplicationClusterViewModel(name: cluster.name, loadBalancers: cluster.loadBalancers.name as TreeSet, serverGroups: cluster.serverGroups*.name as TreeSet, provider: cluster.type) at this call 'cluster.loadBalancers.name')

* feature(provider/kubernetes) : Added Persistance Volume Claim for StatefulSet

* feature(provider/kubernetes) : 1) Removed V1PersistentVolumeClaim (Added the right implementation) 2) Removed extra Space

* feature(provider/kubernetes) : 1) Adding DaemonSets Support (Part 1)2) in order to accommodate new controller , created new generic  KubernatesController in KubernetesControllersCachingAgent

* feature(provider/kubernetes) : 1) Incorporated the Review comments (Pull Request 1831) 2) DaemonSetsSpec doesnot support Replicas : Checked the Documentation (V1beta1DaemonSetSpec.md)

# This is the commit message spinnaker#2:

feat(provider/k8s): Prepare these new fileds or files for the statefu… (spinnaker#1853)

* feat(provider/k8s): Prepare these new fileds or files for the statefulset.

* feat(provider/k8s): Fixed change field name issue.

* feat(provider/k8s): Fixed code duplication.

* feat(provider/k8s): Added back replicaSetAnnotations field.
lwander added a commit to lwander/clouddriver that referenced this pull request Aug 8, 2018
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